2023-07-27 07:31:52 +02:00
|
|
|
<!--
|
2024-02-12 03:37:45 +01:00
|
|
|
SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-07-27 07:31:52 +02:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-12-26 01:22:10 +01:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-04-01 06:42:40 +02:00
|
|
|
<Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" mode="out-in">
|
2022-12-26 06:34:46 +01:00
|
|
|
<MkLoading v-if="fetching"/>
|
|
|
|
<div v-else :class="$style.root" class="_panel">
|
2023-08-13 14:02:25 +02:00
|
|
|
<MkA v-for="user in moderators" :key="user.id" class="user" :to="`/admin/user/${user.id}`">
|
2023-01-16 06:18:11 +01:00
|
|
|
<MkAvatar :user="user" class="avatar" indicator/>
|
2022-12-26 06:34:46 +01:00
|
|
|
</MkA>
|
|
|
|
</div>
|
2022-12-30 05:37:14 +01:00
|
|
|
</Transition>
|
2022-12-26 01:22:10 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-12-07 06:42:09 +01:00
|
|
|
import { onMounted, ref } from 'vue';
|
2024-01-04 10:32:46 +01:00
|
|
|
import { misskeyApi } from '@/scripts/misskey-api.js';
|
2023-12-26 06:19:35 +01:00
|
|
|
import * as Misskey from 'misskey-js';
|
2023-09-19 09:37:43 +02:00
|
|
|
import { defaultStore } from '@/store.js';
|
2022-12-26 01:22:10 +01:00
|
|
|
|
2023-12-26 06:19:35 +01:00
|
|
|
const moderators = ref<Misskey.entities.UserDetailed[] | null>(null);
|
2023-12-07 06:42:09 +01:00
|
|
|
const fetching = ref(true);
|
2022-12-26 01:22:10 +01:00
|
|
|
|
|
|
|
onMounted(async () => {
|
2024-01-04 10:32:46 +01:00
|
|
|
moderators.value = await misskeyApi('admin/show-users', {
|
2022-12-26 01:22:10 +01:00
|
|
|
sort: '+lastActiveDate',
|
|
|
|
state: 'adminOrModerator',
|
|
|
|
limit: 30,
|
|
|
|
});
|
|
|
|
|
2023-12-07 06:42:09 +01:00
|
|
|
fetching.value = false;
|
2022-12-26 01:22:10 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(auto-fill, minmax(30px, 40px));
|
|
|
|
grid-gap: 12px;
|
|
|
|
place-content: center;
|
2022-12-26 05:33:43 +01:00
|
|
|
padding: 12px;
|
2022-12-26 01:22:10 +01:00
|
|
|
|
|
|
|
&:global {
|
|
|
|
> .user {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|