diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/emoji-input/emoji-input.js | 8 | ||||
| -rw-r--r-- | src/components/post_status_form/post_status_form.vue | 19 | ||||
| -rw-r--r-- | src/components/status/status.vue | 1 | ||||
| -rw-r--r-- | src/components/timeline/timeline.js | 2 | ||||
| -rw-r--r-- | src/components/user_profile/user_profile.js | 2 |
5 files changed, 21 insertions, 11 deletions
diff --git a/src/components/emoji-input/emoji-input.js b/src/components/emoji-input/emoji-input.js index cd0247df..b09dc628 100644 --- a/src/components/emoji-input/emoji-input.js +++ b/src/components/emoji-input/emoji-input.js @@ -105,6 +105,7 @@ const EmojiInput = { input.elm.addEventListener('keyup', this.onKeyUp) input.elm.addEventListener('keydown', this.onKeyDown) input.elm.addEventListener('transitionend', this.onTransition) + input.elm.addEventListener('compositionupdate', this.onCompositionUpdate) }, unmounted () { const { input } = this @@ -115,6 +116,7 @@ const EmojiInput = { input.elm.removeEventListener('keyup', this.onKeyUp) input.elm.removeEventListener('keydown', this.onKeyDown) input.elm.removeEventListener('transitionend', this.onTransition) + input.elm.removeEventListener('compositionupdate', this.onCompositionUpdate) } }, methods: { @@ -225,6 +227,12 @@ const EmojiInput = { } }, onInput (e) { + this.setCaret(e) + this.$emit('input', e.target.value) + }, + onCompositionUpdate (e) { + this.setCaret(e) + this.resize() this.$emit('input', e.target.value) }, setCaret ({ target: { selectionStart } }) { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index 67cdc721..52d1b43c 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -74,6 +74,13 @@ </p> </EmojiInput> <div class="visibility-tray"> + <scope-selector + :showAll="showAllScopes" + :userDefault="userDefaultScope" + :originalScope="copyMessageScope" + :initialScope="newStatus.visibility" + :onScopeChange="changeVis"/> + <div class="text-format" v-if="postFormats.length > 1"> <label for="post-content-type" class="select"> <select id="post-content-type" v-model="newStatus.contentType" class="form-control"> @@ -84,18 +91,11 @@ <i class="icon-down-open"></i> </label> </div> - <div class="text-format" v-if="postFormats.length === 1"> + <div class="text-format" v-if="postFormats.length === 1 && postFormats[0] !== 'text/plain'"> <span class="only-format"> {{$t(`post_status.content_type["${postFormats[0]}"]`)}} </span> </div> - - <scope-selector - :showAll="showAllScopes" - :userDefault="userDefaultScope" - :originalScope="copyMessageScope" - :initialScope="newStatus.visibility" - :onScopeChange="changeVis"/> </div> </div> <poll-form @@ -170,7 +170,6 @@ .visibility-tray { display: flex; justify-content: space-between; - flex-direction: row-reverse; padding-top: 5px; } } @@ -217,7 +216,7 @@ .icon-chart-bar { cursor: pointer; } - + .error { text-align: center; diff --git a/src/components/status/status.vue b/src/components/status/status.vue index 440e1957..b16d8694 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -453,6 +453,7 @@ $status-margin: 0.75em; .status-content { font-family: var(--postFont, sans-serif); line-height: 1.4em; + white-space: pre-wrap; img, video { max-width: 100%; diff --git a/src/components/timeline/timeline.js b/src/components/timeline/timeline.js index 9dafcbd8..b1c7edf8 100644 --- a/src/components/timeline/timeline.js +++ b/src/components/timeline/timeline.js @@ -86,7 +86,7 @@ const Timeline = { if (this.newStatusCount === 0) return if (this.timeline.flushMarker !== 0) { - this.$store.commit('clearTimeline', { timeline: this.timelineName }) + this.$store.commit('clearTimeline', { timeline: this.timelineName, excludeUserId: true }) this.$store.commit('queueFlush', { timeline: this.timelineName, id: 0 }) this.fetchOlderStatuses() } else { diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index eab330e7..7eb4ed3a 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -31,6 +31,8 @@ const UserProfile = { } }, created () { + // Make sure that timelines used in this page are empty + this.cleanUp() const routeParams = this.$route.params this.load(routeParams.name || routeParams.id) }, |
