Skip to content

Commit edbbfb6

Browse files
authored
fix: improve settings ui (#886)
* fix: improve settings ui * add placeholders to commit messages * fix original formatting * remove setValue for auto commit message
1 parent c3ca862 commit edbbfb6

File tree

2 files changed

+181
-98
lines changed

2 files changed

+181
-98
lines changed

src/constants.ts

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -8,57 +8,57 @@ export const GIT_LINE_AUTHORING_MOVEMENT_DETECTION_MINIMAL_LENGTH = 40;
88

99
export const CONFLICT_OUTPUT_FILE = "conflict-files-obsidian-git.md";
1010

11-
export const DEFAULT_SETTINGS: Omit<ObsidianGitSettings, "autoCommitMessage"> =
12-
{
13-
commitMessage: "vault backup: {{date}}",
14-
commitDateFormat: DATE_TIME_FORMAT_SECONDS,
15-
autoSaveInterval: 0,
16-
autoPushInterval: 0,
17-
autoPullInterval: 0,
18-
autoPullOnBoot: false,
19-
disablePush: false,
20-
pullBeforePush: true,
21-
disablePopups: false,
22-
disablePopupsForNoChanges: false,
23-
listChangedFilesInMessageBody: false,
24-
showStatusBar: true,
25-
updateSubmodules: false,
26-
syncMethod: "merge",
27-
customMessageOnAutoBackup: false,
28-
autoBackupAfterFileChange: false,
29-
treeStructure: false,
30-
refreshSourceControl: Platform.isDesktopApp,
31-
basePath: "",
32-
differentIntervalCommitAndPush: false,
33-
changedFilesInStatusBar: false,
34-
showedMobileNotice: false,
35-
refreshSourceControlTimer: 7000,
36-
showBranchStatusBar: true,
37-
setLastSaveToLastCommit: false,
38-
submoduleRecurseCheckout: false,
39-
gitDir: "",
40-
showFileMenu: true,
41-
authorInHistoryView: "hide",
42-
dateInHistoryView: false,
43-
diffStyle: "split",
44-
lineAuthor: {
45-
show: false,
46-
followMovement: "inactive",
47-
authorDisplay: "initials",
48-
showCommitHash: false,
49-
dateTimeFormatOptions: "date",
50-
dateTimeFormatCustomString: DATE_TIME_FORMAT_MINUTES,
51-
dateTimeTimezone: "viewer-local",
52-
coloringMaxAge: "1y",
53-
// colors were picked via:
54-
// https://color.adobe.com/de/create/color-accessibility
55-
colorNew: { r: 255, g: 150, b: 150 },
56-
colorOld: { r: 120, g: 160, b: 255 },
57-
textColorCss: "var(--text-muted)", // more pronounced than line numbers, but less than the content text
58-
ignoreWhitespace: false,
59-
gutterSpacingFallbackLength: 5,
60-
},
61-
};
11+
export const DEFAULT_SETTINGS: ObsidianGitSettings = {
12+
commitMessage: "vault backup: {{date}}",
13+
autoCommitMessage: "vault backup: {{date}}",
14+
commitDateFormat: DATE_TIME_FORMAT_SECONDS,
15+
autoSaveInterval: 0,
16+
autoPushInterval: 0,
17+
autoPullInterval: 0,
18+
autoPullOnBoot: false,
19+
disablePush: false,
20+
pullBeforePush: true,
21+
disablePopups: false,
22+
disablePopupsForNoChanges: false,
23+
listChangedFilesInMessageBody: false,
24+
showStatusBar: true,
25+
updateSubmodules: false,
26+
syncMethod: "merge",
27+
customMessageOnAutoBackup: false,
28+
autoBackupAfterFileChange: false,
29+
treeStructure: false,
30+
refreshSourceControl: Platform.isDesktopApp,
31+
basePath: "",
32+
differentIntervalCommitAndPush: false,
33+
changedFilesInStatusBar: false,
34+
showedMobileNotice: false,
35+
refreshSourceControlTimer: 7000,
36+
showBranchStatusBar: true,
37+
setLastSaveToLastCommit: false,
38+
submoduleRecurseCheckout: false,
39+
gitDir: "",
40+
showFileMenu: true,
41+
authorInHistoryView: "hide",
42+
dateInHistoryView: false,
43+
diffStyle: "split",
44+
lineAuthor: {
45+
show: false,
46+
followMovement: "inactive",
47+
authorDisplay: "initials",
48+
showCommitHash: false,
49+
dateTimeFormatOptions: "date",
50+
dateTimeFormatCustomString: DATE_TIME_FORMAT_MINUTES,
51+
dateTimeTimezone: "viewer-local",
52+
coloringMaxAge: "1y",
53+
// colors were picked via:
54+
// https://color.adobe.com/de/create/color-accessibility
55+
colorNew: { r: 255, g: 150, b: 150 },
56+
colorOld: { r: 120, g: 160, b: 255 },
57+
textColorCss: "var(--text-muted)", // more pronounced than line numbers, but less than the content text
58+
ignoreWhitespace: false,
59+
gutterSpacingFallbackLength: 5,
60+
},
61+
};
6262

6363
export const SOURCE_CONTROL_VIEW_CONFIG = {
6464
type: "git-view",

0 commit comments

Comments
 (0)