mirror of
https://github.com/johannesjo/super-productivity.git
synced 2026-01-23 02:36:05 +00:00
refactor: rename task settings field
This commit is contained in:
parent
a617ff4e29
commit
73c9c05c32
6 changed files with 12 additions and 12 deletions
|
|
@ -41,10 +41,10 @@ export const MIGRATIONS: SchemaMigration[] = [
|
|||
|
||||
const migratedTasksConfig = {
|
||||
...state.tasks,
|
||||
isConfirmBeforeTaskDelete: state.misc.isConfirmBeforeTaskDelete ?? false,
|
||||
isConfirmBeforeDelete: state.misc.isConfirmBeforeTaskDelete ?? false,
|
||||
isAutoAddWorkedOnToToday: state.misc.isAutoAddWorkedOnToToday ?? false,
|
||||
isAutoMarkParentAsDone: state.misc.isAutMarkParentAsDone ?? false,
|
||||
isTrayShowCurrentTask: state.misc.isTrayShowCurrentTask ?? false,
|
||||
isTrayShowCurrent: state.misc.isTrayShowCurrentTask ?? false,
|
||||
isMarkdownFormattingInNotesEnabled: !(state.misc.isTurnOffMarkdown ?? false),
|
||||
defaultProjectId: state.misc.defaultProjectId ?? null,
|
||||
notesTemplate: state.misc.taskNotesTpl ?? '',
|
||||
|
|
|
|||
|
|
@ -35,10 +35,10 @@ export const DEFAULT_GLOBAL_CONFIG: GlobalConfigState = {
|
|||
firstDayOfWeek: undefined,
|
||||
},
|
||||
tasks: {
|
||||
isConfirmBeforeTaskDelete: true,
|
||||
isConfirmBeforeDelete: true,
|
||||
isAutoAddWorkedOnToToday: true,
|
||||
isAutoMarkParentAsDone: false,
|
||||
isTrayShowCurrentTask: true,
|
||||
isTrayShowCurrent: true,
|
||||
defaultProjectId: null,
|
||||
isMarkdownFormattingInNotesEnabled: true,
|
||||
notesTemplate: defaultTaskNoteTemplate,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export const TASKS_SETTINGS_FORM_CFG: ConfigFormSection<TasksConfig> = {
|
|||
key: 'tasks',
|
||||
items: [
|
||||
{
|
||||
key: 'isConfirmBeforeTaskDelete',
|
||||
key: 'isConfirmBeforeDelete',
|
||||
type: 'checkbox',
|
||||
templateOptions: {
|
||||
label: T.GCF.TASKS.IS_CONFIRM_BEFORE_TASK_DELETE,
|
||||
|
|
@ -27,7 +27,7 @@ export const TASKS_SETTINGS_FORM_CFG: ConfigFormSection<TasksConfig> = {
|
|||
},
|
||||
},
|
||||
{
|
||||
key: 'isTrayShowCurrentTask',
|
||||
key: 'isTrayShowCurrent',
|
||||
type: 'checkbox',
|
||||
templateOptions: {
|
||||
label: T.GCF.TASKS.IS_TRAY_SHOW_CURRENT_TASK,
|
||||
|
|
|
|||
|
|
@ -49,8 +49,8 @@ export type MiscConfig = Readonly<{
|
|||
export type TasksConfig = Readonly<{
|
||||
isAutoMarkParentAsDone: boolean;
|
||||
isAutoAddWorkedOnToToday: boolean;
|
||||
isConfirmBeforeTaskDelete?: boolean;
|
||||
isTrayShowCurrentTask: boolean;
|
||||
isConfirmBeforeDelete?: boolean;
|
||||
isTrayShowCurrent: boolean;
|
||||
isMarkdownFormattingInNotesEnabled: boolean;
|
||||
defaultProjectId?: string | null | false; // allow 'false' because of #569
|
||||
notesTemplate: string;
|
||||
|
|
|
|||
|
|
@ -289,10 +289,10 @@ export class TaskContextMenuInnerComponent implements AfterViewInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const isConfirmBeforeTaskDelete =
|
||||
this._globalConfigService.cfg()?.tasks?.isConfirmBeforeTaskDelete ?? true;
|
||||
const isConfirmBeforeDelete =
|
||||
this._globalConfigService.cfg()?.tasks?.isConfirmBeforeDelete ?? true;
|
||||
|
||||
if (isConfirmBeforeTaskDelete) {
|
||||
if (isConfirmBeforeDelete) {
|
||||
this._matDialog
|
||||
.open(DialogConfirmComponent, {
|
||||
data: {
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ export class TaskComponent implements OnDestroy, AfterViewInit {
|
|||
}
|
||||
|
||||
const isConfirmBeforeTaskDelete =
|
||||
this._configService.cfg()?.tasks?.isConfirmBeforeTaskDelete ?? true;
|
||||
this._configService.cfg()?.tasks?.isConfirmBeforeDelete ?? true;
|
||||
|
||||
if (isConfirmBeforeTaskDelete) {
|
||||
this._matDialog
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue