diff --git a/src/web/app/common/tags/post-menu.tag b/src/web/app/common/tags/post-menu.tag index 92b2801f5..2ca8c9602 100644 --- a/src/web/app/common/tags/post-menu.tag +++ b/src/web/app/common/tags/post-menu.tag @@ -119,7 +119,7 @@ post_id: this.post.id }).then(() => { if (this.opts.cb) this.opts.cb('pinned', '%i18n:common.tags.mk-post-menu.pinned%'); - this.unmount(); + this.$destroy(); }); }; @@ -130,7 +130,7 @@ category: category }).then(() => { if (this.opts.cb) this.opts.cb('categorized', '%i18n:common.tags.mk-post-menu.categorized%'); - this.unmount(); + this.$destroy(); }); }; @@ -150,7 +150,7 @@ scale: 0.5, duration: 200, easing: 'easeInBack', - complete: () => this.unmount() + complete: () => this.$destroy() }); }; diff --git a/src/web/app/common/tags/reaction-picker.vue b/src/web/app/common/tags/reaction-picker.vue index 415737208..496144d88 100644 --- a/src/web/app/common/tags/reaction-picker.vue +++ b/src/web/app/common/tags/reaction-picker.vue @@ -74,41 +74,28 @@ }, onMouseout: function(e) { this.title = placeholder; + }, + close: function() { + this.$refs.backdrop.style.pointerEvents = 'none'; + anime({ + targets: this.$refs.backdrop, + opacity: 0, + duration: 200, + easing: 'linear' + }); + + this.$refs.popover.style.pointerEvents = 'none'; + anime({ + targets: this.$refs.popover, + opacity: 0, + scale: 0.5, + duration: 200, + easing: 'easeInBack', + complete: () => this.$destroy() + }); } } }; - - this.mixin('api'); - - this.post = this.opts.post; - this.source = this.opts.source; - - this.on('mount', () => { - }); - - this.react = reaction => { - - }; - - this.close = () => { - this.$refs.backdrop.style.pointerEvents = 'none'; - anime({ - targets: this.$refs.backdrop, - opacity: 0, - duration: 200, - easing: 'linear' - }); - - this.$refs.popover.style.pointerEvents = 'none'; - anime({ - targets: this.$refs.popover, - opacity: 0, - scale: 0.5, - duration: 200, - easing: 'easeInBack', - complete: () => this.unmount() - }); - }; diff --git a/src/web/app/desktop/tags/contextmenu.tag b/src/web/app/desktop/tags/contextmenu.tag index 2a3b2a772..ade44fce2 100644 --- a/src/web/app/desktop/tags/contextmenu.tag +++ b/src/web/app/desktop/tags/contextmenu.tag @@ -132,7 +132,7 @@ }); this.trigger('closed'); - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/desktop/tags/detailed-post-window.tag b/src/web/app/desktop/tags/detailed-post-window.tag index 93df377c4..6d6f23ac3 100644 --- a/src/web/app/desktop/tags/detailed-post-window.tag +++ b/src/web/app/desktop/tags/detailed-post-window.tag @@ -69,7 +69,7 @@ opacity: 0, duration: 300, easing: 'linear', - complete: () => this.unmount() + complete: () => this.$destroy() }); }; diff --git a/src/web/app/desktop/tags/dialog.tag b/src/web/app/desktop/tags/dialog.tag index 9299e9733..aff855251 100644 --- a/src/web/app/desktop/tags/dialog.tag +++ b/src/web/app/desktop/tags/dialog.tag @@ -130,7 +130,7 @@ scale: 0.8, duration: 300, easing: [ 0.5, -0.5, 1, 0.5 ], - complete: () => this.unmount() + complete: () => this.$destroy() }); }; diff --git a/src/web/app/desktop/tags/donation.tag b/src/web/app/desktop/tags/donation.tag index b2d18d445..73ee9d003 100644 --- a/src/web/app/desktop/tags/donation.tag +++ b/src/web/app/desktop/tags/donation.tag @@ -60,7 +60,7 @@ show_donation: false }); - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/desktop/tags/drive/base-contextmenu.tag b/src/web/app/desktop/tags/drive/base-contextmenu.tag index eb97ccccc..d2381cc47 100644 --- a/src/web/app/desktop/tags/drive/base-contextmenu.tag +++ b/src/web/app/desktop/tags/drive/base-contextmenu.tag @@ -18,7 +18,7 @@ this.on('mount', () => { this.$refs.ctx.on('closed', () => { this.trigger('closed'); - this.unmount(); + this.$destroy(); }); }); diff --git a/src/web/app/desktop/tags/drive/browser-window.tag b/src/web/app/desktop/tags/drive/browser-window.tag index 01cb4b1af..f49921eb6 100644 --- a/src/web/app/desktop/tags/drive/browser-window.tag +++ b/src/web/app/desktop/tags/drive/browser-window.tag @@ -43,7 +43,7 @@ this.on('mount', () => { this.$refs.window.on('closed', () => { - this.unmount(); + this.$destroy(); }); this.api('drive').then(info => { diff --git a/src/web/app/desktop/tags/drive/file-contextmenu.tag b/src/web/app/desktop/tags/drive/file-contextmenu.tag index 25721372b..bb934d35e 100644 --- a/src/web/app/desktop/tags/drive/file-contextmenu.tag +++ b/src/web/app/desktop/tags/drive/file-contextmenu.tag @@ -50,7 +50,7 @@ this.on('mount', () => { this.$refs.ctx.on('closed', () => { this.trigger('closed'); - this.unmount(); + this.$destroy(); }); }); diff --git a/src/web/app/desktop/tags/drive/folder-contextmenu.tag b/src/web/app/desktop/tags/drive/folder-contextmenu.tag index d424482fa..43cad3da5 100644 --- a/src/web/app/desktop/tags/drive/folder-contextmenu.tag +++ b/src/web/app/desktop/tags/drive/folder-contextmenu.tag @@ -30,7 +30,7 @@ this.$refs.ctx.on('closed', () => { this.trigger('closed'); - this.unmount(); + this.$destroy(); }); }; diff --git a/src/web/app/desktop/tags/following-setuper.tag b/src/web/app/desktop/tags/following-setuper.tag index 828098629..d8cd32a20 100644 --- a/src/web/app/desktop/tags/following-setuper.tag +++ b/src/web/app/desktop/tags/following-setuper.tag @@ -163,7 +163,7 @@ }; this.close = () => { - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/desktop/tags/images.tag b/src/web/app/desktop/tags/images.tag index dcd664e72..8c4234a0f 100644 --- a/src/web/app/desktop/tags/images.tag +++ b/src/web/app/desktop/tags/images.tag @@ -165,7 +165,7 @@ opacity: 0, duration: 100, easing: 'linear', - complete: () => this.unmount() + complete: () => this.$destroy() }); }; diff --git a/src/web/app/desktop/tags/input-dialog.tag b/src/web/app/desktop/tags/input-dialog.tag index bea8c2c22..1eef25db1 100644 --- a/src/web/app/desktop/tags/input-dialog.tag +++ b/src/web/app/desktop/tags/input-dialog.tag @@ -142,7 +142,7 @@ }); this.$refs.window.on('closed', () => { - this.unmount(); + this.$destroy(); }); }); diff --git a/src/web/app/desktop/tags/messaging/room-window.tag b/src/web/app/desktop/tags/messaging/room-window.tag index bae456200..39afbe6dd 100644 --- a/src/web/app/desktop/tags/messaging/room-window.tag +++ b/src/web/app/desktop/tags/messaging/room-window.tag @@ -25,7 +25,7 @@ this.on('mount', () => { this.$refs.window.on('closed', () => { - this.unmount(); + this.$destroy(); }); }); diff --git a/src/web/app/desktop/tags/messaging/window.tag b/src/web/app/desktop/tags/messaging/window.tag index afe01c53e..cd756daa0 100644 --- a/src/web/app/desktop/tags/messaging/window.tag +++ b/src/web/app/desktop/tags/messaging/window.tag @@ -21,7 +21,7 @@ diff --git a/src/web/app/desktop/tags/set-banner-suggestion.tag b/src/web/app/desktop/tags/set-banner-suggestion.tag index cbf0f1b68..c5c5c7019 100644 --- a/src/web/app/desktop/tags/set-banner-suggestion.tag +++ b/src/web/app/desktop/tags/set-banner-suggestion.tag @@ -42,7 +42,7 @@ this.close = e => { e.preventDefault(); e.stopPropagation(); - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/desktop/tags/settings-window.tag b/src/web/app/desktop/tags/settings-window.tag index e68a44a4f..09566b898 100644 --- a/src/web/app/desktop/tags/settings-window.tag +++ b/src/web/app/desktop/tags/settings-window.tag @@ -19,7 +19,7 @@ diff --git a/src/web/app/mobile/tags/drive-folder-selector.tag b/src/web/app/mobile/tags/drive-folder-selector.tag index 37d571d73..6a0cb5cea 100644 --- a/src/web/app/mobile/tags/drive-folder-selector.tag +++ b/src/web/app/mobile/tags/drive-folder-selector.tag @@ -58,12 +58,12 @@ diff --git a/src/web/app/mobile/tags/drive-selector.tag b/src/web/app/mobile/tags/drive-selector.tag index ab67cc80c..9e6f6a045 100644 --- a/src/web/app/mobile/tags/drive-selector.tag +++ b/src/web/app/mobile/tags/drive-selector.tag @@ -71,18 +71,18 @@ this.$refs.browser.on('selected', file => { this.trigger('selected', file); - this.unmount(); + this.$destroy(); }); }); this.cancel = () => { this.trigger('canceled'); - this.unmount(); + this.$destroy(); }; this.ok = () => { this.trigger('selected', this.files); - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/mobile/tags/init-following.tag b/src/web/app/mobile/tags/init-following.tag index d2d19a887..d7e31b460 100644 --- a/src/web/app/mobile/tags/init-following.tag +++ b/src/web/app/mobile/tags/init-following.tag @@ -124,7 +124,7 @@ }; this.close = () => { - this.unmount(); + this.$destroy(); }; diff --git a/src/web/app/mobile/tags/notify.tag b/src/web/app/mobile/tags/notify.tag index 2dfc2dddb..386166f7f 100644 --- a/src/web/app/mobile/tags/notify.tag +++ b/src/web/app/mobile/tags/notify.tag @@ -32,7 +32,7 @@ bottom: '-64px', duration: 500, easing: 'easeOutQuad', - complete: () => this.unmount() + complete: () => this.$destroy() }); }, 6000); }); diff --git a/src/web/app/mobile/tags/post-form.tag b/src/web/app/mobile/tags/post-form.tag index 442919100..6f0794753 100644 --- a/src/web/app/mobile/tags/post-form.tag +++ b/src/web/app/mobile/tags/post-form.tag @@ -255,7 +255,7 @@ poll: this.poll ? this.$refs.poll.get() : undefined }).then(data => { this.trigger('post'); - this.unmount(); + this.$destroy(); }).catch(err => { this.update({ wait: false @@ -265,7 +265,7 @@ this.cancel = () => { this.trigger('cancel'); - this.unmount(); + this.$destroy(); }; this.kao = () => {