Skip to content
This repository was archived by the owner on Jul 28, 2025. It is now read-only.

Commit af75993

Browse files
committed
Merge branch 'issue126'
2 parents 02e36ba + 1b69198 commit af75993

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Modal } from "obsidian";
2+
3+
export class DatabaseHelperCreationModal extends Modal {
4+
databaseHelperCreationModalManager: DatabaseHelperCreationModalManager;
5+
constructor() {
6+
super(app);
7+
this.databaseHelperCreationModalManager = new DatabaseHelperCreationModalManager(this);
8+
}
9+
onOpen() {
10+
const { contentEl } = this;
11+
contentEl.empty();
12+
this.databaseHelperCreationModalManager.constructUI(contentEl);
13+
}
14+
15+
onClose() {
16+
const { contentEl } = this;
17+
contentEl.empty();
18+
}
19+
}
20+
21+
export class DatabaseHelperCreationModalManager {
22+
databaseHelperCreationModal: DatabaseHelperCreationModal;
23+
constructor(
24+
databaseHelperCreationModal: DatabaseHelperCreationModal,
25+
) {
26+
this.databaseHelperCreationModal = databaseHelperCreationModal;
27+
}
28+
constructUI(containerEl: HTMLElement) {
29+
}
30+
}

src/main.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,15 @@ export default class DBFolderPlugin extends Plugin {
420420
}
421421
registerCommands() {
422422
// TODO - add command to create a new database
423+
this.addCommand({
424+
id: 'create-new-database-folder',
425+
name: 'Create a new database table',
426+
callback: () => console.log('create new database folder'),
427+
});
423428
}
424429
/**
425-
* Displays a transcluded .excalidraw image in markdown preview mode
426-
*/
430+
* Displays a transcluded .excalidraw image in markdown preview mode
431+
*/
427432
private addMarkdownPostProcessor() {
428433
const previewMode = PreviewDatabaseModeService.getInstance(this);
429434
this.registerMarkdownPostProcessor(previewMode.markdownPostProcessor);

0 commit comments

Comments
 (0)