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

50 lines
1.1 KiB
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
2023-04-01 04:42:40 +00:00
<Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" appear>
2023-01-14 02:23:02 +00:00
<div :class="$style.root">
2023-06-11 06:38:06 +00:00
<img :class="$style.img" :src="serverErrorImageUrl" class="_ghost"/>
2023-01-14 02:23:02 +00:00
<p :class="$style.text"><i class="ti ti-alert-triangle"></i> {{ i18n.ts.somethingHappened }}</p>
2023-02-12 07:51:45 +00:00
<MkButton :class="$style.button" @click="() => emit('retry')">{{ i18n.ts.retry }}</MkButton>
2020-07-09 12:18:46 +00:00
</div>
2022-12-30 04:37:14 +00:00
</Transition>
</template>
2022-01-07 06:02:25 +00:00
<script lang="ts" setup>
import MkButton from '@/components/MkButton.vue';
2023-09-19 07:37:43 +00:00
import { i18n } from '@/i18n.js';
import { defaultStore } from '@/store.js';
import { serverErrorImageUrl } from '@/instance.js';
2023-02-12 07:51:45 +00:00
const emit = defineEmits<{
(ev: 'retry'): void;
}>();
</script>
2023-01-14 02:23:02 +00:00
<style lang="scss" module>
.root {
padding: 32px;
text-align: center;
align-items: center;
2023-01-14 02:23:02 +00:00
}
2023-01-14 02:23:02 +00:00
.text {
margin: 0 0 8px 0;
}
2023-01-14 02:23:02 +00:00
.button {
margin: 0 auto;
}
2020-02-08 09:35:42 +00:00
2023-01-14 02:23:02 +00:00
.img {
vertical-align: bottom;
width: 128px;
2023-01-14 02:23:02 +00:00
height: 128px;
margin-bottom: 16px;
border-radius: 16px;
}
</style>