This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed
commands/addDatabaseHelper Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments