fix pinned users list
This commit is contained in:
parent
d209b61ed9
commit
15430ca087
3 changed files with 12 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "calckey",
|
||||
"version": "12.119.0-calc.12.2",
|
||||
"version": "12.119.0-calc.12.3",
|
||||
"codename": "aqua",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
|
@ -2,7 +2,7 @@ import { IsNull } from 'typeorm';
|
|||
import { Users } from '@/models/index.js';
|
||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||
import * as Acct from '@/misc/acct.js';
|
||||
import { User } from '@/models/entities/user.js';
|
||||
import type { User } from '@/models/entities/user.js';
|
||||
import define from '../define.js';
|
||||
|
||||
export const meta = {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
</MkTab>
|
||||
<div v-if="origin === 'local'">
|
||||
<template v-if="tag == null">
|
||||
<MkFolder v-if="pinnedUsersList?.length > 0" class="_gap" persist-key="explore-pinned-users">
|
||||
<MkFolder v-if="pinnedUsersList.length > 0" class="_gap" persist-key="explore-pinned-users">
|
||||
<template #header><i class="ph-bookmark-simple-bold ph-lg ph-fw ph-lg" style="margin-right: 0.5em;"></i>{{ i18n.ts.pinnedUsers }}</template>
|
||||
<XUserList :pagination="pinnedUsers"/>
|
||||
</MkFolder>
|
||||
|
@ -80,6 +80,8 @@ watch(() => props.tag, () => {
|
|||
if (tagsEl) tagsEl.toggleContent(props.tag == null);
|
||||
});
|
||||
|
||||
watch(() => pinnedUsersList, () => {})
|
||||
|
||||
const tagUsers = $computed(() => ({
|
||||
endpoint: 'hashtags/users' as const,
|
||||
limit: 30,
|
||||
|
@ -90,7 +92,13 @@ const tagUsers = $computed(() => ({
|
|||
},
|
||||
}));
|
||||
|
||||
const pinnedUsersList = await os.api('pinned-users');
|
||||
let pinnedUsersList = [];
|
||||
|
||||
os.api('pinned-users').then(res => {
|
||||
res?.forEach(u => {
|
||||
pinnedUsersList.push(u);
|
||||
});
|
||||
});
|
||||
|
||||
const pinnedUsers = { endpoint: 'pinned-users' };
|
||||
const popularUsers = { endpoint: 'users', limit: 10, noPaging: true, params: {
|
||||
|
|
Loading…
Reference in a new issue