-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds checkbox chars settings for task stats
- Loading branch information
Showing
3 changed files
with
63 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import BelyalovCommanderPlugin from "./BelyalovCommanderPlugin.ts"; | ||
import { App, PluginSettingTab, Setting } from "obsidian"; | ||
|
||
export class BelyalovCommanderSettingTab extends PluginSettingTab { | ||
override plugin: BelyalovCommanderPlugin; | ||
|
||
constructor(app: App, plugin: BelyalovCommanderPlugin) { | ||
super(app, plugin); | ||
this.plugin = plugin; | ||
} | ||
|
||
display(): void { | ||
let { containerEl } = this; | ||
|
||
containerEl.empty(); | ||
|
||
containerEl.createEl("h1", { text: "You need to reload plugin after setting change", "cls": "notice" }); | ||
|
||
new Setting(containerEl) | ||
.setName("Unfinished tasks characters") | ||
.setDesc("a string of characters used in checkboxes for unfinished tasks") | ||
.addText((text) => | ||
text | ||
.setPlaceholder("") | ||
.setValue(this.plugin.settings.unfinishedChars) | ||
.onChange(async (value) => { | ||
this.plugin.settings.unfinishedChars = value; | ||
await this.plugin.saveSettings(); | ||
}) | ||
); | ||
} | ||
} |