mirror of
https://github.com/maradotwebp/obsidian-avatar.git
synced 2026-07-22 07:30:24 +00:00
remove settings
This commit is contained in:
parent
c86808288e
commit
379781ee84
2 changed files with 0 additions and 27 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
export interface AvatarPluginSettings {
|
||||
mySetting: string;
|
||||
}
|
||||
|
||||
export const DEFAULT_SETTINGS: AvatarPluginSettings = {
|
||||
mySetting: 'default'
|
||||
}
|
||||
Loading…
Reference in a new issue