rudeshark.net/packages/client/src/pages/admin/overview.moderators.vue

40 lines
873 B
Vue
Raw Normal View History

<template>
<div>
<Transition :name="$store.state.animation ? '_transition_zoom' : ''" mode="out-in">
<MkLoading v-if="fetching"/>
<div v-else :class="$style.root" class="_panel">
2023-02-15 19:37:39 +01:00
<MkAvatars :user-ids="moderators.userIds" class="userAvatars"/>
</div>
</Transition>
</div>
</template>
<script lang="ts" setup>
import { onMounted, onUnmounted, ref } from 'vue';
import * as os from '@/os';
2023-02-15 19:37:39 +01:00
import MkAvatars from '@/components/MkAvatars.vue';
let moderators: any = $ref(null);
let fetching = $ref(true);
onMounted(async () => {
moderators = await os.api('admin/show-users', {
2023-02-14 05:21:42 +01:00
sort: '+updatedAt',
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;
padding: 12px;
}
</style>