Sharkey/packages/frontend/src/components/global/MkError.vue

43 lines
884 B
Vue
Raw Normal View History

<template>
2022-12-29 20:52:40 -08:00
<Transition :name="$store.state.animation ? '_transition_zoom' : ''" appear>
2023-01-13 18:23:02 -08:00
<div :class="$style.root">
<img :class="$style.img" src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<p :class="$style.text"><i class="ti ti-alert-triangle"></i> {{ i18n.ts.somethingHappened }}</p>
2023-02-11 23:51:45 -08:00
<MkButton :class="$style.button" @click="() => emit('retry')">{{ i18n.ts.retry }}</MkButton>
2020-07-09 05:18:46 -07:00
</div>
2022-12-29 20:37:14 -08:00
</Transition>
</template>
2022-01-06 22:02:25 -08:00
<script lang="ts" setup>
import MkButton from '@/components/MkButton.vue';
2022-07-20 06:24:26 -07:00
import { i18n } from '@/i18n';
2023-02-11 23:51:45 -08:00
const emit = defineEmits<{
(ev: 'retry'): void;
}>();
</script>
2023-01-13 18:23:02 -08:00
<style lang="scss" module>
.root {
padding: 32px;
text-align: center;
align-items: center;
2023-01-13 18:23:02 -08:00
}
2023-01-13 18:23:02 -08:00
.text {
margin: 0 0 8px 0;
}
2023-01-13 18:23:02 -08:00
.button {
margin: 0 auto;
}
2020-02-08 01:35:42 -08:00
2023-01-13 18:23:02 -08:00
.img {
vertical-align: bottom;
width: 128px;
2023-01-13 18:23:02 -08:00
height: 128px;
margin-bottom: 16px;
border-radius: 16px;
}
</style>