diff options
| author | yupix <yupi0982@outlook.jp> | 2023-07-10 15:55:10 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-10 15:55:10 +0900 |
| commit | f4d1fcaf67716aa710d271e7f56c4f78cd202f29 (patch) | |
| tree | 872bfd98d522283e48828a2a2a6892656ecce098 /packages/frontend/src/components/MkAvatars.vue | |
| parent | feat: フォローやお気に入り登録をしていないチャンネル... (diff) | |
| download | misskey-f4d1fcaf67716aa710d271e7f56c4f78cd202f29.tar.gz misskey-f4d1fcaf67716aa710d271e7f56c4f78cd202f29.tar.bz2 misskey-f4d1fcaf67716aa710d271e7f56c4f78cd202f29.zip | |
feat: ユーザーをcontextmenuからアンテナに追加できるようになど (#11206)
* feat: ユーザーをcontextmenuからアンテナに追加できるように close #11115
* MkAvatars.vue変更
* nanka iroiro
* fix MkAvatars
* ix
* fix
---------
Co-authored-by: tamaina <tamaina@hotmail.co.jp>
Diffstat (limited to 'packages/frontend/src/components/MkAvatars.vue')
| -rw-r--r-- | packages/frontend/src/components/MkAvatars.vue | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/packages/frontend/src/components/MkAvatars.vue b/packages/frontend/src/components/MkAvatars.vue index 630620fc08..437dce0a14 100644 --- a/packages/frontend/src/components/MkAvatars.vue +++ b/packages/frontend/src/components/MkAvatars.vue @@ -1,24 +1,29 @@ <template> <div> - <div v-for="user in users" :key="user.id" style="display:inline-block;width:32px;height:32px;margin-right:8px;"> + <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 os from '@/os'; +import { UserLite } from 'misskey-js/built/entities'; -const props = defineProps<{ +const props = withDefaults(defineProps<{ userIds: string[]; -}>(); + limit?: number; +}>(), { + limit: Infinity, +}); -const users = ref([]); +const users = ref<UserLite[]>([]); onMounted(async () => { users.value = await os.api('users/show', { userIds: props.userIds, - }); + }) as unknown as UserLite[]; }); </script> |