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