Small refactoring

This commit is contained in:
kitelev 2024-12-30 18:05:25 +05:00
parent cd96ed0bf2
commit 17a3bcb009
1 changed files with 9 additions and 7 deletions

10
main.ts
View File

@ -1,20 +1,22 @@
import { Notice, Plugin } from 'obsidian'; import {Notice, Plugin} from 'obsidian';
export default class ExoPlugin extends Plugin { export default class ExoPlugin extends Plugin {
async onload() { async onload() {
this.addRibbonIcon('dice', 'Exo', () => { this.addRibbonIcon('dice', 'Exo', () => {
this.showModal(); this.showNotice();
}); });
this.addCommand({ this.addCommand({
id: 'exo-first-notice', id: 'exo-first-notice',
name: 'Shows simple Notice', name: 'Shows simple Notice',
callback: () => {this.showModal()} callback: () => {
this.showNotice()
}
}) })
} }
async showModal(): Promise<void> { async showNotice(): Promise<void> {
new Notice('This is Exocortex!'); new Notice('This is Exocortex!');
} }