mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-11-15 15:56:25 +01:00
fa9c4a19b9
* refactor(frontend): os.tsに引き込んだscripts/api.tsの再exportをやめる * fix * fix * renate to "misskeyApi" * rename file
34 lines
923 B
Vue
34 lines
923 B
Vue
<!--
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
-->
|
|
|
|
<template>
|
|
<div>
|
|
<div v-for="user in users.slice(0, limit)" :key="user.id" style="display:inline-block;width:32px;height:32px;margin-right:8px;">
|
|
<MkAvatar :user="user" style="width:32px; height:32px;" indicator link preview/>
|
|
</div>
|
|
<div v-if="users.length > limit" style="display: inline-block;">...</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts" setup>
|
|
import { onMounted, ref } from 'vue';
|
|
import * as Misskey from 'misskey-js';
|
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
|
|
|
const props = withDefaults(defineProps<{
|
|
userIds: string[];
|
|
limit?: number;
|
|
}>(), {
|
|
limit: Infinity,
|
|
});
|
|
|
|
const users = ref<Misskey.entities.UserLite[]>([]);
|
|
|
|
onMounted(async () => {
|
|
users.value = await misskeyApi('users/show', {
|
|
userIds: props.userIds,
|
|
}) as unknown as Misskey.entities.UserLite[];
|
|
});
|
|
</script>
|