feat: improve api-config (#2444)
remove obsolet `success` (not used) Co-authored-by: Dominik Pschenitschni <mail@celement.de> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/2444 Co-authored-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de> Co-committed-by: Dominik Pschenitschni <dpschen@noreply.kolaente.de>
This commit is contained in:
parent
94d6f38e89
commit
8f25f5d353
1 changed files with 1 additions and 6 deletions
|
@ -30,10 +30,7 @@
|
||||||
<ButtonLink class="api-config__change-button" @click="() => (configureApi = true)">{{ $t('apiConfig.change') }}</ButtonLink>
|
<ButtonLink class="api-config__change-button" @click="() => (configureApi = true)">{{ $t('apiConfig.change') }}</ButtonLink>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<message variant="success" v-if="successMsg !== '' && errorMsg === ''" class="mt-2">
|
<message variant="danger" v-if="errorMsg !== ''" class="mt-2">
|
||||||
{{ successMsg }}
|
|
||||||
</message>
|
|
||||||
<message variant="danger" v-if="errorMsg !== '' && successMsg === ''" class="mt-2">
|
|
||||||
{{ errorMsg }}
|
{{ errorMsg }}
|
||||||
</message>
|
</message>
|
||||||
</div>
|
</div>
|
||||||
|
@ -74,7 +71,6 @@ watch(() => props.configureOpen, (value) => {
|
||||||
const {t} = useI18n({useScope: 'global'})
|
const {t} = useI18n({useScope: 'global'})
|
||||||
|
|
||||||
const errorMsg = ref('')
|
const errorMsg = ref('')
|
||||||
const successMsg = ref('')
|
|
||||||
|
|
||||||
async function setApiUrl() {
|
async function setApiUrl() {
|
||||||
if (apiUrl.value === '') {
|
if (apiUrl.value === '') {
|
||||||
|
@ -99,7 +95,6 @@ async function setApiUrl() {
|
||||||
emit('foundApi', apiUrl.value)
|
emit('foundApi', apiUrl.value)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Still not found, url is still invalid
|
// Still not found, url is still invalid
|
||||||
successMsg.value = ''
|
|
||||||
errorMsg.value = t('apiConfig.error', {domain: apiDomain.value})
|
errorMsg.value = t('apiConfig.error', {domain: apiDomain.value})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue