diff --git a/src/core/settings-store.ts b/src/core/settings-store.ts deleted file mode 100644 index 1fb999b..0000000 --- a/src/core/settings-store.ts +++ /dev/null @@ -1,115 +0,0 @@ - -// import { App, Plugin as ObsidianPlugin } from 'obsidian'; -// import { initialSettings } from 'src/_config/initial-settings'; -// import { PLUGIN_PRESETS, PluginPresetKey } from 'src/_config/presets/plugin-presets'; -// import { ItemTransforms } from 'src/types/transforms'; -// import { FilesFocusModeMap, Rule } from 'src/types/rules'; -// import { Log } from 'src/util/logger'; -// import { SettingsId, SettingsTabEvents } from 'src/core/setting-tab'; -// import { ErrorHelper } from 'src/util/error-helper'; - - - -// export type PluginsSettings = { -// preset: PluginPresetKey; -// rules: Rule[]; -// fileOverwrites: FilesFocusModeMap; -// transforms: ItemTransforms; -// }; - - - -// export class SettingsStore { - -// app: App; -// plugin: ObsidianPlugin; -// // tabEvents: SettingsTabEvents; -// onReload: () => void; - -// private settings: PluginsSettings; - -// constructor(app: App, plugin: ObsidianPlugin, onReload: () => void) -// { -// this.plugin = plugin; -// this.app = app; -// this.onReload = onReload; -// // this.tabEvents = { -// // onChangeSetting: this.onChange.bind(this), -// // getCurrentSetting: this.valueBuilder.bind(this) -// // }; -// } - -// private onChange(id: SettingsId, value: any) -// { -// Log.log(`settings changed: ${id} = ${value}`); - -// switch (id) -// { -// case 'PLUGIN_PRESET': -// this.settings.preset = value; -// break; -// } - -// this.save(); -// } - -// private valueBuilder(id: SettingsId): any -// { -// switch (id) -// { -// case 'PLUGIN_PRESET': -// return this.settings.preset; -// } - -// throw ErrorHelper.pluginBug(`Unknown settings id: ${id} - (migration needed?)`); -// } - -// /** -// * Loads the settings for this plugin by merging the initial settings with the -// * current user settings if any. -// */ -// async load() -// { -// Log.log('loading settings'); - -// let userData = await this.plugin.loadData(); -// this.settings = Object.assign({}, initialSettings, userData); -// } - -// /** -// * Saves the current settings to the user's vault. -// */ -// async save() -// { -// Log.log('saving settings'); - -// await this.plugin.saveData(this.settings); -// this.onReload(); -// } - -// get rules(): Rule[] -// { -// if (this.settings.preset !== 'CUSTOM') -// { -// return PLUGIN_PRESETS[this.settings.preset].rules; -// } - -// return this.settings.rules; -// } - -// get fileOverwrites(): FilesFocusModeMap -// { -// return this.settings.fileOverwrites; -// } - -// get transforms(): ItemTransforms -// { -// if (this.settings.preset !== 'CUSTOM') -// { -// return PLUGIN_PRESETS[this.settings.preset].transforms; -// } - -// return this.settings.transforms; -// } - -// } \ No newline at end of file diff --git a/src/views/settings-view.ts b/src/views/settings-view.ts index 9f29d65..54ceca6 100644 --- a/src/views/settings-view.ts +++ b/src/views/settings-view.ts @@ -119,7 +119,7 @@ export class SettingsView extends ObsidianSettingsTab { context.createSectionDivider(); - context.createSectionHeader('Support This Plugin', 'If you like this plugin and want to support it, you can buy me a coffee. :)'); + context.createSectionHeader('Support This Plugin', 'If you like this plugin and want to support it - submit a feature request, a pull request or simply buy me a little coffee :) - Thank You.'); context.createSupportLinks('iOSonntag', 'https://paypal.com/paypalme/iOSonntag/20'); }