Skip to content

Commit

Permalink
Adds complete past events plugin setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lynchjames committed Nov 6, 2020
1 parent 02ee97d commit a9b945f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/settings-tab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,23 @@ import DayPlanner from './main';
this.plugin.saveData(this.plugin.settings);
}));

new Setting(containerEl)
.setName('Complete past planner items')
.setDesc('Mark checkboxes for tasks and breaks in the past as completed')
.addToggle(toggle =>
toggle
.setValue(this.plugin.settings.completePastItems)
.onChange((value:boolean) => {
this.plugin.settings.completePastItems = value;
this.plugin.saveData(this.plugin.settings);
}));

new Setting(containerEl)
.setName('Mermaid Gantt')
.setDesc('Include a mermaid gantt chart generated for the day planner')
.addToggle(toggle =>
toggle
.setValue(this.plugin.settings.mermaid || false)
.setValue(this.plugin.settings.mermaid)
.onChange((value:boolean) => {
this.plugin.settings.mermaid = value;
this.plugin.saveData(this.plugin.settings);
Expand Down
1 change: 1 addition & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export class DayPlannerSettings {
mode: DayPlannerMode = DayPlannerMode.File;
mermaid: boolean = false;
notesToDates: NoteForDate[] = [];
completePastItems: boolean = true;
}

export class NoteForDate {
Expand Down

0 comments on commit a9b945f

Please sign in to comment.