wip
This commit is contained in:
		
							parent
							
								
									07efc8e150
								
							
						
					
					
						commit
						1a6a72591f
					
				|  | @ -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() | ||||
| 			}); | ||||
| 		}; | ||||
| 	</script> | ||||
|  |  | |||
|  | @ -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() | ||||
| 		}); | ||||
| 	}; | ||||
| </script> | ||||
| 
 | ||||
| <mk-reaction-picker> | ||||
|  |  | |||
|  | @ -132,7 +132,7 @@ | |||
| 			}); | ||||
| 
 | ||||
| 			this.trigger('closed'); | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-contextmenu> | ||||
|  |  | |||
|  | @ -69,7 +69,7 @@ | |||
| 				opacity: 0, | ||||
| 				duration: 300, | ||||
| 				easing: 'linear', | ||||
| 				complete: () => this.unmount() | ||||
| 				complete: () => this.$destroy() | ||||
| 			}); | ||||
| 		}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -130,7 +130,7 @@ | |||
| 				scale: 0.8, | ||||
| 				duration: 300, | ||||
| 				easing: [ 0.5, -0.5, 1, 0.5 ], | ||||
| 				complete: () => this.unmount() | ||||
| 				complete: () => this.$destroy() | ||||
| 			}); | ||||
| 		}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -60,7 +60,7 @@ | |||
| 				show_donation: false | ||||
| 			}); | ||||
| 
 | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-donation> | ||||
|  |  | |||
|  | @ -18,7 +18,7 @@ | |||
| 		this.on('mount', () => { | ||||
| 			this.$refs.ctx.on('closed', () => { | ||||
| 				this.trigger('closed'); | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -43,7 +43,7 @@ | |||
| 
 | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 
 | ||||
| 			this.api('drive').then(info => { | ||||
|  |  | |||
|  | @ -50,7 +50,7 @@ | |||
| 		this.on('mount', () => { | ||||
| 			this.$refs.ctx.on('closed', () => { | ||||
| 				this.trigger('closed'); | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -30,7 +30,7 @@ | |||
| 
 | ||||
| 			this.$refs.ctx.on('closed', () => { | ||||
| 				this.trigger('closed'); | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}; | ||||
| 
 | ||||
|  |  | |||
|  | @ -163,7 +163,7 @@ | |||
| 		}; | ||||
| 
 | ||||
| 		this.close = () => { | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-following-setuper> | ||||
|  |  | |||
|  | @ -165,7 +165,7 @@ | |||
| 				opacity: 0, | ||||
| 				duration: 100, | ||||
| 				easing: 'linear', | ||||
| 				complete: () => this.unmount() | ||||
| 				complete: () => this.$destroy() | ||||
| 			}); | ||||
| 		}; | ||||
| 	</script> | ||||
|  |  | |||
|  | @ -142,7 +142,7 @@ | |||
| 			}); | ||||
| 
 | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -25,7 +25,7 @@ | |||
| 
 | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 	</script> | ||||
|  |  | |||
|  | @ -21,7 +21,7 @@ | |||
| 	<script> | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 
 | ||||
| 			this.$refs.window.refs.index.on('navigate-user', user => { | ||||
|  |  | |||
|  | @ -45,7 +45,7 @@ | |||
| 			this.$refs.window.refs.form.focus(); | ||||
| 
 | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 
 | ||||
| 			this.$refs.window.refs.form.on('post', () => { | ||||
|  |  | |||
|  | @ -79,7 +79,7 @@ | |||
| 
 | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -36,7 +36,7 @@ | |||
| 			document.addEventListener('keydown', this.onDocumentKeydown); | ||||
| 
 | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -153,7 +153,7 @@ | |||
| 			}); | ||||
| 
 | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -96,7 +96,7 @@ | |||
| 
 | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ | |||
| 		this.close = e => { | ||||
| 			e.preventDefault(); | ||||
| 			e.stopPropagation(); | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-set-avatar-suggestion> | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ | |||
| 		this.close = e => { | ||||
| 			e.preventDefault(); | ||||
| 			e.stopPropagation(); | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-set-banner-suggestion> | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ | |||
| 	<script> | ||||
| 		this.on('mount', () => { | ||||
| 			this.$refs.window.on('closed', () => { | ||||
| 				this.unmount(); | ||||
| 				this.$destroy(); | ||||
| 			}); | ||||
| 		}); | ||||
| 
 | ||||
|  |  | |||
|  | @ -888,7 +888,7 @@ | |||
| 					translateY: -64, | ||||
| 					duration: 500, | ||||
| 					easing: 'easeInElastic', | ||||
| 					complete: () => this.unmount() | ||||
| 					complete: () => this.$destroy() | ||||
| 				}); | ||||
| 			}, 6000); | ||||
| 		}); | ||||
|  |  | |||
|  | @ -142,7 +142,7 @@ | |||
| 				'margin-top': '-8px', | ||||
| 				duration: 200, | ||||
| 				easing: 'easeOutQuad', | ||||
| 				complete: () => this.unmount() | ||||
| 				complete: () => this.$destroy() | ||||
| 			}); | ||||
| 		}; | ||||
| 	</script> | ||||
|  |  | |||
|  | @ -58,12 +58,12 @@ | |||
| 	<script> | ||||
| 		this.cancel = () => { | ||||
| 			this.trigger('canceled'); | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 
 | ||||
| 		this.ok = () => { | ||||
| 			this.trigger('selected', this.$refs.browser.folder); | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-drive-folder-selector> | ||||
|  |  | |||
|  | @ -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(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-drive-selector> | ||||
|  |  | |||
|  | @ -124,7 +124,7 @@ | |||
| 		}; | ||||
| 
 | ||||
| 		this.close = () => { | ||||
| 			this.unmount(); | ||||
| 			this.$destroy(); | ||||
| 		}; | ||||
| 	</script> | ||||
| </mk-init-following> | ||||
|  |  | |||
|  | @ -32,7 +32,7 @@ | |||
| 					bottom: '-64px', | ||||
| 					duration: 500, | ||||
| 					easing: 'easeOutQuad', | ||||
| 					complete: () => this.unmount() | ||||
| 					complete: () => this.$destroy() | ||||
| 				}); | ||||
| 			}, 6000); | ||||
| 		}); | ||||
|  |  | |||
|  | @ -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 = () => { | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue