mirror of
https://github.com/onlyworlds/obsidian-plugin.git
synced 2026-07-22 11:00:31 +00:00
25 lines
698 B
TypeScript
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();
|
|
}
|
|
}
|