2023-02-14 04:40:31 +01:00
|
|
|
<template>
|
2023-04-08 02:01:42 +02:00
|
|
|
<div>
|
|
|
|
<Transition
|
|
|
|
:name="$store.state.animation ? '_transition_zoom' : ''"
|
|
|
|
mode="out-in"
|
|
|
|
>
|
|
|
|
<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-04-29 03:39:48 +02:00
|
|
|
<MkAvatar :user="user" class="avatar" indicator disableLink />
|
2023-04-08 02:01:42 +02:00
|
|
|
</MkA>
|
|
|
|
</div>
|
|
|
|
</Transition>
|
|
|
|
</div>
|
2023-02-14 04:40:31 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2023-04-08 02:01:42 +02:00
|
|
|
import { onMounted, onUnmounted, ref } from "vue";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import number from "@/filters/number";
|
|
|
|
import { i18n } from "@/i18n";
|
2023-02-14 04:40:31 +01:00
|
|
|
|
|
|
|
let moderators: any = $ref(null);
|
|
|
|
let fetching = $ref(true);
|
|
|
|
|
|
|
|
onMounted(async () => {
|
2023-04-08 02:01:42 +02:00
|
|
|
moderators = await os.api("admin/show-users", {
|
|
|
|
sort: "+updatedAt",
|
|
|
|
state: "adminOrModerator",
|
2023-02-14 04:40:31 +01:00
|
|
|
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;
|
|
|
|
padding: 12px;
|
2023-02-15 21:45:41 +01:00
|
|
|
|
|
|
|
&:global {
|
|
|
|
> .user {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
aspect-ratio: 1;
|
|
|
|
|
|
|
|
> .avatar {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-02-14 04:40:31 +01:00
|
|
|
}
|
|
|
|
</style>
|