2
0
Fork 0

add link to user card to open the user in iceshrimp-fe

This commit is contained in:
notfire 2025-08-12 13:36:37 -04:00
commit cc15ec6543
No known key found for this signature in database
2 changed files with 21 additions and 3 deletions

View file

@ -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
}
}
}

View file

@ -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"