Preselect dashboard domain in app installation
This commit is contained in:
@@ -66,6 +66,7 @@ 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';
|
||||
|
||||
const API_ORIGIN = import.meta.env.VITE_API_ORIGIN ? import.meta.env.VITE_API_ORIGIN : window.location.origin;
|
||||
|
||||
@@ -76,6 +77,7 @@ const STEP = Object.freeze({
|
||||
|
||||
const domainsModel = DomainsModel.create(API_ORIGIN, localStorage.token);
|
||||
const appsModel = AppsModel.create(API_ORIGIN, localStorage.token);
|
||||
const dashboardModel = DashboardModel.create(API_ORIGIN, localStorage.token);
|
||||
|
||||
// reactive
|
||||
const busy = ref(false);
|
||||
@@ -141,9 +143,10 @@ async function submit() {
|
||||
|
||||
onMounted(async () => {
|
||||
domains.value = await domainsModel.list();
|
||||
const config = await dashboardModel.getConfig();
|
||||
|
||||
// TODO pre-select the adminDomain
|
||||
domain.value = domains.value[0].domain;
|
||||
// preselect with dashboard domain
|
||||
domain.value = config.adminDomain || domains.value[0].domain;
|
||||
});
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user