forked from cybrespace/pinafore
fix GNU Social / Pleroma compat
This commit is contained in:
parent
d12b39963b
commit
013bc02d23
|
@ -31,7 +31,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="account-profile-note">
|
<div class="account-profile-note">
|
||||||
{{{profile.note}}}
|
{{{massagedNote}}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -187,7 +187,15 @@
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
computed: {
|
computed: {
|
||||||
headerIsMissing: (profile) => profile.header.endsWith('missing.png')
|
headerIsMissing: (profile) => profile.header.endsWith('missing.png'),
|
||||||
|
note: (profile) => profile.note,
|
||||||
|
massagedNote: (note) => {
|
||||||
|
// GNU Social / Pleroma don't add <p> tags
|
||||||
|
if (!note.startsWith('<p>')) {
|
||||||
|
note = `<p>${note}</p>`
|
||||||
|
}
|
||||||
|
return note
|
||||||
|
}
|
||||||
},
|
},
|
||||||
store: () => store,
|
store: () => store,
|
||||||
components: {
|
components: {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class="status-content {{isStatusInOwnThread ? 'status-in-own-thread' : ''}} {{isStatusInNotification ? 'status-in-notification' : ''}}"
|
class="status-content {{isStatusInOwnThread ? 'status-in-own-thread' : ''}} {{isStatusInNotification ? 'status-in-notification' : ''}}"
|
||||||
ref:node
|
ref:node
|
||||||
>
|
>
|
||||||
{{{emojifiedContent}}}
|
{{{massagedContent}}}
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
.status-content {
|
.status-content {
|
||||||
|
@ -66,8 +66,9 @@
|
||||||
},
|
},
|
||||||
store: () => store,
|
store: () => store,
|
||||||
computed: {
|
computed: {
|
||||||
emojifiedContent: (status, $autoplayGifs) => {
|
massagedContent: (status, $autoplayGifs) => {
|
||||||
let content = status.content
|
let content = status.content
|
||||||
|
// emojify
|
||||||
if (status.emojis && status.emojis.length) {
|
if (status.emojis && status.emojis.length) {
|
||||||
for (let emoji of status.emojis) {
|
for (let emoji of status.emojis) {
|
||||||
let { shortcode, url, static_url } = emoji
|
let { shortcode, url, static_url } = emoji
|
||||||
|
@ -81,6 +82,10 @@
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// GNU Social and Pleroma don't add <p> tags
|
||||||
|
if (!content.startsWith('<p>')) {
|
||||||
|
content = `<p>${content}</p>`
|
||||||
|
}
|
||||||
return content
|
return content
|
||||||
},
|
},
|
||||||
statusId: (status) => status.id
|
statusId: (status) => status.id
|
||||||
|
|
Loading…
Reference in New Issue