-
-
Notifications
You must be signed in to change notification settings - Fork 437
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
96 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
const PREFERENCE_PANE_IDS = [ | ||
'general', | ||
'account', | ||
'security', | ||
'home-server', | ||
'vaults', | ||
'appearance', | ||
'backups', | ||
'listed', | ||
'plugins', | ||
'shortcuts', | ||
'accessibility', | ||
'get-free-month', | ||
'help-feedback', | ||
'whats-new', | ||
] as const | ||
|
||
export type PreferencePaneId = (typeof PREFERENCE_PANE_IDS)[number] | ||
export enum PreferencePaneId { | ||
General = 'general', | ||
Account = 'account', | ||
Security = 'security', | ||
HomeServer = 'home-server', | ||
Vaults = 'vaults', | ||
Appearance = 'appearance', | ||
Backups = 'backups', | ||
Listed = 'listed', | ||
Plugins = 'plugins', | ||
Shortcuts = 'shortcuts', | ||
Accessibility = 'accessibility', | ||
GetFreeMonth = 'get-free-month', | ||
HelpFeedback = 'help-feedback', | ||
WhatsNew = 'whats-new', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/web/src/javascripts/Components/Dropdown/DropdownItem.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import { IconType } from '@standardnotes/snjs' | ||
|
||
export type DropdownItem = { | ||
export type DropdownItem<T extends string> = { | ||
icon?: IconType | ||
iconClassName?: string | ||
label: string | ||
value: string | ||
value: T | ||
disabled?: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 22 additions & 21 deletions
43
packages/web/src/javascripts/Components/Preferences/Controller/MenuItems.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,29 @@ | ||
import { PreferencePaneId } from '@/__mocks__/@standardnotes/snjs' | ||
import { PreferencesMenuItem } from './PreferencesMenuItem' | ||
|
||
export const PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [ | ||
{ id: 'whats-new', label: "What's New", icon: 'asterisk', order: 0 }, | ||
{ id: 'account', label: 'Account', icon: 'user', order: 1 }, | ||
{ id: 'general', label: 'General', icon: 'settings', order: 3 }, | ||
{ id: 'security', label: 'Security', icon: 'security', order: 4 }, | ||
{ id: 'backups', label: 'Backups', icon: 'restore', order: 5 }, | ||
{ id: 'appearance', label: 'Appearance', icon: 'themes', order: 6 }, | ||
{ id: 'listed', label: 'Listed', icon: 'listed', order: 7 }, | ||
{ id: 'shortcuts', label: 'Shortcuts', icon: 'keyboard', order: 8 }, | ||
{ id: 'plugins', label: 'Plugins', icon: 'dashboard', order: 8 }, | ||
{ id: 'accessibility', label: 'Accessibility', icon: 'accessibility', order: 9 }, | ||
{ id: 'get-free-month', label: 'Get a free month', icon: 'star', order: 10 }, | ||
{ id: 'help-feedback', label: 'Help & feedback', icon: 'help', order: 11 }, | ||
{ id: PreferencePaneId.WhatsNew, label: "What's New", icon: 'asterisk', order: 0 }, | ||
{ id: PreferencePaneId.Account, label: 'Account', icon: 'user', order: 1 }, | ||
{ id: PreferencePaneId.General, label: 'General', icon: 'settings', order: 3 }, | ||
{ id: PreferencePaneId.Security, label: 'Security', icon: 'security', order: 4 }, | ||
{ id: PreferencePaneId.Backups, label: 'Backups', icon: 'restore', order: 5 }, | ||
{ id: PreferencePaneId.Appearance, label: 'Appearance', icon: 'themes', order: 6 }, | ||
{ id: PreferencePaneId.Listed, label: 'Listed', icon: 'listed', order: 7 }, | ||
{ id: PreferencePaneId.Shortcuts, label: 'Shortcuts', icon: 'keyboard', order: 8 }, | ||
{ id: PreferencePaneId.Plugins, label: 'Plugins', icon: 'dashboard', order: 8 }, | ||
{ id: PreferencePaneId.Accessibility, label: 'Accessibility', icon: 'accessibility', order: 9 }, | ||
{ id: PreferencePaneId.GetFreeMonth, label: 'Get a free month', icon: 'star', order: 10 }, | ||
{ id: PreferencePaneId.HelpFeedback, label: 'Help & feedback', icon: 'help', order: 11 }, | ||
] | ||
|
||
export const READY_PREFERENCES_MENU_ITEMS: PreferencesMenuItem[] = [ | ||
{ id: 'whats-new', label: "What's New", icon: 'asterisk', order: 0 }, | ||
{ id: 'account', label: 'Account', icon: 'user', order: 1 }, | ||
{ id: 'general', label: 'General', icon: 'settings', order: 3 }, | ||
{ id: 'security', label: 'Security', icon: 'security', order: 4 }, | ||
{ id: 'backups', label: 'Backups', icon: 'restore', order: 5 }, | ||
{ id: 'appearance', label: 'Appearance', icon: 'themes', order: 6 }, | ||
{ id: 'listed', label: 'Listed', icon: 'listed', order: 7 }, | ||
{ id: 'plugins', label: 'Plugins', icon: 'dashboard', order: 8 }, | ||
{ id: 'help-feedback', label: 'Help & feedback', icon: 'help', order: 11 }, | ||
{ id: PreferencePaneId.WhatsNew, label: "What's New", icon: 'asterisk', order: 0 }, | ||
{ id: PreferencePaneId.Account, label: 'Account', icon: 'user', order: 1 }, | ||
{ id: PreferencePaneId.General, label: 'General', icon: 'settings', order: 3 }, | ||
{ id: PreferencePaneId.Security, label: 'Security', icon: 'security', order: 4 }, | ||
{ id: PreferencePaneId.Backups, label: 'Backups', icon: 'restore', order: 5 }, | ||
{ id: PreferencePaneId.Appearance, label: 'Appearance', icon: 'themes', order: 6 }, | ||
{ id: PreferencePaneId.Listed, label: 'Listed', icon: 'listed', order: 7 }, | ||
{ id: PreferencePaneId.Plugins, label: 'Plugins', icon: 'dashboard', order: 8 }, | ||
{ id: PreferencePaneId.HelpFeedback, label: 'Help & feedback', icon: 'help', order: 11 }, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.