Use dashboard domain as default and not [0]
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
|
||||
import { ref, onMounted, computed } from 'vue';
|
||||
import { ref, onMounted, computed, inject } from 'vue';
|
||||
import { Button, SingleSelect, InputGroup, FormGroup, TextInput, Checkbox } from '@cloudron/pankow';
|
||||
import { isValidDomain } from '@cloudron/pankow/utils';
|
||||
import { ISTATES } from '../../constants.js';
|
||||
@@ -13,6 +13,7 @@ const props = defineProps([ 'app' ]);
|
||||
const appsModel = AppsModel.create();
|
||||
const domainsModel = DomainsModel.create();
|
||||
|
||||
const dashboardDomain = inject('dashboardDomain');
|
||||
const domains = ref([]);
|
||||
const busy = ref(false);
|
||||
const errorMessage = ref('');
|
||||
@@ -38,7 +39,7 @@ function isNoopOrManual(domain) {
|
||||
|
||||
function onAddAlias() {
|
||||
aliases.value.push({
|
||||
domain: domains.value[0].domain,
|
||||
domain: dashboardDomain.value,
|
||||
subdomain: ''
|
||||
});
|
||||
}
|
||||
@@ -49,7 +50,7 @@ function onRemoveAlias(index) {
|
||||
|
||||
function onAddRedirect() {
|
||||
redirects.value.push({
|
||||
domain: domains.value[0].domain,
|
||||
domain: dashboardDomain.value,
|
||||
subdomain: ''
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user