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,
|
faRss,
|
||||||
faSearchPlus,
|
faSearchPlus,
|
||||||
faExternalLinkAlt,
|
faExternalLinkAlt,
|
||||||
faEdit
|
faEdit,
|
||||||
|
faMagnet
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
|
|
||||||
library.add(
|
library.add(
|
||||||
|
@ -23,7 +24,8 @@ library.add(
|
||||||
faBell,
|
faBell,
|
||||||
faSearchPlus,
|
faSearchPlus,
|
||||||
faExternalLinkAlt,
|
faExternalLinkAlt,
|
||||||
faEdit
|
faEdit,
|
||||||
|
faMagnet
|
||||||
)
|
)
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -44,6 +46,14 @@ export default {
|
||||||
user () {
|
user () {
|
||||||
return this.$store.getters.findUser(this.userId)
|
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 () {
|
relationship () {
|
||||||
return this.$store.getters.relationship(this.userId)
|
return this.$store.getters.relationship(this.userId)
|
||||||
},
|
},
|
||||||
|
|
|
@ -61,12 +61,25 @@
|
||||||
:href="user.statusnet_profile_url"
|
:href="user.statusnet_profile_url"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="button-unstyled external-link-button"
|
class="button-unstyled external-link-button"
|
||||||
|
:title="$t('user_card.external_source')"
|
||||||
>
|
>
|
||||||
<FAIcon
|
<FAIcon
|
||||||
class="icon"
|
class="icon"
|
||||||
icon="external-link-alt"
|
icon="external-link-alt"
|
||||||
/>
|
/>
|
||||||
</a>
|
</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
|
<a
|
||||||
v-if="isOtherUser"
|
v-if="isOtherUser"
|
||||||
:href="user.statusnet_profile_url + '.rss'"
|
:href="user.statusnet_profile_url + '.rss'"
|
||||||
|
|
|
@ -1140,6 +1140,7 @@
|
||||||
"deny_confirm_title": "Deny follow request",
|
"deny_confirm_title": "Deny follow request",
|
||||||
"domain_muted": "Unblock domain",
|
"domain_muted": "Unblock domain",
|
||||||
"edit_profile": "Edit profile",
|
"edit_profile": "Edit profile",
|
||||||
|
"external_source": "External source",
|
||||||
"favorites": "Favorites",
|
"favorites": "Favorites",
|
||||||
"follow": "Follow",
|
"follow": "Follow",
|
||||||
"follow_cancel": "Cancel request",
|
"follow_cancel": "Cancel request",
|
||||||
|
@ -1173,6 +1174,7 @@
|
||||||
"mute_progress": "Muting…",
|
"mute_progress": "Muting…",
|
||||||
"muted": "Muted",
|
"muted": "Muted",
|
||||||
"note": "Private note",
|
"note": "Private note",
|
||||||
|
"open_fedi_link": "Open fedi link",
|
||||||
"per_day": "per day",
|
"per_day": "per day",
|
||||||
"remote_follow": "Remote follow",
|
"remote_follow": "Remote follow",
|
||||||
"remove_follower": "Remove follower",
|
"remove_follower": "Remove follower",
|
||||||
|
|
Loading…
Reference in a new issue