mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
app: Add tags to menu and frontpage components
- Add typing information for init methods Info, Shortcut, and Menu to easily identify problems. - Update docstrings for these components. - Updates test cases to deal with tags instead of short description. - Update custom shortcuts code to read tags and ignore short description. - Update API to send tags instead of custom shortcuts. - OpenVPN special treatment of info.description in Shortcut Tests: - All unit tests pass and type checking succeeds. - All apps show icons with tags in apps and system section. - In help section cards don't show tags. - In front page, enabled apps show shortcuts with tags. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
This commit is contained in:
1 parent
196a2deb6f
commit
89bce7a344
75 files changed
+278
-318
No files matched your search
@@ -48,10 +48,10 @@ def _get_shortcut_data(shortcut):
|
||||
"""Return detailed information about a shortcut."""
|
||||
shortcut_data = {
|
||||
'name': shortcut.name,
|
||||
'short_description': shortcut.short_description,
|
||||
'description': shortcut.description,
|
||||
'icon_url': _get_icon_url(shortcut.app_id, shortcut.icon),
|
||||
'clients': copy.deepcopy(shortcut.clients),
|
||||
'tags': copy.deepcopy(shortcut.tags),
|
||||
}
|
||||
# XXX: Fix the hardcoding
|
||||
if shortcut.name.startswith('shortcut-ikiwiki-'):
|
||||
|
||||
Reference in new issue
Block a user