Sharkey/packages/client/src/components/avatars.vue

25 lines
524 B
Vue
Raw Normal View History

2019-05-21 02:44:36 +03:00
<template>
<div>
2022-01-06 16:07:32 +02:00
<div v-for="user in users" :key="user.id" style="display:inline-block;width:32px;height:32px;margin-right:8px;">
2021-04-17 17:52:54 +03:00
<MkAvatar :user="user" style="width:32px;height:32px;" :show-indicator="true"/>
2020-02-08 09:51:27 +02:00
</div>
2019-05-21 02:44:36 +03:00
</div>
</template>
2022-01-06 16:07:32 +02:00
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
2021-11-11 19:02:25 +02:00
import * as os from '@/os';
2019-05-21 02:44:36 +03:00
2022-01-06 16:07:32 +02:00
const props = defineProps<{
userIds: string[];
}>();
const users = ref([]);
onMounted(async () => {
users.value = await os.api('users/show', {
userIds: props.userIds
});
2019-05-21 02:44:36 +03:00
});
</script>