From 56c8ad9df37d6c1a697fb6cdbe7ccf56752b14c6 Mon Sep 17 00:00:00 2001 From: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com> Date: Sat, 20 Jul 2019 03:23:16 +0900 Subject: [PATCH] Improve usability of quote note by pasting url (#5196) --- src/client/app/common/scripts/post-form.ts | 3 +- .../desktop/views/components/post-form.vue | 34 +++++++++++-------- .../app/mobile/views/components/post-form.vue | 13 +++++-- 3 files changed, 32 insertions(+), 18 deletions(-) diff --git a/src/client/app/common/scripts/post-form.ts b/src/client/app/common/scripts/post-form.ts index 7cf26f65b..ff3fd0792 100644 --- a/src/client/app/common/scripts/post-form.ts +++ b/src/client/app/common/scripts/post-form.ts @@ -328,6 +328,7 @@ export default (opts) => ({ this.text = ''; this.files = []; this.poll = false; + this.quoteId = null; this.$emit('change-attached-files', this.files); }, @@ -357,7 +358,7 @@ export default (opts) => ({ const paste = e.clipboardData.getData('text'); - if (paste.startsWith(url + '/notes/')) { + if (!this.renote && !this.quoteId && paste.startsWith(url + '/notes/')) { e.preventDefault(); this.$root.dialog({ diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 39b7781a1..5ce5eba73 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -6,18 +6,18 @@ @drop.stop="onDrop" >
-
+
+ {{ $t('@.post-form.recent-tags') }}: + #{{ tag }} +
+
{{ $t('@.post-form.quote-attached') }} [x]
+ -
- {{ $t('@.post-form.recent-tags') }}: - #{{ tag }} -
-
{{ $t('@.post-form.quote-attached') }}
-
{{ $t('@.post-form.local-only-message') }}
+
{{ $t('@.post-form.local-only-message') }}
-
{{ $t('@.post-form.quote-attached') }}
@@ -140,6 +141,10 @@ export default Vue.extend({ > .preview padding 16px + > .with-quote + margin 0 0 8px 0 + color var(--primary) + > .visibleUsers margin 5px font-size 14px @@ -148,6 +153,10 @@ export default Vue.extend({ margin-right 16px color var(--text) + > .local-only + margin 0 0 8px 0 + color var(--primary) + > input z-index 1