From ddbd0cb55ebc9139f893f1d231960fe7bb7fb438 Mon Sep 17 00:00:00 2001 From: Unarray <48868686+Unarray@users.noreply.github.com> Date: Thu, 24 Aug 2023 10:20:42 +0200 Subject: [PATCH] Register settings tab --- src/FileTreeGenerator.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/FileTreeGenerator.ts b/src/FileTreeGenerator.ts index 4e4e60f..da54f0c 100644 --- a/src/FileTreeGenerator.ts +++ b/src/FileTreeGenerator.ts @@ -1,4 +1,5 @@ import { GenerateTree } from "#/commands/GenerateTree"; +import { SettingsTab } from "#/settings"; import type { App, Command, PluginManifest } from "obsidian"; import { Plugin } from "obsidian"; @@ -20,11 +21,16 @@ export default class FileTreeGenerator extends Plugin { } - onload(): void { + onload = async(): Promise => { this.addCommands( new GenerateTree() ); - } + + const settingsTab = new SettingsTab(this); + + await settingsTab.loadSettings(); + this.addSettingTab(settingsTab); + }; public addCommands = (...commands: Command[]): void => { for (const command of commands) {