mirror of
https://github.com/tailormade-eu/obsidian-task-export-plugin.git
synced 2026-07-22 06:41:42 +00:00
refactor: Standardize task export command and setting names to lowercase
This commit is contained in:
parent
12f39a7bba
commit
3ae738b61a
3 changed files with 10 additions and 15 deletions
9
main.js
9
main.js
|
|
@ -53,7 +53,6 @@ var TaskExportSettingTab = class extends import_obsidian.PluginSettingTab {
|
|||
display() {
|
||||
const { containerEl } = this;
|
||||
containerEl.empty();
|
||||
new import_obsidian.Setting(containerEl).setName("Task Export Tool Settings").setHeading();
|
||||
new import_obsidian.Setting(containerEl).setName("Output path").setDesc("CSV file location (relative to vault root)").addText((text) => text.setPlaceholder("outstanding_tasks.csv").setValue(this.plugin.settings.outputPath).onChange((value) => {
|
||||
this.plugin.settings.outputPath = value || "outstanding_tasks.csv";
|
||||
void this.plugin.saveSettings();
|
||||
|
|
@ -449,19 +448,19 @@ var TaskExportPlugin = class extends import_obsidian3.Plugin {
|
|||
this.settings.debounceDelay,
|
||||
this.settings.customersFolder
|
||||
);
|
||||
this.addRibbonIcon("file-text", "Export Outstanding Tasks", async () => {
|
||||
this.addRibbonIcon("file-text", "Export outstanding tasks", async () => {
|
||||
await this.exportTasks();
|
||||
});
|
||||
this.addCommand({
|
||||
id: "export-tasks",
|
||||
name: "Export Outstanding Tasks",
|
||||
name: "Export outstanding tasks",
|
||||
callback: async () => {
|
||||
await this.exportTasks();
|
||||
}
|
||||
});
|
||||
this.addCommand({
|
||||
id: "toggle-auto-export",
|
||||
name: "Toggle Auto-Export",
|
||||
name: "Toggle auto-export",
|
||||
callback: async () => {
|
||||
this.settings.autoExport = !this.settings.autoExport;
|
||||
await this.saveSettings();
|
||||
|
|
@ -472,7 +471,7 @@ var TaskExportPlugin = class extends import_obsidian3.Plugin {
|
|||
});
|
||||
this.addCommand({
|
||||
id: "open-settings",
|
||||
name: "Open Export Settings",
|
||||
name: "Open export settings",
|
||||
callback: () => {
|
||||
this.app.setting.open();
|
||||
this.app.setting.openTabById(this.manifest.id);
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ export default class TaskExportPlugin extends Plugin {
|
|||
);
|
||||
|
||||
// Add ribbon icon
|
||||
this.addRibbonIcon('file-text', 'Export Outstanding Tasks', async () => {
|
||||
this.addRibbonIcon('file-text', 'Export outstanding tasks', async () => {
|
||||
await this.exportTasks();
|
||||
});
|
||||
|
||||
// Add command: Export Outstanding Tasks
|
||||
this.addCommand({
|
||||
id: 'export-tasks',
|
||||
name: 'Export Outstanding Tasks',
|
||||
name: 'Export outstanding tasks',
|
||||
callback: async () => {
|
||||
await this.exportTasks();
|
||||
}
|
||||
|
|
@ -45,7 +45,7 @@ export default class TaskExportPlugin extends Plugin {
|
|||
// Add command: Toggle Auto-Export
|
||||
this.addCommand({
|
||||
id: 'toggle-auto-export',
|
||||
name: 'Toggle Auto-Export',
|
||||
name: 'Toggle auto-export',
|
||||
callback: async () => {
|
||||
this.settings.autoExport = !this.settings.autoExport;
|
||||
await this.saveSettings();
|
||||
|
|
@ -59,7 +59,7 @@ export default class TaskExportPlugin extends Plugin {
|
|||
// Add command: Open Export Settings
|
||||
this.addCommand({
|
||||
id: 'open-settings',
|
||||
name: 'Open Export Settings',
|
||||
name: 'Open export settings',
|
||||
callback: () => {
|
||||
// @ts-ignore - accessing private API
|
||||
this.app.setting.open();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { PluginSettingTab, Setting } from 'obsidian';
|
||||
import { App, PluginSettingTab, Setting } from 'obsidian';
|
||||
import TaskExportPlugin from './main';
|
||||
|
||||
/**
|
||||
|
|
@ -7,7 +7,7 @@ import TaskExportPlugin from './main';
|
|||
export class TaskExportSettingTab extends PluginSettingTab {
|
||||
plugin: TaskExportPlugin;
|
||||
|
||||
constructor(app: any, plugin: TaskExportPlugin) {
|
||||
constructor(app: App, plugin: TaskExportPlugin) {
|
||||
super(app, plugin);
|
||||
this.plugin = plugin;
|
||||
}
|
||||
|
|
@ -17,10 +17,6 @@ export class TaskExportSettingTab extends PluginSettingTab {
|
|||
|
||||
containerEl.empty();
|
||||
|
||||
new Setting(containerEl)
|
||||
.setName('Task Export Tool Settings')
|
||||
.setHeading();
|
||||
|
||||
// Output Path
|
||||
new Setting(containerEl)
|
||||
.setName('Output path')
|
||||
|
|
|
|||
Loading…
Reference in a new issue