mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
frontpage: Read custom shortcuts from multiple locations
Read from /etc/plinth, /usr/share/plinth and /var/lib/plinth. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
1 parent
4263f9e2c8
commit
5b579ff06d
3 files changed
+20
-15
No files matched your search
@@ -40,9 +40,7 @@ def get_shortcuts_as_json(username=None):
|
||||
for shortcut in frontpage.Shortcut.list(username)
|
||||
if shortcut.component_id and shortcut.is_enabled()
|
||||
]
|
||||
custom_shortcuts = frontpage.get_custom_shortcuts()
|
||||
if custom_shortcuts:
|
||||
shortcuts += custom_shortcuts['shortcuts']
|
||||
shortcuts += frontpage.get_custom_shortcuts()['shortcuts']
|
||||
return {'shortcuts': shortcuts}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user