feat: Switched editor appearance preferences to be local instead of synced (#2870)

This commit is contained in:
Aman Harwara
2024-04-24 12:24:34 +05:30
committed by GitHub
parent c402b66977
commit 594a6061b2
15 changed files with 120 additions and 73 deletions

View File

@@ -11,12 +11,12 @@ export const PrefDefaults = {
[PrefKey.NotesPanelWidth]: 350,
[PrefKey.EditorWidth]: null,
[PrefKey.EditorLeft]: null,
[PrefKey.EditorMonospaceEnabled]: false,
[PrefKey.DEPRECATED_EditorMonospaceEnabled]: false,
[PrefKey.EditorSpellcheck]: true,
[PrefKey.EditorResizersEnabled]: false,
[PrefKey.EditorLineHeight]: EditorLineHeight.Normal,
[PrefKey.EditorLineWidth]: EditorLineWidth.FullWidth,
[PrefKey.EditorFontSize]: EditorFontSize.Normal,
[PrefKey.DEPRECATED_EditorLineHeight]: EditorLineHeight.Normal,
[PrefKey.DEPRECATED_EditorLineWidth]: EditorLineWidth.FullWidth,
[PrefKey.DEPRECATED_EditorFontSize]: EditorFontSize.Normal,
[PrefKey.SortNotesBy]: CollectionSort.CreatedAt,
[PrefKey.SortNotesReverse]: false,
[PrefKey.NotesShowArchived]: false,

View File

@@ -12,12 +12,8 @@ export enum PrefKey {
NotesPanelWidth = 'notesPanelWidth',
EditorWidth = 'editorWidth',
EditorLeft = 'editorLeft',
EditorMonospaceEnabled = 'monospaceFont',
EditorSpellcheck = 'spellcheck',
EditorResizersEnabled = 'marginResizersEnabled',
EditorLineHeight = 'editorLineHeight',
EditorLineWidth = 'editorLineWidth',
EditorFontSize = 'editorFontSize',
SortNotesBy = 'sortBy',
SortNotesReverse = 'sortReverse',
NotesShowArchived = 'showArchived',
@@ -53,6 +49,10 @@ export enum PrefKey {
DEPRECATED_UseTranslucentUI = 'useTranslucentUI',
DEPRECATED_AutoLightThemeIdentifier = 'autoLightThemeIdentifier',
DEPRECATED_AutoDarkThemeIdentifier = 'autoDarkThemeIdentifier',
DEPRECATED_EditorMonospaceEnabled = 'monospaceFont',
DEPRECATED_EditorLineHeight = 'editorLineHeight',
DEPRECATED_EditorLineWidth = 'editorLineWidth',
DEPRECATED_EditorFontSize = 'editorFontSize',
}
export type PrefValue = {
@@ -60,7 +60,6 @@ export type PrefValue = {
[PrefKey.NotesPanelWidth]: number
[PrefKey.EditorWidth]: number | null
[PrefKey.EditorLeft]: number | null
[PrefKey.EditorMonospaceEnabled]: boolean
[PrefKey.EditorSpellcheck]: boolean
[PrefKey.EditorResizersEnabled]: boolean
[PrefKey.SortNotesBy]: CollectionSortProperty
@@ -81,9 +80,10 @@ export type PrefValue = {
[PrefKey.NoteAddToParentFolders]: boolean
[PrefKey.NewNoteTitleFormat]: NewNoteTitleFormat
[PrefKey.CustomNoteTitleFormat]: string
[PrefKey.EditorLineHeight]: EditorLineHeight
[PrefKey.EditorLineWidth]: EditorLineWidth
[PrefKey.EditorFontSize]: EditorFontSize
[PrefKey.DEPRECATED_EditorMonospaceEnabled]: boolean
[PrefKey.DEPRECATED_EditorLineHeight]: EditorLineHeight
[PrefKey.DEPRECATED_EditorLineWidth]: EditorLineWidth
[PrefKey.DEPRECATED_EditorFontSize]: EditorFontSize
[PrefKey.UpdateSavingStatusIndicator]: boolean
[PrefKey.DefaultEditorIdentifier]: string
[PrefKey.MomentsDefaultTagUuid]: string | undefined