use MkAvatar for user-list widget

This commit is contained in:
ThatOneCalculator 2023-01-16 11:31:21 -08:00
parent 9f224f3590
commit 2aba31312f
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "13.0.8-rc", "version": "13.0.8-rc2",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -10,9 +10,7 @@
</div> </div>
<MkLoading v-else-if="fetching"/> <MkLoading v-else-if="fetching"/>
<div v-else class="users"> <div v-else class="users">
<span v-for="user in users" :key="user.id" class="user"> <MkAvatars :user-ids="users"/>
<MkAvatar :user="user" class="avatar" indicator link preview/>
</span>
</div> </div>
</div> </div>
</MkContainer> </MkContainer>
@ -22,6 +20,7 @@
import { useWidgetPropsManager, Widget, WidgetComponentExpose } from './widget'; import { useWidgetPropsManager, Widget, WidgetComponentExpose } from './widget';
import { GetFormResultType } from '@/scripts/form'; import { GetFormResultType } from '@/scripts/form';
import MkContainer from '@/components/MkContainer.vue'; import MkContainer from '@/components/MkContainer.vue';
import MkAvatars from '@/components/MkAvatars.vue';
import * as os from '@/os'; import * as os from '@/os';
import { useInterval } from '@/scripts/use-interval'; import { useInterval } from '@/scripts/use-interval';
import { i18n } from '@/i18n'; import { i18n } from '@/i18n';
@ -79,7 +78,7 @@ const fetch = () => {
os.api('users/show', { os.api('users/show', {
userIds: list.userIds, userIds: list.userIds,
}).then(_users => { }).then(_users => {
users = _users; users = list.userIds;
fetching = false; fetching = false;
}); });
}); });