Skip to content

Commit

Permalink
Merge pull request #270 from Progress1/publish_confirmation
Browse files Browse the repository at this point in the history
Add confirmation to Publish button
  • Loading branch information
Progress1 authored Apr 23, 2024
2 parents 0b8a9b3 + e3e7710 commit 6d9874b
Show file tree
Hide file tree
Showing 4 changed files with 338 additions and 250 deletions.
37 changes: 37 additions & 0 deletions src/gui/src/components/common/MessageBox.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<template>
<v-overlay :dark="false" style="z-index: 10000">
<v-card class="mx-auto" outlined>
<!-- This will be generic messageBox in future. Currently support only YES-CANCEL buttons,
later we add support for buttons & icons configuration -->
<v-card-title class="justify-center">
<v-icon style="padding-right: 10px" color="blue">mdi-message-question</v-icon>
{{ title }}
</v-card-title>
<v-card-text class="font-weight-black text-center">
{{ message }}
</v-card-text>
<v-card-actions class="justify-center">
<v-btn @click.prevent="selectButton('Ok')" class="red accent-1" color="red darken-4" text>{{ $t('common.messagebox.yes') }}</v-btn>
<v-btn @click.prevent="selectButton('Cancel')" class="mx-4 justify-center">{{ $t('common.messagebox.cancel') }}</v-btn>
</v-card-actions>
</v-card>
</v-overlay>
</template>

<script>
export default {
props: {
title: String,
message: String,
},
methods: {
selectButton(buttonType) {
this.$emit('button' + buttonType);
},
}
}
</script>

<style>
</style>
Loading

0 comments on commit 6d9874b

Please sign in to comment.