From 7c9fb5228b2436c0505c4b857864ef31672f75dc Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 13 Nov 2018 15:01:05 +0900 Subject: [PATCH] Improve usability --- .../app/common/views/widgets/photo-stream.vue | 23 +++++++++++-- .../app/desktop/views/widgets/post-form.vue | 32 ++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/src/client/app/common/views/widgets/photo-stream.vue b/src/client/app/common/views/widgets/photo-stream.vue index 72658707c..202633a3f 100644 --- a/src/client/app/common/views/widgets/photo-stream.vue +++ b/src/client/app/common/views/widgets/photo-stream.vue @@ -5,7 +5,13 @@

{{ $t('@.loading') }}

-
+

{{ $t('no-photos') }}

@@ -31,6 +37,7 @@ export default define({ connection: null }; }, + mounted() { this.connection = this.$root.stream.useSharedConnection('main'); @@ -44,9 +51,11 @@ export default define({ this.fetching = false; }); }, + beforeDestroy() { this.connection.dispose(); }, + methods: { onDriveFileCreated(file) { if (/^image\/.+$/.test(file.type)) { @@ -54,6 +63,7 @@ export default define({ if (this.images.length > 9) this.images.pop(); } }, + func() { if (this.props.design == 2) { this.props.design = 0; @@ -62,7 +72,16 @@ export default define({ } this.save(); - } + }, + + onDragstart(file, e) { + e.dataTransfer.effectAllowed = 'move'; + e.dataTransfer.setData('mk_drive_file', JSON.stringify(file)); + }, + + onDragend(e) { + this.browser.isDragSource = false; + }, } }); diff --git a/src/client/app/desktop/views/widgets/post-form.vue b/src/client/app/desktop/views/widgets/post-form.vue index 2e382dbe6..36cf30bbe 100644 --- a/src/client/app/desktop/views/widgets/post-form.vue +++ b/src/client/app/desktop/views/widgets/post-form.vue @@ -3,7 +3,10 @@ -
+