From bdafa7bb973d6e429dd621c523fbf05c9b097360 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 9 Jan 2023 11:46:05 +0800 Subject: [PATCH 1/2] Some updates to settings display - Create clickable link to search page - Create clickable link to api page - Move date formatting into advanced settings --- src/main.ts | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/main.ts b/src/main.ts index a3911f9..9452711 100644 --- a/src/main.ts +++ b/src/main.ts @@ -320,7 +320,11 @@ class OmnivoreSettingTab extends PluginSettingTab { new Setting(generalSettings) .setName("API Key") - .setDesc("You can create an API key at https://omnivore.app/settings/api") + .setDesc( + OmnivoreSettingTab.createFragmentWithHTML( + "You can create an API key at https://omnivore.app/settings/api" + ) + ) .addText((text) => text .setPlaceholder("Enter your Omnivore Api Key") @@ -349,7 +353,9 @@ class OmnivoreSettingTab extends PluginSettingTab { new Setting(generalSettings) .setName("Custom query") .setDesc( - "See https://omnivore.app/help/search for more info on search query syntax" + OmnivoreSettingTab.createFragmentWithHTML( + "See https://omnivore.app/help/search for more info on search query syntax" + ) ) .addText((text) => text @@ -397,7 +403,7 @@ class OmnivoreSettingTab extends PluginSettingTab { .setName("Template") .setDesc( OmnivoreSettingTab.createFragmentWithHTML( - `Enter the template. Link to reference` + `Enter template to render articles with. Reference` ) ) .addTextArea((text) => @@ -439,6 +445,15 @@ class OmnivoreSettingTab extends PluginSettingTab { }); }); + containerEl.createEl("h3", { + cls: "collapsible", + text: "Advanced Settings", + }); + + const advancedSettings = containerEl.createEl("div", { + cls: "content", + }); + new Setting(generalSettings) .setName("Date Format") .setDesc( @@ -456,15 +471,6 @@ class OmnivoreSettingTab extends PluginSettingTab { }) ); - containerEl.createEl("h3", { - cls: "collapsible", - text: "Advanced Settings", - }); - - const advancedSettings = containerEl.createEl("div", { - cls: "content", - }); - new Setting(advancedSettings) .setName("API Endpoint") .setDesc("Enter the Omnivore server's API endpoint") From e364b29bfd86136eee9e2aed222d66515ce03356 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Mon, 9 Jan 2023 11:51:53 +0800 Subject: [PATCH 2/2] Make the resync command a little more clear --- src/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 9452711..a7c8990 100644 --- a/src/main.ts +++ b/src/main.ts @@ -110,7 +110,7 @@ export default class OmnivorePlugin extends Plugin { this.addCommand({ id: "obsidian-omnivore-resync", - name: "Resync", + name: "Resync all articles", callback: () => { this.settings.syncAt = ""; this.saveSettings();