2022-12-26 02:22:10 +02:00
|
|
|
<template>
|
|
|
|
<div>
|
2022-12-30 06:52:40 +02:00
|
|
|
<Transition :name="$store.state.animation ? '_transition_zoom' : ''" mode="out-in">
|
2022-12-26 07:34:46 +02: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 07:18:11 +02:00
|
|
|
<MkAvatar :user="user" class="avatar" indicator/>
|
2022-12-26 07:34:46 +02:00
|
|
|
</MkA>
|
|
|
|
</div>
|
2022-12-30 06:37:14 +02:00
|
|
|
</Transition>
|
2022-12-26 02:22:10 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { onMounted, onUnmounted, ref } from 'vue';
|
|
|
|
import * as os from '@/os';
|
|
|
|
import number from '@/filters/number';
|
|
|
|
import { i18n } from '@/i18n';
|
|
|
|
|
|
|
|
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 06:33:43 +02:00
|
|
|
padding: 12px;
|
2022-12-26 02:22:10 +02:00
|
|
|
|
|
|
|
&:global {
|
|
|
|
> .user {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|