Registration and activation
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
<DialogWidget
|
||||
ref="dialog"
|
||||
title="dataPrivacy.title"
|
||||
isTitleTranslated=true
|
||||
:isTitleTranslated=true
|
||||
icon="privacy24.png"
|
||||
:show-close="true"
|
||||
:show-close=true
|
||||
:buttons="[{ text: 'Ok' }]"
|
||||
:modal="false"
|
||||
:modal=false
|
||||
@close="closeDialog"
|
||||
@ok="handleOk"
|
||||
>
|
||||
|
||||
52
frontend/src/dialogues/standard/ErrorDialog.vue
Normal file
52
frontend/src/dialogues/standard/ErrorDialog.vue
Normal file
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<DialogWidget ref="dialog" title="error.title" :show-close="true" :buttons="buttons" :modal="true" width="25em"
|
||||
height="15em" name="ErrorDialog" :isTitleTranslated=true>
|
||||
<div class="error-content">
|
||||
<p>{{ translatedErrorMessage }}</p>
|
||||
</div>
|
||||
</DialogWidget>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DialogWidget from '@/components/DialogWidget.vue';
|
||||
|
||||
export default {
|
||||
name: 'ErrorDialog',
|
||||
components: {
|
||||
DialogWidget,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
errorMessage: '',
|
||||
buttons: [
|
||||
{ text: 'error.close', action: 'close' }
|
||||
]
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
translatedErrorMessage() {
|
||||
if (this.errorMessage.startsWith('tr:')) {
|
||||
return this.$t(this.errorMessage.substring(3));
|
||||
}
|
||||
return this.errorMessage;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(message) {
|
||||
this.errorMessage = message;
|
||||
this.$refs.dialog.open();
|
||||
},
|
||||
close() {
|
||||
this.$refs.dialog.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.error-content {
|
||||
padding: 1em;
|
||||
color: red;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -2,11 +2,11 @@
|
||||
<DialogWidget
|
||||
ref="dialog"
|
||||
title="imprint.title"
|
||||
isTitleTranslated=true
|
||||
:isTitleTranslated=true
|
||||
icon="imprint24.png"
|
||||
:show-close="true"
|
||||
:buttons="[{ text: 'Ok' }]"
|
||||
:modal="false"
|
||||
:modal=false
|
||||
@close="closeDialog"
|
||||
@ok="handleOk"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user