diff --git a/dashboard/src/components/AppInstallDialog.vue b/dashboard/src/components/AppInstallDialog.vue index 6415f9c76..032db1fa2 100644 --- a/dashboard/src/components/AppInstallDialog.vue +++ b/dashboard/src/components/AppInstallDialog.vue @@ -99,10 +99,11 @@ async function submit() { if (manifest.value.id === PROXY_APP_ID) config.upstreamUri = upstreamUri.value; - const [error] = await appsModel.install(manifest.value, config); + const [error, result] = await appsModel.install(manifest.value, config); if (!error) { dialog.value.close(); + localStorage['confirmPostInstall_' + result.id] = true; return window.location.href = '#/apps'; } diff --git a/dashboard/src/components/PostInstallDialog.vue b/dashboard/src/components/PostInstallDialog.vue new file mode 100644 index 000000000..d4f112901 --- /dev/null +++ b/dashboard/src/components/PostInstallDialog.vue @@ -0,0 +1,99 @@ + + + + + diff --git a/dashboard/src/models/AppsModel.js b/dashboard/src/models/AppsModel.js index 40c18f5ef..6a4ea5668 100644 --- a/dashboard/src/models/AppsModel.js +++ b/dashboard/src/models/AppsModel.js @@ -184,7 +184,7 @@ function create() { if (result.status !== 202) return [result]; - return [null]; + return [null, result.body]; }, async list() { let error, result; diff --git a/dashboard/src/views/AppConfigureView.vue b/dashboard/src/views/AppConfigureView.vue index 3719bded4..e83145243 100644 --- a/dashboard/src/views/AppConfigureView.vue +++ b/dashboard/src/views/AppConfigureView.vue @@ -4,8 +4,9 @@ import { useI18n } from 'vue-i18n'; const i18n = useI18n(); const t = i18n.t; -import { ref, onMounted, onBeforeUnmount, computed } from 'vue'; +import { ref, onMounted, onBeforeUnmount, computed, useTemplateRef } from 'vue'; import { Button, ButtonGroup } from 'pankow'; +import PostInstallDialog from '../components/PostInstallDialog.vue'; import Access from '../components/app/Access.vue'; import Backups from '../components/app/Backups.vue'; import Cron from '../components/app/Cron.vue'; @@ -41,6 +42,7 @@ const hasLocalStorage = ref(false); const hasOptionalServices = ref(false); const hasEmail = ref(false); const busyStopTask = ref(false); +const postInstallDialog = useTemplateRef('postInstallDialog'); const isAppStopped = computed(() => { return appsModel.isStopped(app.value); @@ -91,7 +93,7 @@ async function refresh() { if (result.manifest?.postInstallMessage) { infoMenu.value.push({ label: t('app.firstTimeSetupAction'), - // TODO action + action: () => postInstallDialog.value.open(app.value), }); } @@ -165,6 +167,8 @@ onBeforeUnmount(() => {