66 lines
1.4 KiB
Vue
66 lines
1.4 KiB
Vue
<template>
|
|
<div class="error-state">
|
|
<span class="icon-chip">
|
|
<Icon name="carbon:cloud-offline" size="30" />
|
|
</span>
|
|
<div class="title">{{ title || $t("voyage.error.title") }}</div>
|
|
<p class="message">{{ message || $t("voyage.error.message") }}</p>
|
|
<Button
|
|
:label="$t('voyage.error.retry')"
|
|
size="sm"
|
|
icon-before="carbon:renew"
|
|
@click="$emit('retry')"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
// Defaults to the generic voyage-load copy; callers (e.g. the map) can override
|
|
// title/message to say precisely what failed.
|
|
defineProps<{
|
|
title?: string
|
|
message?: string
|
|
}>()
|
|
|
|
defineEmits<{
|
|
retry: []
|
|
}>()
|
|
</script>
|
|
|
|
<style scoped>
|
|
.error-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 0.6rem;
|
|
text-align: center;
|
|
padding: 2rem 1rem;
|
|
}
|
|
|
|
.icon-chip {
|
|
width: 56px;
|
|
height: 56px;
|
|
border-radius: var(--radius-xl);
|
|
background: color-mix(in oklab, var(--danger) 12%, white);
|
|
color: var(--danger);
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.title {
|
|
font-family: var(--font-display);
|
|
font-weight: var(--weight-medium);
|
|
font-size: 1.6rem;
|
|
color: var(--primary-color);
|
|
line-height: 1;
|
|
}
|
|
|
|
.message {
|
|
margin: 0 0 0.3rem;
|
|
font-family: var(--font-body);
|
|
font-size: 0.85rem;
|
|
color: var(--text-muted);
|
|
max-width: 260px;
|
|
}
|
|
</style>
|