Bring back the postinstall dialog
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
<template>
|
||||
<div class="configure-outer">
|
||||
<PostInstallDialog ref="postInstallDialog"/>
|
||||
|
||||
<div class="configure-inner" v-if="!busy">
|
||||
<div class="titlebar">
|
||||
<div style="display: flex; flex-grow: 1;">
|
||||
|
||||
@@ -9,6 +9,7 @@ import DomainsModel from '../models/DomainsModel.js';
|
||||
import ProfileModel from '../models/ProfileModel.js';
|
||||
import UpdaterModel from '../models/UpdaterModel.js';
|
||||
import ApplinkDialog from '../components/ApplinkDialog.vue';
|
||||
import PostInstallDialog from '../components/PostInstallDialog.vue';
|
||||
|
||||
const appsModel = AppsModel.create();
|
||||
const domainsModel = DomainsModel.create();
|
||||
@@ -126,6 +127,7 @@ const appProgressMessage = AppsModel.appProgressMessage;
|
||||
const updateInfo = ref({});
|
||||
|
||||
const applinkDialog = useTemplateRef('applinkDialog');
|
||||
const postInstallDialog = useTemplateRef('postInstallDialog');
|
||||
|
||||
// hook for applinks otherwise it is a link
|
||||
function openAppEdit(app, event) {
|
||||
@@ -157,11 +159,10 @@ function onOpenApp(app, event) {
|
||||
return stopEvent();
|
||||
}
|
||||
|
||||
// TODO
|
||||
// if (app.pendingPostInstallConfirmation && $scope.appPostInstallConfirm) {
|
||||
// $scope.appPostInstallConfirm.show(app);
|
||||
// return stopEvent();
|
||||
// }
|
||||
if (localStorage['confirmPostInstall_' + app.id]) {
|
||||
postInstallDialog.value.open(app, true);
|
||||
return stopEvent();
|
||||
}
|
||||
}
|
||||
|
||||
function isOperator(app) {
|
||||
@@ -242,6 +243,7 @@ onUnmounted(() => {
|
||||
<template>
|
||||
<div class="content">
|
||||
<ApplinkDialog ref="applinkDialog" @success="refreshApps()"/>
|
||||
<PostInstallDialog ref="postInstallDialog"/>
|
||||
|
||||
<h1 class="view-header">
|
||||
{{ $t('apps.title') }}
|
||||
|
||||
Reference in New Issue
Block a user