Skip to content

Commit

Permalink
feat: remove ErrorDialog and replace with HelpDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
berntpopp committed Mar 21, 2024
1 parent e051ec6 commit dee7456
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 34 deletions.
34 changes: 0 additions & 34 deletions src/components/ErrorDialog.vue

This file was deleted.

60 changes: 60 additions & 0 deletions src/components/HelpDialog.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!-- components/HelpDialog.vue -->
<template>
<v-dialog
width="auto"
v-model="dialog"
>
<v-card :style="cardStyle">
<v-card-title :style="titleStyle">
{{ title }}
</v-card-title>
<!-- Use a div instead of v-card-text to avoid the warning and still render HTML -->
<div v-html="content" class="v-card-text" :style="contentStyle">
</div>
<v-card-actions>
<v-spacer />
<v-btn color="primary" elevation="0" @click="dialog = false">Ok</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>

<script>
export default {
name: "HelpDialog",

props: {
title: {
type: String,
default: '',
},
content: {
type: String,
default: '',
},
config: {
type: Object,
default: () => ({}),
},
},
data () {
return {
dialog: false,
}
},
computed: {
cardStyle() {
return this.config.cardStyle || { padding: '10px 0' };
},
titleStyle() {
return this.config.titleStyle || { fontFamily: 'google-sans, sans-serif', fontSize: '24px' };
},
contentStyle() {
// You can define default styles or pull them from config
return this.config.contentStyle || {};
},
},
methods: {
},
};
</script>

0 comments on commit dee7456

Please sign in to comment.