Skip to content

Commit

Permalink
make onClose a proper vue event
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jul 27, 2024
1 parent 0fd5352 commit 28dc007
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
34 changes: 15 additions & 19 deletions pages/gallery/gallery-modal.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<v-dialog
v-model="opened"
v-model="modalOpened"
fullscreen
hide-overlay
transition="dialog-bottom-transition"
Expand Down Expand Up @@ -177,10 +177,6 @@ export default {
ignoreList: {
type: Array,
},
onClose: {
type: Function,
default: () => {},
},
},
data() {
return {
Expand All @@ -201,26 +197,15 @@ export default {
packs: ["classic_faithful_32x_progart"],
},
],
opened: false,
modalOpened: false,
clickedImage: "",
previewOpen: false,
};
},
watch: {
value: {
handler(n) {
this.opened = n;
},
immediate: true,
},
opened(n) {
this.$emit("input", n);
},
},
methods: {
closeModal() {
this.onClose();
this.opened = false;
this.$emit("close");
this.modalOpened = false;
},
discordIDtoName(d) {
return this.contributors[d]
Expand Down Expand Up @@ -367,5 +352,16 @@ export default {
);
},
},
watch: {
value: {
handler(n) {
this.modalOpened = n;
},
immediate: true,
},
opened(n) {
this.$emit("input", n);
},
},
};
</script>
2 changes: 1 addition & 1 deletion pages/gallery/main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
:contributors="loadedContributors"
:packToName="packToName"
:ignoreList="ignoreList"
:onClose="() => changeShareURL()"
@close="removeShareURL"
/>

<v-btn icon large @click="toTop" v-show="scrollY > 300" class="go-up-btn">
Expand Down

0 comments on commit 28dc007

Please sign in to comment.