mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
remove api call in postinstall
This commit is contained in:
parent
7f2144fee0
commit
445f4c44a7
2 changed files with 9 additions and 3 deletions
|
@ -62,7 +62,9 @@ export default {
|
||||||
props: {
|
props: {
|
||||||
title: { type: String, required: true },
|
title: { type: String, required: true },
|
||||||
submitText: { type: String, default: null },
|
submitText: { type: String, default: null },
|
||||||
serverError: { type: String, default: '' }
|
serverError: { type: String, default: '' },
|
||||||
|
// Do not query the api (used by postinstall)
|
||||||
|
noStore: { type: Boolean, default: false }
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
|
@ -100,7 +102,7 @@ export default {
|
||||||
...mapGetters(['domains']),
|
...mapGetters(['domains']),
|
||||||
|
|
||||||
dynDnsForbiden () {
|
dynDnsForbiden () {
|
||||||
if (!this.domains) return true
|
if (!this.domains) return false
|
||||||
const dynDomains = this.fields.dynDomain.props.choices
|
const dynDomains = this.fields.dynDomain.props.choices
|
||||||
return this.domains.some(domain => {
|
return this.domains.some(domain => {
|
||||||
return dynDomains.some(dynDomain => domain.includes(dynDomain))
|
return dynDomains.some(dynDomain => domain.includes(dynDomain))
|
||||||
|
@ -137,6 +139,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
created () {
|
||||||
|
if (this.noStore) return
|
||||||
this.$store.dispatch('FETCH', { uri: 'domains' }).then(() => {
|
this.$store.dispatch('FETCH', { uri: 'domains' }).then(() => {
|
||||||
if (this.dynDnsForbiden) {
|
if (this.dynDnsForbiden) {
|
||||||
this.selected = 'domain'
|
this.selected = 'domain'
|
||||||
|
|
|
@ -17,7 +17,10 @@
|
||||||
|
|
||||||
<!-- DOMAIN SETUP STEP -->
|
<!-- DOMAIN SETUP STEP -->
|
||||||
<template v-else-if="step === 'domain'">
|
<template v-else-if="step === 'domain'">
|
||||||
<domain-form :title="$t('postinstall_set_domain')" :submit-text="$t('next')" @submit="setDomain">
|
<domain-form
|
||||||
|
:title="$t('postinstall_set_domain')" :submit-text="$t('next')"
|
||||||
|
no-store @submit="setDomain"
|
||||||
|
>
|
||||||
<template #disclaimer>
|
<template #disclaimer>
|
||||||
<b-alert variant="warning" show v-t="'postinstall_domain'" />
|
<b-alert variant="warning" show v-t="'postinstall_domain'" />
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Add table
Reference in a new issue