MkError can be non-retry-able

This commit is contained in:
Johann150 2022-07-26 14:28:12 +02:00
parent 2e1385930c
commit 225b56706d
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -3,7 +3,7 @@
<div class="mjndxjcg">
<img src="https://xn--931a.moe/assets/error.jpg" class="_ghost"/>
<p><i class="fas fa-exclamation-triangle"></i> {{ i18n.ts.somethingHappened }}</p>
<MkButton class="button" @click="() => $emit('retry')">{{ i18n.ts.retry }}</MkButton>
<MkButton v-if="!final" class="button" @click="retry">{{ i18n.ts.retry }}</MkButton>
</div>
</transition>
</template>
@ -11,6 +11,16 @@
<script lang="ts" setup>
import MkButton from '@/components/ui/button.vue';
import { i18n } from '@/i18n';
const emit = defineEmits<{
(ev: 'retry'): void;
}>();
const retry = emit.bind(null, 'retry');
defineProps<{
// true if this operation can not be retried
final?: boolean;
}>();
</script>
<style lang="scss" scoped>