2019-01-01 22:03:30 +00:00
|
|
|
<template lang="pug">
|
|
|
|
v-dialog(v-model='isShown', max-width='550')
|
2020-03-22 22:58:27 +00:00
|
|
|
v-card
|
2019-01-01 22:03:30 +00:00
|
|
|
.dialog-header.is-short.is-red
|
2019-09-08 16:01:17 +00:00
|
|
|
v-icon.mr-2(color='white') mdi-alert
|
2019-06-15 21:05:56 +00:00
|
|
|
span {{$t('editor:unsaved.title')}}
|
2019-09-08 16:01:17 +00:00
|
|
|
v-card-text.pt-4
|
2019-06-15 21:05:56 +00:00
|
|
|
.body-2 {{$t('editor:unsaved.body')}}
|
2019-01-01 22:03:30 +00:00
|
|
|
v-card-chin
|
|
|
|
v-spacer
|
2019-09-08 16:01:17 +00:00
|
|
|
v-btn(text, @click='isShown = false') {{$t('common:actions.cancel')}}
|
|
|
|
v-btn.px-4(color='red', @click='discard', dark) {{$t('common:actions.discardChanges')}}
|
2019-01-01 22:03:30 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
value: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return { }
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
isShown: {
|
|
|
|
get() { return this.value },
|
|
|
|
set(val) { this.$emit('input', val) }
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
async discard() {
|
|
|
|
this.isShown = false
|
|
|
|
this.$emit('discard', true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|