feat: default view setting (#2306)
This PR adds configuration of default project view in settings, which is used when the user has not visited the project and thus last view hasn't yet been saved in projects. Updates old settings and adds "First View" option with fallback. Resolves https://kolaente.dev/vikunja/vikunja/issues/2153 Co-authored-by: Elscrux <nickposer2102@gmail.com> Reviewed-on: https://kolaente.dev/vikunja/vikunja/pulls/2306 Reviewed-by: konrad <k@knt.li> Co-authored-by: Elscrux <elscrux@gmail.com> Co-committed-by: Elscrux <elscrux@gmail.com>
This commit is contained in:
@ -9,6 +9,12 @@ export const PROJECT_VIEW_KINDS = {
|
||||
} as const
|
||||
export type ProjectViewKind = typeof PROJECT_VIEW_KINDS[keyof typeof PROJECT_VIEW_KINDS]
|
||||
|
||||
export const DEFAULT_PROJECT_VIEW_SETTINGS = {
|
||||
FIRST: 'first',
|
||||
...PROJECT_VIEW_KINDS,
|
||||
} as const
|
||||
export type DefaultProjectViewKind = typeof DEFAULT_PROJECT_VIEW_SETTINGS[keyof typeof DEFAULT_PROJECT_VIEW_SETTINGS]
|
||||
|
||||
export const PROJECT_VIEW_BUCKET_CONFIGURATION_MODES = ['none', 'manual', 'filter']
|
||||
export type ProjectViewBucketConfigurationMode = typeof PROJECT_VIEW_BUCKET_CONFIGURATION_MODES[number]
|
||||
|
||||
|
@ -4,12 +4,14 @@ import type {IProject} from './IProject'
|
||||
import type {PrefixMode} from '@/modules/parseTaskText'
|
||||
import type {BasicColorSchema} from '@vueuse/core'
|
||||
import type {SupportedLocale} from '@/i18n'
|
||||
import type {DefaultProjectViewKind} from '@/modelTypes/IProjectView'
|
||||
|
||||
export interface IFrontendSettings {
|
||||
playSoundWhenDone: boolean
|
||||
quickAddMagicMode: PrefixMode
|
||||
colorSchema: BasicColorSchema
|
||||
filterIdUsedOnOverview: IProject['id'] | null
|
||||
defaultView?: DefaultProjectViewKind
|
||||
}
|
||||
|
||||
export interface IUserSettings extends IAbstract {
|
||||
|
Reference in New Issue
Block a user