implements single URL archiving

This commit is contained in:
msramalho
2024-10-30 15:58:57 +00:00
parent bf151ff92e
commit 42fa376f7d
12 changed files with 594 additions and 59 deletions

View File

@@ -0,0 +1,57 @@
<template>
<v-snackbar v-model="visible" :timeout="timeout" :top="top" :bottom="bottom" close-on-content-click>
{{ message }}
<template v-slot:actions>
<v-btn :color="color" variant="text" @click="visible = false">
Close
</v-btn>
</template>
</v-snackbar>
</template>
<script>
export default {
name: 'MySnackBar',
props: {
message: {
type: String,
required: true
},
timeout: {
type: Number,
default: 3000
},
color: {
type: String,
default: 'orange'
},
top: {
type: Boolean,
default: false
},
bottom: {
type: Boolean,
default: true
},
show: {
type: Boolean,
required: true
}
},
data() {
return {
visible: this.show
};
},
watch: {
show(val) {
this.visible = val;
},
visible(val) {
if (!val) {
this.$emit('update:show', false);
}
}
}
};
</script>