cuizin/cuizin/js_src/components/ErrorDialog.vue

34 lines
849 B
Vue
Raw Normal View History

2018-03-04 23:37:10 +01:00
<template>
<v-dialog v-if="error" v-model="error" max-width="500px">
<v-card>
2018-03-06 18:29:37 +01:00
<v-card-title class="headline">{{ $t('error.title') }}</v-card-title>
2018-03-04 23:37:10 +01:00
<v-card-text>
{{ description }} {{ value.message }}.
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
2018-03-06 18:29:37 +01:00
<v-btn color="secondary" flat @click.stop="error=null">{{ $t('misc.cancel') }}</v-btn>
2018-03-04 23:37:10 +01:00
</v-card-actions>
</v-card>
</v-dialog>
</template>
<script>
export default {
props: {
description: String,
value: [Error, Boolean],
},
computed: {
error: {
get() {
return this.value;
},
set(val) {
this.$emit('input', val);
},
},
},
};
</script>