Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85832098
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/components/user_list_popover/user_list_popover.js b/src/components/user_list_popover/user_list_popover.js
index 6f79939dab..440fe76947 100644
--- a/src/components/user_list_popover/user_list_popover.js
+++ b/src/components/user_list_popover/user_list_popover.js
@@ -1,34 +1,46 @@
import { defineAsyncComponent } from 'vue'
import RichContent from 'src/components/rich_content/rich_content.jsx'
import UnicodeDomainIndicator from '../unicode_domain_indicator/unicode_domain_indicator.vue'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
+import { useInstanceStore } from 'src/stores/instance.js'
+
+import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
import { library } from '@fortawesome/fontawesome-svg-core'
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
library.add(faCircleNotch)
const UserListPopover = {
name: 'UserListPopover',
props: ['users'],
components: {
RichContent,
UnicodeDomainIndicator,
Popover: defineAsyncComponent(() => import('../popover/popover.vue')),
UserAvatar: defineAsyncComponent(
() => import('../user_avatar/user_avatar.vue'),
),
},
computed: {
usersCapped() {
return this.users.slice(0, 16)
},
allowNonSquareEmoji() {
return useMergedConfigStore().mergedConfig.nonSquareEmoji
},
},
+ methods: {
+ generateProfileLink(user) {
+ return generateProfileLink(
+ user.id,
+ user.screen_name,
+ useInstanceStore().restrictedNicknames,
+ )
+ },
+ }
}
export default UserListPopover
diff --git a/src/components/user_list_popover/user_list_popover.vue b/src/components/user_list_popover/user_list_popover.vue
index dffce7de8e..3a93b90894 100644
--- a/src/components/user_list_popover/user_list_popover.vue
+++ b/src/components/user_list_popover/user_list_popover.vue
@@ -1,75 +1,77 @@
<template>
<Popover
trigger="hover"
placement="top"
:offset="{ y: 5 }"
>
<template #trigger>
<slot />
</template>
<template #content>
<div class="user-list-popover">
<template v-if="users.length">
- <div
+ <a
v-for="(user) in usersCapped"
+ :href="$router.resolve(generateProfileLink(user)).href"
:key="user.id"
class="user-list-row"
>
<UserAvatar
:user="user"
class="avatar-small"
:compact="true"
/>
<div class="user-list-names">
<!-- eslint-disable vue/no-v-html -->
<RichContent
class="username"
:title="'@'+user.screen_name_ui"
:html="user.name_html"
:emoji="user.emoji"
:allow-non-square-emoji="allowNonSquareEmoji"
/>
<!-- eslint-enable vue/no-v-html -->
<span class="user-list-screen-name">{{ user.screen_name_ui }}</span><UnicodeDomainIndicator :user="user" />
</div>
- </div>
+ </a>
</template>
<template v-else>
<FAIcon
icon="circle-notch"
spin
size="3x"
/>
</template>
</div>
</template>
</Popover>
</template>
<script src="./user_list_popover.js"></script>
<style lang="scss">
.user-list-popover {
padding: 0.5em;
--emoji-size: calc(var(--emojiSize, 32px) / 2);
.user-list-row {
padding: 0.25em;
display: flex;
flex-direction: row;
+ color: var(--text);
.user-list-names {
display: flex;
flex-direction: column;
margin-left: 0.5em;
min-width: 5em;
}
.user-list-screen-name {
font-size: 0.65em;
}
}
}
</style>
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Nov 2, 3:40 AM (12 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1803560
Default Alt Text
(3 KB)
Attached To
Mode
rPUFE pleroma-fe-upstream
Attached
Detach File
Event Timeline