2023-07-27 05:31:52 +00:00
|
|
|
<!--
|
|
|
|
SPDX-FileCopyrightText: syuilo and other misskey contributors
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
-->
|
|
|
|
|
2022-12-26 00:22:10 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2023-04-01 04:42:40 +00:00
|
|
|
<Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" mode="out-in">
|
2022-12-26 05:34:46 +00:00
|
|
|
<MkLoading v-if="fetching"/>
|
|
|
|
<div v-else :class="$style.root" class="_panel">
|
2023-08-13 12:02:25 +00:00
|
|
|
<MkA v-for="user in moderators" :key="user.id" class="user" :to="`/admin/user/${user.id}`">
|
2023-01-16 05:18:11 +00:00
|
|
|
<MkAvatar :user="user" class="avatar" indicator/>
|
2022-12-26 05:34:46 +00:00
|
|
|
</MkA>
|
|
|
|
</div>
|
2022-12-30 04:37:14 +00:00
|
|
|
</Transition>
|
2022-12-26 00:22:10 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-02-16 14:09:41 +00:00
|
|
|
import { onMounted } from 'vue';
|
2023-09-19 07:37:43 +00:00
|
|
|
import * as os from '@/os.js';
|
|
|
|
import { defaultStore } from '@/store.js';
|
2022-12-26 00:22:10 +00:00
|
|
|
|
|
|
|
let moderators: any = $ref(null);
|
|
|
|
let fetching = $ref(true);
|
|
|
|
|
|
|
|
onMounted(async () => {
|
|
|
|
moderators = await os.api('admin/show-users', {
|
|
|
|
sort: '+lastActiveDate',
|
|
|
|
state: 'adminOrModerator',
|
|
|
|
limit: 30,
|
|
|
|
});
|
|
|
|
|
|
|
|
fetching = false;
|
|
|
|
});
|
|
|
|
</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 04:33:43 +00:00
|
|
|
padding: 12px;
|
2022-12-26 00:22:10 +00:00
|
|
|
|
|
|
|
&:global {
|
|
|
|
> .user {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|