apps: Separate enabled and disabled apps

- Add 'secondary' flag to menu items.

- Mark apps as 'secondary' when disabled.

- Extend TemplateView for apps index.

- Add card-container for disabled apps.

Closes #1309

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2019-05-07 16:57:55 -07:00
1 parent fe16bf4d26
commit 893bd2b4d6
27 files changed
+295 -103

No files matched your search

+7 -1
View File
@@ -18,7 +18,6 @@
FreedomBox app to configure matrix-synapse server.
"""
import json
import logging
import os
@@ -83,6 +82,7 @@ def init():
disable=disable)
if is_enabled():
add_shortcut()
menu.promote_item('matrixsynapse:index')
def setup(helper, old_version=None):
@@ -99,6 +99,8 @@ def setup(helper, old_version=None):
['post-install'])
helper.call('post', service.notify_enabled, None, True)
helper.call('post', add_shortcut)
menu = main_menu.get('apps')
helper.call('post', menu.promote_item, 'matrixsynapse:index')
def add_shortcut():
@@ -123,12 +125,16 @@ def enable():
"""Enable the module."""
actions.superuser_run('matrixsynapse', ['enable'])
add_shortcut()
menu = main_menu.get('apps')
menu.promote_item('matrixsynapse:index')
def disable():
"""Enable the module."""
actions.superuser_run('matrixsynapse', ['disable'])
frontpage.remove_shortcut('matrixsynapse')
menu = main_menu.get('apps')
menu.demote_item('matrixsynapse:index')
def diagnose():