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('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 @@