add link to user card to open the user in iceshrimp-fe
This commit is contained in:
parent
0adbff7856
commit
cc15ec6543
2 changed files with 21 additions and 3 deletions
|
|
@ -15,7 +15,8 @@ import {
|
|||
faRss,
|
||||
faSearchPlus,
|
||||
faExternalLinkAlt,
|
||||
faEdit
|
||||
faEdit,
|
||||
faShrimp
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
|
||||
library.add(
|
||||
|
|
@ -23,7 +24,8 @@ library.add(
|
|||
faBell,
|
||||
faSearchPlus,
|
||||
faExternalLinkAlt,
|
||||
faEdit
|
||||
faEdit,
|
||||
faShrimp
|
||||
)
|
||||
|
||||
export default {
|
||||
|
|
@ -66,7 +68,7 @@ export default {
|
|||
return this.user.id !== this.$store.state.users.currentUser.id
|
||||
},
|
||||
subscribeUrl () {
|
||||
|
||||
|
||||
const serverUrl = new URL(this.user.statusnet_profile_url)
|
||||
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
|
||||
},
|
||||
|
|
@ -201,6 +203,11 @@ export default {
|
|||
},
|
||||
biteUser () {
|
||||
return this.$store.dispatch('biteUser', this.user.id)
|
||||
},
|
||||
userOnOurInstance (user) {
|
||||
let us = this.$store.state.users.currentUser
|
||||
let inst = us.statusnet_profile_url.replace("@" + us.screen_name, "")
|
||||
return inst + '@' + user.screen_name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,6 +147,17 @@
|
|||
icon="rss"
|
||||
/>
|
||||
</a>
|
||||
<a
|
||||
v-if="isOtherUser"
|
||||
:href="userOnOurInstance(user)"
|
||||
target="_blank"
|
||||
class="button-unstyled external-link-button"
|
||||
>
|
||||
<FAIcon
|
||||
class="icon"
|
||||
icon="shrimp"
|
||||
/>
|
||||
</a>
|
||||
<AccountActions
|
||||
v-if="isOtherUser && loggedIn"
|
||||
:user="user"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue