diff options
author | Martin Fischer <martin@push-f.com> | 2022-01-04 18:00:45 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2022-01-05 11:03:44 +0100 |
commit | a4c2cfb837a3f92e2c0f0b8a0bac7a6e03499640 (patch) | |
tree | c522af821c7584896998ebc74569e9a534fc5ef5 /searx/settings_defaults.py | |
parent | b38036d519c8b74d7be972e7b730b50f92fa8db4 (diff) | |
download | searxng-a4c2cfb837a3f92e2c0f0b8a0bac7a6e03499640.tar.gz searxng-a4c2cfb837a3f92e2c0f0b8a0bac7a6e03499640.zip |
[enh] change categories_as_tabs from a list to a dict
The tab icon names are currently hard coded in the templates.
This commit lets us introduce an icon property in the future, e.g:
categories_as_tabs:
general:
icon: search-outline
Diffstat (limited to 'searx/settings_defaults.py')
-rw-r--r-- | searx/settings_defaults.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/searx/settings_defaults.py b/searx/settings_defaults.py index d8e3ec693..c1154f7ff 100644 --- a/searx/settings_defaults.py +++ b/searx/settings_defaults.py @@ -20,18 +20,18 @@ OUTPUT_FORMATS = ['html', 'csv', 'json', 'rss'] LANGUAGE_CODES = ['all'] + list(l[0] for l in languages) OSCAR_STYLE = ('logicodev', 'logicodev-dark', 'pointhi') SIMPLE_STYLE = ('auto', 'light', 'dark') -CATEGORIES_AS_TABS = [ - 'general', - 'images', - 'videos', - 'news', - 'map', - 'music', - 'it', - 'science', - 'files', - 'social media', -] +CATEGORIES_AS_TABS = { + 'general': {}, + 'images': {}, + 'videos': {}, + 'news': {}, + 'map': {}, + 'music': {}, + 'it': {}, + 'science': {}, + 'files': {}, + 'social media': {}, +} STR_TO_BOOL = { '0': False, 'false': False, @@ -211,7 +211,7 @@ SCHEMA = { 'checker': { 'off_when_debug': SettingsValue(bool, True), }, - 'categories_as_tabs': SettingsValue(list, CATEGORIES_AS_TABS), + 'categories_as_tabs': SettingsValue(dict, CATEGORIES_AS_TABS), 'engines': SettingsValue(list, []), 'doi_resolvers': {}, } |