forked from AkkomaGang/akkoma-fe
Add button to user_card
This commit is contained in:
parent
852fed047a
commit
1eb15e58bb
3 changed files with 27 additions and 2 deletions
|
@ -15,7 +15,8 @@ import {
|
|||
faRss,
|
||||
faSearchPlus,
|
||||
faExternalLinkAlt,
|
||||
faEdit
|
||||
faEdit,
|
||||
faMagnet
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
|
@ -23,7 +24,8 @@ library.add(
|
|||
faBell,
|
||||
faSearchPlus,
|
||||
faExternalLinkAlt,
|
||||
faEdit
|
||||
faEdit,
|
||||
faMagnet
|
||||
)
|
||||
|
||||
export default {
|
||||
|
@ -44,6 +46,14 @@ export default {
|
|||
user () {
|
||||
return this.$store.getters.findUser(this.userId)
|
||||
},
|
||||
fediLinkURL () {
|
||||
console.log(this.user)
|
||||
try {
|
||||
return this.user._original.pleroma.ap_id.replace(/^https?/, 'web+ap')
|
||||
} catch (e) {
|
||||
return null
|
||||
}
|
||||
},
|
||||
relationship () {
|
||||
return this.$store.getters.relationship(this.userId)
|
||||
},
|
||||
|
|
|
@ -61,12 +61,25 @@
|
|||
:href="user.statusnet_profile_url"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
:title="$t('user_card.external_source')"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="external-link-alt"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
v-if="fediLinkURL"
|
||||
:href="fediLinkURL"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
:title="$t('user_card.open_fedi_link')"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="magnet"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
v-if="isOtherUser"
|
||||
:href="user.statusnet_profile_url + '.rss'"
|
||||
|
|
|
@ -1140,6 +1140,7 @@
|
|||
"deny_confirm_title": "Deny follow request",
|
||||
"domain_muted": "Unblock domain",
|
||||
"edit_profile": "Edit profile",
|
||||
"external_source": "External source",
|
||||
"favorites": "Favorites",
|
||||
"follow": "Follow",
|
||||
"follow_cancel": "Cancel request",
|
||||
|
@ -1173,6 +1174,7 @@
|
|||
"mute_progress": "Muting…",
|
||||
"muted": "Muted",
|
||||
"note": "Private note",
|
||||
"open_fedi_link": "Open fedi link",
|
||||
"per_day": "per day",
|
||||
"remote_follow": "Remote follow",
|
||||
"remove_follower": "Remove follower",
|
||||
|
|
Loading…
Reference in a new issue