Finished guestbook and gallery. started diary

This commit is contained in:
Torsten Schulz
2024-09-27 07:40:06 +02:00
parent a2ee66c9de
commit c31be3f879
34 changed files with 2298 additions and 185 deletions

View File

@@ -0,0 +1,62 @@
<template>
<DialogWidget ref="dialog" :title="title" :icon="icon" :show-close="true" :buttons="dialogButtons" :modal="true"
:isTitleTranslated="false" width="30em" height="15em">
<div class="dialog-body">
<p>{{ message }}</p>
</div>
</DialogWidget>
</template>
<script>
import DialogWidget from "@/components/DialogWidget.vue";
export default {
name: "ChooseDialog",
components: {
DialogWidget,
},
data() {
return {
title: "Bestätigung",
message: "Sind Sie sicher?",
icon: null,
resolve: null,
};
},
methods: {
open(options = {}) {
this.title = options.title || "Bestätigung";
this.message = options.message || "Sind Sie sicher?";
this.icon = options.icon || null;
this.dialogButtons = [
{ text: this.$t("yes"), action: this.confirmYes },
{ text: this.$t("no"), action: this.confirmNo },
];
return new Promise((resolve) => {
this.resolve = resolve;
this.$refs.dialog.open();
});
},
close() {
this.$refs.dialog.close();
},
confirmYes() {
console.log('ja');
this.resolve(true);
this.close();
},
confirmNo() {
console.log('nein');
this.resolve(false);
this.close();
},
},
};
</script>
<style scoped>
.dialog-body {
padding: 20px;
text-align: center;
}
</style>