Add software info on hover (#194)

Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk>
Reviewed-on: AkkomaGang/pleroma-fe#194
This commit is contained in:
floatingghost 2022-11-06 22:52:25 +00:00
parent 15bac1e401
commit 3286641f3c
3 changed files with 14 additions and 0 deletions

View file

@ -460,6 +460,16 @@ const Status = {
return 'globe'
}
},
faviconAlt (status) {
if (!status.user.instance) {
return ''
}
const software = ((status.user.instance) && (status.user.instance.nodeinfo) && (status.user.instance.nodeinfo.software)) || {}
if (software.name) {
return `${status.user.instance.name} (${software.name || ''} ${software.version || ''})`
}
return ''
},
showError (error) {
this.error = error
},

View file

@ -177,6 +177,7 @@
v-if="!!(status.user && status.user.favicon)"
class="status-favicon"
:src="status.user.favicon"
:title="faviconAlt(status)"
>
</div>

View file

@ -88,6 +88,9 @@ export const parseUser = (data) => {
output.friends_count = data.following_count
output.bot = data.bot
if (data.akkoma) {
output.instance = data.akkoma.instance
}
if (data.pleroma) {
const relationship = data.pleroma.relationship