feat: improve handling of an invalid api url
Resolves https://kolaente.dev/vikunja/frontend/issues/1964
This commit is contained in:
parent
7c1934aad0
commit
24ad2f892d
@ -13,7 +13,7 @@
|
|||||||
<section class="content">
|
<section class="content">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="title" v-if="title">{{ title }}</h2>
|
<h2 class="title" v-if="title">{{ title }}</h2>
|
||||||
<api-config/>
|
<api-config v-if="showApiConfig"/>
|
||||||
<Message v-if="motd !== ''" class="is-hidden-tablet mb-4">
|
<Message v-if="motd !== ''" class="is-hidden-tablet mb-4">
|
||||||
{{ motd }}
|
{{ motd }}
|
||||||
</Message>
|
</Message>
|
||||||
@ -45,6 +45,12 @@ const route = useRoute()
|
|||||||
const {t} = useI18n({useScope: 'global'})
|
const {t} = useI18n({useScope: 'global'})
|
||||||
const title = computed(() => t(route.meta?.title as string || ''))
|
const title = computed(() => t(route.meta?.title as string || ''))
|
||||||
useTitle(() => title.value)
|
useTitle(() => title.value)
|
||||||
|
|
||||||
|
const {
|
||||||
|
showApiConfig = true,
|
||||||
|
} = defineProps<{
|
||||||
|
showApiConfig?: boolean
|
||||||
|
}>()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
@ -11,22 +11,20 @@
|
|||||||
<slot/>
|
<slot/>
|
||||||
</template>
|
</template>
|
||||||
<section v-else-if="error !== ''">
|
<section v-else-if="error !== ''">
|
||||||
<no-auth-wrapper>
|
<no-auth-wrapper :show-api-config="false">
|
||||||
<card>
|
<p v-if="error === ERROR_NO_API_URL">
|
||||||
<p v-if="error === ERROR_NO_API_URL">
|
{{ $t('ready.noApiUrlConfigured') }}
|
||||||
{{ $t('ready.noApiUrlConfigured') }}
|
</p>
|
||||||
|
<message variant="danger" v-else class="mb-4">
|
||||||
|
<p>
|
||||||
|
{{ $t('ready.errorOccured') }}<br/>
|
||||||
|
{{ error }}
|
||||||
</p>
|
</p>
|
||||||
<message variant="danger" v-else>
|
<p>
|
||||||
<p>
|
{{ $t('ready.checkApiUrl') }}
|
||||||
{{ $t('ready.errorOccured') }}<br/>
|
</p>
|
||||||
{{ error }}
|
</message>
|
||||||
</p>
|
<api-config :configure-open="true" @found-api="load"/>
|
||||||
<p>
|
|
||||||
{{ $t('ready.checkApiUrl') }}
|
|
||||||
</p>
|
|
||||||
</message>
|
|
||||||
<api-config :configure-open="true" @found-api="load"/>
|
|
||||||
</card>
|
|
||||||
</no-auth-wrapper>
|
</no-auth-wrapper>
|
||||||
</section>
|
</section>
|
||||||
<CustomTransition name="fade">
|
<CustomTransition name="fade">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user