Speed up app install dialog opening by not refetching domain list

This commit is contained in:
Johannes Zellner
2025-09-30 12:04:58 +02:00
parent d4262e9fdc
commit 56c2b8798c
2 changed files with 15 additions and 8 deletions
@@ -6,7 +6,6 @@ import { Button, Dialog, SingleSelect, FormGroup, TextInput, InputGroup } from '
import { prettyDate, prettyBinarySize, isValidDomain } from '@cloudron/pankow/utils';
import AccessControl from './AccessControl.vue';
import PortBindings from './PortBindings.vue';
import DomainsModel from '../models/DomainsModel.js';
import AppsModel from '../models/AppsModel.js';
import DashboardModel from '../models/DashboardModel.js';
import { PROXY_APP_ID, ACL_OPTIONS } from '../constants.js';
@@ -16,7 +15,6 @@ const STEP = Object.freeze({
INSTALL: Symbol('install'),
});
const domainsModel = DomainsModel.create();
const appsModel = AppsModel.create();
const dashboardModel = DashboardModel.create();
@@ -167,7 +165,7 @@ function onScreenshotNext() {
}
defineExpose({
open: async function(a, appCountExceeded) {
open: async function(a, appCountExceeded, domainList) {
busy.value = false;
step.value = STEP.DETAILS;
app.value = a;
@@ -179,10 +177,7 @@ defineExpose({
domainProvider.value = '';
upstreamUri.value = '';
const [error, result] = await domainsModel.list();
if (error) return console.error(error);
domains.value = result;
domains.value = domainList;
// preselect with dashboard domain
domain.value = (domains.value.find(d => d.domain === dashboardDomain.value) || domains.value[0]).domain;