fix pinned users list
This commit is contained in:
parent
d209b61ed9
commit
15430ca087
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.12.2",
|
"version": "12.119.0-calc.12.3",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { IsNull } from 'typeorm';
|
||||||
import { Users } from '@/models/index.js';
|
import { Users } from '@/models/index.js';
|
||||||
import { fetchMeta } from '@/misc/fetch-meta.js';
|
import { fetchMeta } from '@/misc/fetch-meta.js';
|
||||||
import * as Acct from '@/misc/acct.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';
|
import define from '../define.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
</MkTab>
|
</MkTab>
|
||||||
<div v-if="origin === 'local'">
|
<div v-if="origin === 'local'">
|
||||||
<template v-if="tag == null">
|
<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>
|
<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"/>
|
<XUserList :pagination="pinnedUsers"/>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
|
@ -80,6 +80,8 @@ watch(() => props.tag, () => {
|
||||||
if (tagsEl) tagsEl.toggleContent(props.tag == null);
|
if (tagsEl) tagsEl.toggleContent(props.tag == null);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
watch(() => pinnedUsersList, () => {})
|
||||||
|
|
||||||
const tagUsers = $computed(() => ({
|
const tagUsers = $computed(() => ({
|
||||||
endpoint: 'hashtags/users' as const,
|
endpoint: 'hashtags/users' as const,
|
||||||
limit: 30,
|
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 pinnedUsers = { endpoint: 'pinned-users' };
|
||||||
const popularUsers = { endpoint: 'users', limit: 10, noPaging: true, params: {
|
const popularUsers = { endpoint: 'users', limit: 10, noPaging: true, params: {
|
||||||
|
|
Loading…
Reference in New Issue