2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
2024-02-13 15:59:27 +00:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 05:31:52 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2023-05-08 08:29:19 +00:00
|
|
|
<template>
|
|
|
|
<div class="_gaps">
|
|
|
|
<div style="text-align: center;">{{ i18n.ts._initialAccountSetting.followUsers }}</div>
|
|
|
|
|
2023-05-19 04:58:09 +00:00
|
|
|
<MkFolder :defaultOpen="true">
|
2023-05-08 08:29:19 +00:00
|
|
|
<template #label>{{ i18n.ts.recommended }}</template>
|
|
|
|
|
|
|
|
<MkPagination :pagination="pinnedUsers">
|
|
|
|
<template #default="{ items }">
|
|
|
|
<div :class="$style.users">
|
2024-01-30 10:53:53 +00:00
|
|
|
<XUser v-for="item in (items as Misskey.entities.UserDetailed[])" :key="item.id" :user="item"/>
|
2023-05-08 08:29:19 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</MkPagination>
|
|
|
|
</MkFolder>
|
|
|
|
|
2023-05-19 04:58:09 +00:00
|
|
|
<MkFolder :defaultOpen="true">
|
2023-05-08 08:29:19 +00:00
|
|
|
<template #label>{{ i18n.ts.popularUsers }}</template>
|
|
|
|
|
|
|
|
<MkPagination :pagination="popularUsers">
|
|
|
|
<template #default="{ items }">
|
|
|
|
<div :class="$style.users">
|
2024-01-30 10:53:53 +00:00
|
|
|
<XUser v-for="item in (items as Misskey.entities.UserDetailed[])" :key="item.id" :user="item"/>
|
2023-05-08 08:29:19 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</MkPagination>
|
|
|
|
</MkFolder>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2024-02-08 05:15:56 +00:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-09-19 07:37:43 +00:00
|
|
|
import { i18n } from '@/i18n.js';
|
2023-05-08 08:29:19 +00:00
|
|
|
import MkFolder from '@/components/MkFolder.vue';
|
|
|
|
import XUser from '@/components/MkUserSetupDialog.User.vue';
|
2024-01-30 10:53:53 +00:00
|
|
|
import MkPagination, { type Paging } from '@/components/MkPagination.vue';
|
2023-05-08 08:29:19 +00:00
|
|
|
|
2024-01-30 10:53:53 +00:00
|
|
|
const pinnedUsers: Paging = {
|
|
|
|
endpoint: 'pinned-users',
|
|
|
|
noPaging: true,
|
|
|
|
limit: 10,
|
|
|
|
};
|
2023-05-08 08:29:19 +00:00
|
|
|
|
2024-01-30 10:53:53 +00:00
|
|
|
const popularUsers: Paging = {
|
|
|
|
endpoint: 'users',
|
|
|
|
limit: 10,
|
|
|
|
noPaging: true,
|
|
|
|
params: {
|
|
|
|
state: 'alive',
|
|
|
|
origin: 'local',
|
|
|
|
sort: '+follower',
|
|
|
|
},
|
|
|
|
};
|
2023-05-08 08:29:19 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.users {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
|
|
|
|
grid-gap: var(--margin);
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
</style>
|