misskey/packages/frontend/src/pages/admin/overview.moderators.vue

60 lines
1.2 KiB
Vue
Raw Normal View History

<!--
SPDX-FileCopyrightText: syuilo and other misskey contributors
SPDX-License-Identifier: AGPL-3.0-only
-->
<template>
<div>
2023-04-01 13:42:40 +09:00
<Transition :name="defaultStore.state.animation ? '_transition_zoom' : ''" mode="out-in">
2022-12-26 14:34:46 +09:00
<MkLoading v-if="fetching"/>
<div v-else :class="$style.root" class="_panel">
<MkA v-for="user in moderators" :key="user.id" class="user" :to="`/user-info/${user.id}`">
2023-01-16 14:18:11 +09:00
<MkAvatar :user="user" class="avatar" indicator/>
2022-12-26 14:34:46 +09:00
</MkA>
</div>
2022-12-30 13:37:14 +09:00
</Transition>
</div>
</template>
<script lang="ts" setup>
import { onMounted } from 'vue';
import * as os from '@/os';
2023-04-01 13:42:40 +09:00
import { defaultStore } from '@/store';
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 13:33:43 +09:00
padding: 12px;
&:global {
> .user {
width: 100%;
height: 100%;
aspect-ratio: 1;
> .avatar {
width: 100%;
height: 100%;
}
}
}
}
</style>