This commit is contained in:
Simon Cambier
2022-07-14 22:05:53 +02:00
parent 7ea07e1c44
commit 19cc97224f
2 changed files with 27 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ export interface OmnisearchSettings extends WeightingSettings {
respectExcluded: boolean
ignoreDiacritics: boolean
showIndexingNotices: boolean
ribbonIcon: boolean
showShortName: boolean
CtrlJK: boolean
CtrlNP: boolean
@@ -93,6 +94,20 @@ export class SettingsTab extends PluginSettingTab {
new Setting(containerEl).setName('User Interface').setHeading()
// Show Ribbon Icon
new Setting(containerEl)
.setName('Show ribbon button')
.setDesc('Add a button on the sidebar to open the Vault search modal. Needs a restart to remove the button.')
.addToggle(toggle =>
toggle.setValue(settings.ribbonIcon).onChange(async v => {
settings.ribbonIcon = v
await saveSettings(this.plugin)
if (v) {
this.plugin.addRibbonButton()
}
}),
)
// Show notices
new Setting(containerEl)
.setName('Show indexing notices')
@@ -189,6 +204,7 @@ export const DEFAULT_SETTINGS: OmnisearchSettings = {
showIndexingNotices: false,
showShortName: false,
ribbonIcon: true,
weightBasename: 2,
weightH1: 1.5,