feat(settings): add quickAddDefaultReminders field to frontend settings
This commit is contained in:
parent
9a12c8f254
commit
e85f3fd84c
|
|
@ -378,6 +378,7 @@ async function toggleSortOrder() {
|
|||
frontendSettings: {
|
||||
...authStore.settings.frontendSettings,
|
||||
commentSortOrder: newOrder,
|
||||
quickAddDefaultReminders: [...(authStore.settings.frontendSettings.quickAddDefaultReminders ?? [])],
|
||||
},
|
||||
},
|
||||
showMessage: false,
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ export function useSidebarResize() {
|
|||
frontendSettings: {
|
||||
...authStore.settings.frontendSettings,
|
||||
sidebarWidth: currentWidth.value,
|
||||
quickAddDefaultReminders: [...(authStore.settings.frontendSettings.quickAddDefaultReminders ?? [])],
|
||||
},
|
||||
}
|
||||
await authStore.saveUserSettings({
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
import type {IAbstract} from './IAbstract'
|
||||
import type {IProject} from './IProject'
|
||||
import type {ITaskReminder} from '@/modelTypes/ITaskReminder'
|
||||
import type {PrefixMode} from '@/modules/quickAddMagic'
|
||||
import type {BasicColorSchema} from '@vueuse/core'
|
||||
import type {SupportedLocale} from '@/i18n'
|
||||
|
|
@ -26,6 +27,7 @@ export interface IFrontendSettings {
|
|||
sidebarWidth: number | null
|
||||
commentSortOrder: 'asc' | 'desc'
|
||||
desktopQuickEntryShortcut: string
|
||||
quickAddDefaultReminders: ITaskReminder[]
|
||||
}
|
||||
|
||||
export interface IExtraSettingsLink {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export default class UserSettingsModel extends AbstractModel<IUserSettings> impl
|
|||
sidebarWidth: null,
|
||||
commentSortOrder: 'asc',
|
||||
desktopQuickEntryShortcut: 'CmdOrCtrl+Shift+A',
|
||||
quickAddDefaultReminders: [],
|
||||
}
|
||||
extraSettingsLinks = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -499,6 +499,8 @@ const settings = ref<IUserSettings>({
|
|||
timeFormat: authStore.settings.frontendSettings.timeFormat ?? TIME_FORMAT.HOURS_12,
|
||||
// Add fallback for old settings that don't have the default task relation type set
|
||||
defaultTaskRelationType: authStore.settings.frontendSettings.defaultTaskRelationType ?? 'related',
|
||||
// Clone to escape the store's readonly array type.
|
||||
quickAddDefaultReminders: [...(authStore.settings.frontendSettings.quickAddDefaultReminders ?? [])],
|
||||
},
|
||||
})
|
||||
|
||||
|
|
@ -630,7 +632,13 @@ watch(
|
|||
if (Object.keys(settings.value).length !== 0) {
|
||||
return
|
||||
}
|
||||
settings.value = {...authStore.settings}
|
||||
settings.value = {
|
||||
...authStore.settings,
|
||||
frontendSettings: {
|
||||
...authStore.settings.frontendSettings,
|
||||
quickAddDefaultReminders: [...(authStore.settings.frontendSettings.quickAddDefaultReminders ?? [])],
|
||||
},
|
||||
}
|
||||
},
|
||||
{immediate: true},
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue