me when the

This commit is contained in:
ThatOneCalculator 2022-11-09 20:44:43 -08:00
parent c331d23b3f
commit 2589ca1a3b
2 changed files with 10 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "calckey", "name": "calckey",
"version": "12.119.0-calc.12.4", "version": "12.119.0-calc.12.5",
"codename": "aqua", "codename": "aqua",
"repository": { "repository": {
"type": "git", "type": "git",

View File

@ -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-show="thereArePinnedUsers" 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>
@ -75,11 +75,16 @@ let origin = $ref('local');
let tagsEl = $ref<InstanceType<typeof MkFolder>>(); let tagsEl = $ref<InstanceType<typeof MkFolder>>();
let tagsLocal = $ref([]); let tagsLocal = $ref([]);
let tagsRemote = $ref([]); let tagsRemote = $ref([]);
let thereArePinnedUsers = $ref(false);
watch(() => props.tag, () => { watch(() => props.tag, () => {
if (tagsEl) tagsEl.toggleContent(props.tag == null); if (tagsEl) tagsEl.toggleContent(props.tag == null);
}); });
watch(() => pinnedUsersList, () => {
if (pinnedUsersList?.length > 0) thereArePinnedUsers = true;
});
const tagUsers = $computed(() => ({ const tagUsers = $computed(() => ({
endpoint: 'hashtags/users' as const, endpoint: 'hashtags/users' as const,
limit: 30, limit: 30,
@ -90,8 +95,9 @@ const tagUsers = $computed(() => ({
}, },
})); }));
const pinnedUsersList = os.api('pinned-users'); const pinnedUsersList = await os.api('pinned-users');
console.log(pinnedUsersList);
if (pinnedUsersList?.length > 0) { thereArePinnedUsers = true; }
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: {