Merge branch 'better-still-emoji' into shigusegubu
* better-still-emoji: lint & cleanup fix #935 fixed console errors, improved user-selecting, added cyantexting fix infinite loop better handling of hellthreads with mentions at bottom stylistic changes Hellthread(tm) Certified don't hide mentions for OPs mentions on same line as replies use icon instead of symbol for @ in mentions links stylistic improvements for single-line mentions proper cachin of headTailLinks, show mentions in notificaitons always moved mentions onto reply line, replies moved below post body Moved greentext to RichContent, improved how first mentions are restored, now shows mentions not uh, mention in post body
This commit is contained in:
commit
3fbf6fc5ac
21 changed files with 618 additions and 330 deletions
|
|
@ -100,7 +100,8 @@ const Status = {
|
|||
userExpanded: false,
|
||||
mediaPlaying: [],
|
||||
suspendable: true,
|
||||
error: null
|
||||
error: null,
|
||||
headTailLinks: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -141,7 +142,8 @@ const Status = {
|
|||
replyProfileLink () {
|
||||
if (this.isReply) {
|
||||
const user = this.$store.getters.findUser(this.status.in_reply_to_user_id)
|
||||
return user && user.statusnet_profile_url
|
||||
// FIXME Why user not found sometimes???
|
||||
return user ? user.statusnet_profile_url : 'NOT_FOUND'
|
||||
}
|
||||
},
|
||||
retweet () { return !!this.statusoid.retweeted_status },
|
||||
|
|
@ -166,17 +168,31 @@ const Status = {
|
|||
muteWordHits () {
|
||||
return muteWordHits(this.status, this.muteWords)
|
||||
},
|
||||
mentionsOwnLine () {
|
||||
return this.mergedConfig.mentionsOwnLine
|
||||
},
|
||||
mentions () {
|
||||
return this.status.attentions.filter(attn => {
|
||||
return attn.screen_name !== this.replyToName &&
|
||||
attn.screen_name !== this.status.user.screen_name
|
||||
}).map(attn => ({
|
||||
url: attn.statusnet_profile_url,
|
||||
content: attn.screen_name,
|
||||
userId: attn.id
|
||||
}))
|
||||
},
|
||||
alsoMentions () {
|
||||
if (!this.headTailLinks) return []
|
||||
const set = new Set(this.headTailLinks.writtenMentions.map(m => m.url))
|
||||
return this.headTailLinks.writtenMentions.filter(mention => {
|
||||
return !set.has(mention.url)
|
||||
})
|
||||
},
|
||||
hasMentions () {
|
||||
return this.mentions.length > 0
|
||||
mentionsLine () {
|
||||
return this.mentionsOwnLine ? this.mentions : this.alsoMentions
|
||||
},
|
||||
mentionsOwnLine () {
|
||||
return this.mergedConfig.mentionsOwnLine
|
||||
},
|
||||
hasMentionsLine () {
|
||||
return this.mentionsLine.length > 0
|
||||
},
|
||||
muted () {
|
||||
if (this.statusoid.user.id === this.currentUser.id) return false
|
||||
|
|
@ -343,6 +359,9 @@ const Status = {
|
|||
},
|
||||
removeMediaPlaying (id) {
|
||||
this.mediaPlaying = this.mediaPlaying.filter(mediaId => mediaId !== id)
|
||||
},
|
||||
setHeadTailLinks (headTailLinks) {
|
||||
this.headTailLinks = headTailLinks
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -353,7 +372,7 @@ const Status = {
|
|||
// Post is above screen, match its top to screen top
|
||||
window.scrollBy(0, rect.top - 100)
|
||||
} else if (rect.height >= (window.innerHeight - 50)) {
|
||||
// Post we want to see is taller than screen so match its top to screen top
|
||||
// Post we wahttp://localhost:8080/users/hj/dmsnt to see is taller than screen so match its top to screen top
|
||||
window.scrollBy(0, rect.top - 100)
|
||||
} else if (rect.bottom > window.innerHeight - 50) {
|
||||
// Post is below screen, match its bottom to screen bottom
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue