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

16
main.ts
View File

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