logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: c8caa477d7f9d6b793ba0f75c736510f47298014
parent: 66dc72deb2b4b518ba09b984d792be57451c4bfc
Author: HJ <spam@hjkos.com>
Date:   Tue, 22 Jan 2019 21:08:28 +0000

Revert "fix reply-to tooltip being somewhat unreliable"

This reverts commit 66dc72deb2b4b518ba09b984d792be57451c4bfc

Diffstat:

Msrc/components/status/status.js20+-------------------
Msrc/components/status/status.vue12++++++------
Msrc/services/entity_normalizer/entity_normalizer.service.js8--------
3 files changed, 7 insertions(+), 33 deletions(-)

diff --git a/src/components/status/status.js b/src/components/status/status.js @@ -73,16 +73,6 @@ const Status = { return (this.$store.state.config.hideAttachments && !this.inConversation) || (this.$store.state.config.hideAttachmentsInConv && this.inConversation) }, - userProfileLink () { - return this.generateUserProfileLink(this.status.user.id, this.status.user.screen_name) - }, - replyProfileLink () { - if (this.isReply) { - return this.generateUserProfileLink(this.status.in_reply_to_status_id, this.replyToName) - } else { - return '' - } - }, retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name }, retweeterHtml () { return this.statusoid.user.name_html }, @@ -129,14 +119,6 @@ const Status = { isReply () { return !!this.status.in_reply_to_status_id }, - replyToName () { - const user = this.$store.state.users.usersObject[this.status.in_reply_to_user_id] - if (user) { - return user.screen_name - } else { - return this.status.in_reply_to_screen_name || '' - } - }, hideReply () { if (this.$store.state.config.replyVisibility === 'all') { return false @@ -295,7 +277,7 @@ const Status = { replyLeave () { this.showPreview = false }, - generateUserProfileLink (id, name) { + userProfileLink (id, name) { return generateProfileLink(id, name, this.$store.state.instance.restrictedNicknames) } }, diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -3,7 +3,7 @@ <template v-if="muted && !noReplyLinks"> <div class="media status container muted"> <small> - <router-link :to="userProfileLink"> + <router-link :to="userProfileLink(status.user.id, status.user.screen_name)"> {{status.user.screen_name}} </router-link> </small> @@ -38,16 +38,16 @@ <h4 class="user-name" v-if="status.user.name_html" v-html="status.user.name_html"></h4> <h4 class="user-name" v-else>{{status.user.name}}</h4> <span class="links"> - <router-link :to="userProfileLink"> + <router-link :to="userProfileLink(status.user.id, status.user.screen_name)"> {{status.user.screen_name}} </router-link> - <span v-if="isReply" class="faint reply-info"> + <span v-if="status.in_reply_to_screen_name" class="faint reply-info"> <i class="icon-right-open"></i> - <router-link :to="replyProfileLink"> - {{replyToName}} + <router-link :to="userProfileLink(status.in_reply_to_user_id, status.in_reply_to_screen_name)"> + {{status.in_reply_to_screen_name}} </router-link> </span> - <a v-if="isReply && !noReplyLinks" href="#" @click.prevent="gotoOriginal(status.in_reply_to_status_id)" :aria-label="$t('tool_tip.reply')"> + <a v-if="isReply && !noReplyLinks" href="#" @click.prevent="gotoOriginal(status.in_reply_to_status_id)" :title="$t('tool_tip.reply')"> <i class="button-icon icon-reply" @mouseenter="replyEnter(status.in_reply_to_status_id, $event)" @mouseout="replyLeave()"></i> </a> </span> diff --git a/src/services/entity_normalizer/entity_normalizer.service.js b/src/services/entity_normalizer/entity_normalizer.service.js @@ -211,14 +211,6 @@ export const parseStatus = (data) => { output.visibility = data.visibility output.created_at = new Date(data.created_at) - // Converting to string, the right way. - output.in_reply_to_status_id = output.in_reply_to_status_id - ? String(output.in_reply_to_status_id) - : null - output.in_reply_to_user_id = output.in_reply_to_user_id - ? String(output.in_reply_to_user_id) - : null - output.user = parseUser(masto ? data.account : data.user) output.attentions = ((masto ? data.mentions : data.attentions) || []).map(parseUser)