use author name on note header when available.

This commit is contained in:
fiatjaf 2020-11-22 17:45:10 -03:00
parent 98ed06dd45
commit 90567674c1
1 changed files with 10 additions and 3 deletions

View File

@ -1,8 +1,8 @@
<template>
<article :class="{ours: ours}">
<div class="pubkey">
<a :href="'#/' + pubkey">{{ pubkey }}</a>
</div>
<header class="pubkey">
<a :href="'#/' + pubkey">{{ author }}</a>
</header>
<p>{{ content }}</p>
<em>
<a :href="'#/n/' + id"
@ -49,6 +49,13 @@
pubkey() {
return this.event.pubkey
},
author() {
return (
this.$store.state.petnames[this.pubkey] ||
(this.$store.state.metadata.get(this.pubkey) || {}).name ||
this.pubkey
)
},
reference() {
if (this.isFullPage && this.event.ref) {
return this.$store.state.browsing.get(this.event.ref)