Moved recency setting

This commit is contained in:
Simon Cambier
2025-02-17 07:47:09 +01:00
parent 0be76a4804
commit 3d7932e580
3 changed files with 41 additions and 36 deletions

View File

@@ -3,7 +3,6 @@ import type { OmnisearchSettings } from './utils'
import { saveSettings } from './utils'
import { htmlDescription, needsARestart } from './utils'
import type OmnisearchPlugin from 'src/main'
import { RecencyCutoff } from 'src/globals'
import { getCtrlKeyLabel } from 'src/tools/utils'
export function injectSettingsBehavior(
@@ -53,26 +52,6 @@ export function injectSettingsBehavior(
})
)
new Setting(containerEl)
.setName('Recency boost (experimental)')
.setDesc(
'Files that have been modified more recently than [selected cutoff] are given a higher rank.'
)
.addDropdown(dropdown =>
dropdown
.addOptions({
[RecencyCutoff.Disabled]: 'Disabled',
[RecencyCutoff.Day]: '24 hours',
[RecencyCutoff.Week]: '7 days',
[RecencyCutoff.Month]: '30 days',
})
.setValue(settings.recencyBoost)
.onChange(async v => {
settings.recencyBoost = v as RecencyCutoff
await saveSettings(plugin)
})
)
// Downranked files
new Setting(containerEl)
.setName('Folders to downrank in search results')