fix: 🐛 make admin users page properly direct user cards to about page

This commit is contained in:
ThatOneCalculator 2023-07-24 16:55:57 -07:00
parent 7ef99069e6
commit 5930c8fc08
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 14 additions and 8 deletions

View File

@ -5,7 +5,7 @@
$style.root, $style.root,
{ yellow: user.isSilenced, red: user.isSuspended, gray: false }, { yellow: user.isSilenced, red: user.isSuspended, gray: false },
]" ]"
:to="userPage(user)" :to="props.showAboutPage ? `/user-info/${user.id}` : userPage(user)"
> >
<MkAvatar <MkAvatar
class="avatar" class="avatar"
@ -33,9 +33,11 @@ const props = withDefaults(
defineProps<{ defineProps<{
user: misskey.entities.User; user: misskey.entities.User;
withChart?: boolean; withChart?: boolean;
showAboutPage?: boolean;
}>(), }>(),
{ {
withChart: true, withChart: true,
showAboutPage: false,
}, },
); );
@ -99,6 +101,12 @@ if (props.withChart) {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
// > :global(.moderation) {
// display: flex;
// gap: 1rem;
// margin-right: 1rem;
// }
} }
> :global(.chart) { > :global(.chart) {

View File

@ -100,19 +100,17 @@
:pagination="pagination" :pagination="pagination"
class="users" class="users"
> >
<MkA <MkUserCardMini
v-for="user in items" v-for="user in items"
:key="user.id" :key="user.id"
v-tooltip.mfm=" v-tooltip.mfm="
`Last posted: ${new Date( user.updatedAt ? `Last posted: ${new Date(
user.updatedAt, user.updatedAt,
).toLocaleString()}` ).toLocaleString()}` : 'Never posted'
" "
class="user" class="user"
:to="`/user-info/${user.id}`" :user="user"
> :show-about-page="true" />
<MkUserCardMini :user="user" />
</MkA>
</MkPagination> </MkPagination>
</div> </div>
</div> </div>