mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 18:12:21 +02:00
[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
This commit is contained in:
parent
b38036d519
commit
a4c2cfb837
7 changed files with 40 additions and 38 deletions
|
@ -272,7 +272,7 @@ class EnginesSetting(SwitchableSetting):
|
|||
transformed_choices = []
|
||||
for engine_name, engine in self.choices.items(): # pylint: disable=no-member,access-member-before-definition
|
||||
for category in engine.categories:
|
||||
if not category in settings['categories_as_tabs'] + [OTHER_CATEGORY]:
|
||||
if not category in list(settings['categories_as_tabs'].keys()) + [OTHER_CATEGORY]:
|
||||
continue
|
||||
transformed_choice = {}
|
||||
transformed_choice['default_on'] = not engine.disabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue