Sunil Mohan Adapa 8b7c0fb0bf
uninstall: Fix issue with uninstall of apps that have no backup
Closes: #2342.

- Define a helper method to figure if app has backup. Use the helper method in
main AppView.

- Minor refactor of repeated code in uninstall view that gets the app and
app_id.

- Pass whether an app has backup or not into form. Delete backup related form
fields when backup is not supported. UX when fields are disabled is not nice, it
is not explained why fields are disabled. Better UX seems to be to remove the
backup fields entirely.

Tests:

- Install wireguard. In the uninstall form backup fields don't appear. Uninstall
is successful.

- Install Bepasty. In the uninstall form back fields are shown. Uninstall is
successful with and without a backup. In case backup is chosen, backup is
created and can successfully be restored.

- Run functional tests for bepasty. For wireguard uninstall test succeeds.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2023-05-06 07:08:06 -04:00
..
2023-04-24 21:47:11 -04:00
2022-08-29 08:28:44 -04:00