Skip to content

Commit

Permalink
Merge pull request #5 from omnivore-app/fix/settings-text
Browse files Browse the repository at this point in the history
Some updates to settings display
  • Loading branch information
sywhb authored Jan 9, 2023
2 parents f2cbf0a + e364b29 commit dffa4c3
Showing 1 changed file with 19 additions and 13 deletions.
32 changes: 19 additions & 13 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,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();
Expand Down Expand Up @@ -318,7 +318,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 <a href='https://omnivore.app/settings/api'>https://omnivore.app/settings/api</a>"
)
)
.addText((text) =>
text
.setPlaceholder("Enter your Omnivore Api Key")
Expand Down Expand Up @@ -347,7 +351,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 <a href='https://omnivore.app/help/search'>https://omnivore.app/help/search</a> for more info on search query syntax"
)
)
.addText((text) =>
text
Expand Down Expand Up @@ -395,7 +401,7 @@ class OmnivoreSettingTab extends PluginSettingTab {
.setName("Template")
.setDesc(
OmnivoreSettingTab.createFragmentWithHTML(
`Enter the template. <a href="https://github.com/janl/mustache.js/#templates">Link to reference</a>`
`Enter template to render articles with. <a href="https://github.com/janl/mustache.js/#templates">Reference</a>`
)
)
.addTextArea((text) =>
Expand Down Expand Up @@ -437,6 +443,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(
Expand All @@ -454,15 +469,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")
Expand Down

0 comments on commit dffa4c3

Please sign in to comment.