Sunil Mohan Adapa 0881dae665
jsxc: Allow disabling the app
Closes: #1872.

Previously, JSXC can't be disabled and it's shortcut appears on the homepage
forever. Use the EnableState component which stores a flag in the sqlite
database to maintain the status of app being enabled.

Tests:

- Enable/disable button appears. Enabling/disabling the app updates the status
currently.

- Enabling the app shows icon on the homepage and disabling removes it.

- Enabling shows the menu item in the apps page as enabled. Disabling shows the
menu item in the apps page as disabled.

- It is possible the uninstall the app. When app is uninstall it is removed from
homepage and shows as disabled in the apps page.

- When app is disabled or uninstalled, trying to visit the
/plinth/apps/jsxc/jsxc/ throws a 404 error.

- Run functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[jvalleroy: Enable JSXC for Ejabberd test]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2022-08-29 21:06:54 -04:00
..