Speed up app install dialog opening by not refetching domain list
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user