mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
searx: Simplify handling shortcut for front page
The older code is likely before the card approach was implemented and cached copy had to updated. It is no longer needed as the shortcuts are not filtered based on login required property in the template code. Tests: - When public visibility is enabled/disabled shortcut is properly shown on the frontpage. - When restarting the service the public visibility properly dictates whether shortcut is show properly. Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
147b61655b
commit
d26a6f40d0
@ -87,9 +87,7 @@ class SearxApp(app_module.App):
|
||||
|
||||
def set_shortcut_login_required(self, login_required):
|
||||
"""Change the login_required property of shortcut."""
|
||||
shortcut = self.remove('shortcut-searx')
|
||||
shortcut.login_required = login_required
|
||||
self.add(shortcut)
|
||||
self.get_component('shortcut-searx').login_required = login_required
|
||||
|
||||
def setup(self, old_version):
|
||||
"""Install and configure the app."""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user