diff --git a/lib/Controller/ExAppsPageController.php b/lib/Controller/ExAppsPageController.php
index 4d45e09a..d2682977 100644
--- a/lib/Controller/ExAppsPageController.php
+++ b/lib/Controller/ExAppsPageController.php
@@ -472,7 +472,7 @@ public function updateApp(string $appId): JSONResponse {
}
/**
- * Unregister ExApp, remove container and volume by default
+ * Unregister ExApp, remove container by default
*/
#[PasswordConfirmationRequired]
public function uninstallApp(string $appId, bool $removeContainer = true, bool $removeData = false): JSONResponse {
diff --git a/src/components/Apps/AppDetails.vue b/src/components/Apps/AppDetails.vue
index 7e3be1ee..ffae9d39 100644
--- a/src/components/Apps/AppDetails.vue
+++ b/src/components/Apps/AppDetails.vue
@@ -14,7 +14,7 @@
type="button"
:value="t('settings', 'Remove')"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible"
- @click="remove(app.id)">
+ @click="remove(app.id, removeData)">
+
+ {{ t('settings', 'Delete data on remove') }}
+
@@ -100,6 +106,7 @@
@@ -155,6 +181,7 @@ export default {
&-manage {
// if too many, shrink them and ellipsis
display: flex;
+ flex-wrap: wrap;
input {
flex: 0 1 auto;
min-width: 0;
diff --git a/src/components/Apps/AppItem.vue b/src/components/Apps/AppItem.vue
index 67751672..f2b85b3b 100644
--- a/src/components/Apps/AppItem.vue
+++ b/src/components/Apps/AppItem.vue
@@ -79,7 +79,7 @@
class="uninstall"
type="tertiary"
:disabled="installing || isLoading || !defaultDeployDaemonAccessible"
- @click.stop="remove(app.id)">
+ @click.stop="remove(app.id, removeData)">
{{ t('settings', 'Remove') }}
{ rebuildNavigation() })
.catch((error) => { showError(error) })
},
- remove(appId) {
- this.$store.dispatch('uninstallApp', { appId })
+ remove(appId, removeData) {
+ this.$store.dispatch('uninstallApp', { appId, removeData })
.then((response) => { rebuildNavigation() })
.catch((error) => { showError(error) })
},
diff --git a/src/store/apps.js b/src/store/apps.js
index 46389f06..5223c67c 100644
--- a/src/store/apps.js
+++ b/src/store/apps.js
@@ -295,10 +295,10 @@ const actions = {
}).catch((error) => context.commit('API_FAILURE', { appId, error }))
},
- uninstallApp(context, { appId }) {
+ uninstallApp(context, { appId, removeData }) {
return api.requireAdmin().then((response) => {
context.commit('startLoading', appId)
- return api.get(generateUrl(`/apps/app_api/apps/uninstall/${appId}`))
+ return api.get(generateUrl(`/apps/app_api/apps/uninstall/${appId}?removeData=${removeData}`))
.then((response) => {
context.commit('stopLoading', appId)
context.commit('uninstallApp', appId)