Initial working new notify - needs sprucing up but working!
This commit is contained in:
51
ayanova/src/components/gznotify.vue
Normal file
51
ayanova/src/components/gznotify.vue
Normal file
@@ -0,0 +1,51 @@
|
||||
<template>
|
||||
<!-- <v-dialog
|
||||
v-model="dialog"
|
||||
:max-width="options.width"
|
||||
:style="{ zIndex: options.zIndex }"
|
||||
@keydown.esc="cancel"
|
||||
>
|
||||
<v-card>
|
||||
<v-toolbar dark :color="options.color" dense flat>
|
||||
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
|
||||
</v-toolbar>
|
||||
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
|
||||
<v-card-actions class="pt-0">
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
|
||||
<v-btn color="grey" text @click.native="cancel">Cancel</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog> -->
|
||||
<v-snackbar v-model="snackbar">
|
||||
{{ message }}
|
||||
<v-btn
|
||||
:color="options.color"
|
||||
:timeout="options.timeout"
|
||||
text
|
||||
@click="snackbar = false"
|
||||
>
|
||||
Close
|
||||
</v-btn>
|
||||
</v-snackbar>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data: () => ({
|
||||
snackbar: false,
|
||||
message: null,
|
||||
options: {
|
||||
color: "primary",
|
||||
timeout: 3000
|
||||
}
|
||||
}),
|
||||
methods: {
|
||||
open(message, options) {
|
||||
this.snackbar = true;
|
||||
this.message = message;
|
||||
this.options = Object.assign(this.options, options);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user