refactor: native feature management (#2350)

This commit is contained in:
Mo
2023-07-12 12:56:08 -05:00
committed by GitHub
parent 49f7581cd8
commit 078ef3772c
223 changed files with 3996 additions and 3438 deletions

View File

@@ -27,7 +27,6 @@ export const SYNC_TIMEOUT_DEBOUNCE = 350
export const SYNC_TIMEOUT_NO_DEBOUNCE = 100
type EditorMetadata = {
name: string
icon: IconType
subtleIcon?: IconType
iconClassName: string
@@ -35,16 +34,8 @@ type EditorMetadata = {
}
export const SuperEditorMetadata: EditorMetadata = {
name: 'Super',
icon: 'file-doc',
subtleIcon: 'format-align-left',
iconClassName: 'text-accessory-tint-1',
iconTintNumber: 1,
}
export const PlainEditorMetadata: EditorMetadata = {
name: 'Plain Text',
icon: 'plain-text',
iconClassName: 'text-accessory-tint-1',
iconTintNumber: 1,
}

View File

@@ -1,49 +0,0 @@
import {
PrefKey,
CollectionSort,
NewNoteTitleFormat,
EditorLineHeight,
EditorFontSize,
EditorLineWidth,
PrefValue,
} from '@standardnotes/models'
import { FeatureIdentifier } from '@standardnotes/snjs'
export const PrefDefaults = {
[PrefKey.TagsPanelWidth]: 220,
[PrefKey.NotesPanelWidth]: 350,
[PrefKey.EditorWidth]: null,
[PrefKey.EditorLeft]: null,
[PrefKey.EditorMonospaceEnabled]: false,
[PrefKey.EditorSpellcheck]: true,
[PrefKey.EditorResizersEnabled]: false,
[PrefKey.EditorLineHeight]: EditorLineHeight.Normal,
[PrefKey.EditorLineWidth]: EditorLineWidth.FullWidth,
[PrefKey.EditorFontSize]: EditorFontSize.Normal,
[PrefKey.SortNotesBy]: CollectionSort.CreatedAt,
[PrefKey.SortNotesReverse]: false,
[PrefKey.NotesShowArchived]: false,
[PrefKey.NotesShowTrashed]: false,
[PrefKey.NotesHidePinned]: false,
[PrefKey.NotesHideProtected]: false,
[PrefKey.NotesHideNotePreview]: false,
[PrefKey.NotesHideDate]: false,
[PrefKey.NotesHideTags]: false,
[PrefKey.NotesHideEditorIcon]: false,
[PrefKey.UseSystemColorScheme]: false,
[PrefKey.AutoLightThemeIdentifier]: 'Default',
[PrefKey.AutoDarkThemeIdentifier]: FeatureIdentifier.DarkTheme,
[PrefKey.NoteAddToParentFolders]: true,
[PrefKey.NewNoteTitleFormat]: NewNoteTitleFormat.CurrentDateAndTime,
[PrefKey.CustomNoteTitleFormat]: 'YYYY-MM-DD [at] hh:mm A',
[PrefKey.UpdateSavingStatusIndicator]: true,
[PrefKey.PaneGesturesEnabled]: true,
[PrefKey.MomentsDefaultTagUuid]: undefined,
[PrefKey.ClipperDefaultTagUuid]: undefined,
[PrefKey.DefaultEditorIdentifier]: FeatureIdentifier.PlainEditor,
[PrefKey.SuperNoteExportFormat]: 'json',
[PrefKey.SystemViewPreferences]: {},
[PrefKey.AuthenticatorNames]: '',
} satisfies {
[key in PrefKey]: PrefValue[key]
}