mirror of
https://github.com/khoj-ai/khoj.git
synced 2025-02-17 08:04:21 +00:00
Convert results count setting to slider in plugin settings pane
This commit is contained in:
parent
4e1abd1b72
commit
1c813a6884
1 changed files with 5 additions and 4 deletions
|
@ -42,11 +42,12 @@ export class KhojSettingTab extends PluginSettingTab {
|
|||
new Setting(containerEl)
|
||||
.setName('Results Count')
|
||||
.setDesc('The number of search results to show')
|
||||
.addText(text => text
|
||||
.setPlaceholder('6')
|
||||
.setValue(`${this.plugin.settings.resultsCount}`)
|
||||
.addSlider(slider => slider
|
||||
.setLimits(1, 10, 1)
|
||||
.setValue(this.plugin.settings.resultsCount)
|
||||
.setDynamicTooltip()
|
||||
.onChange(async (value) => {
|
||||
this.plugin.settings.resultsCount = parseInt(value);
|
||||
this.plugin.settings.resultsCount = value;
|
||||
await this.plugin.saveSettings();
|
||||
}));
|
||||
let indexVaultSetting = new Setting(containerEl);
|
||||
|
|
Loading…
Add table
Reference in a new issue