remove settings

This commit is contained in:
froehlichA 2023-03-22 22:42:43 +01:00
parent c86808288e
commit 379781ee84
2 changed files with 0 additions and 27 deletions

View file

@ -1,35 +1,15 @@
import {Plugin} from 'obsidian';
import type {AvatarPluginSettings} from "./settings";
import {DEFAULT_SETTINGS} from "./settings";
import {renderCodeBlockProcessor} from "./core/renderCodeBlockProcessor";
import AvatarView from "./components/AvatarView.svelte";
import {withCodeblockState} from "./core/stateProviders";
export class AvatarPlugin extends Plugin {
settings: AvatarPluginSettings;
async onload() {
await this.loadSettings();
this.registerMarkdownCodeBlockProcessor("avatar", renderCodeBlockProcessor(
AvatarView,
{ app: this.app, plugin: this },
withCodeblockState()
));
}
onunload() {
}
async loadSettings() {
this.settings = {
...DEFAULT_SETTINGS,
...(await this.loadData())
};
}
async saveSettings() {
await this.saveData(this.settings);
}
}

View file

@ -1,7 +0,0 @@
export interface AvatarPluginSettings {
mySetting: string;
}
export const DEFAULT_SETTINGS: AvatarPluginSettings = {
mySetting: 'default'
}