onlyworlds_obsidian-plugin/Modals/WorldCopyModal.ts
2024-08-18 15:36:28 +02:00

25 lines
698 B
TypeScript

import { Modal, App } from 'obsidian';
export class WorldCopyModal extends Modal {
worldName: string;
constructor(app: App, worldName: string) {
super(app);
this.worldName = worldName;
}
onOpen() {
let { contentEl } = this;
contentEl.createEl('h3', { text: `Copied ${this.worldName}` });
contentEl.createEl('p', {
text: `Copied ${this.worldName} to clipboard and to World Data file`
});
contentEl.createEl('button', { text: 'OK', type: 'button' }, (button) => {
button.onclick = () => this.close();
});
}
onClose() {
this.contentEl.empty();
}
}