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