2020-12-19 01:12:30 +01:00
|
|
|
|
|
|
|
import AbstractModel from './abstractModel'
|
2022-07-21 00:42:36 +02:00
|
|
|
import type { IList } from './list'
|
2020-12-19 01:12:30 +01:00
|
|
|
|
2022-07-21 00:42:36 +02:00
|
|
|
export interface IUserSettings {
|
2022-06-23 03:22:21 +02:00
|
|
|
name: string
|
|
|
|
emailRemindersEnabled: boolean
|
|
|
|
discoverableByName: boolean
|
|
|
|
discoverableByEmail: boolean
|
|
|
|
overdueTasksRemindersEnabled: boolean
|
2022-07-21 00:42:36 +02:00
|
|
|
defaultListId: undefined | IList['id']
|
2022-06-23 03:22:21 +02:00
|
|
|
weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
|
|
timezone: string
|
2022-07-21 00:42:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default class UserSettingsModel extends AbstractModel implements IUserSettings {
|
|
|
|
declare name: string
|
|
|
|
declare emailRemindersEnabled: boolean
|
|
|
|
declare discoverableByName: boolean
|
|
|
|
declare discoverableByEmail: boolean
|
|
|
|
declare overdueTasksRemindersEnabled: boolean
|
|
|
|
declare defaultListId: undefined | IList['id']
|
|
|
|
declare weekStart: 0 | 1 | 2 | 3 | 4 | 5 | 6
|
|
|
|
declare timezone: string
|
2022-06-23 03:22:21 +02:00
|
|
|
|
2020-12-19 01:12:30 +01:00
|
|
|
defaults() {
|
|
|
|
return {
|
|
|
|
name: '',
|
|
|
|
emailRemindersEnabled: true,
|
2021-04-07 21:31:14 +02:00
|
|
|
discoverableByName: false,
|
|
|
|
discoverableByEmail: false,
|
2021-04-11 16:30:49 +02:00
|
|
|
overdueTasksRemindersEnabled: true,
|
2021-07-17 23:21:46 +02:00
|
|
|
defaultListId: undefined,
|
2021-06-03 18:12:40 +02:00
|
|
|
weekStart: 0,
|
2022-01-14 22:02:45 +01:00
|
|
|
timezone: '',
|
2020-12-19 01:12:30 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|