2023-01-12 06:02:26 -06:00
|
|
|
<template>
|
|
|
|
<MkA v-adaptive-bg :to="`/admin/roles/${role.id}`" class="_panel" :class="$style.root" tabindex="-1" :style="{ '--color': role.color }">
|
2023-01-13 20:14:14 -06:00
|
|
|
<div :class="$style.title">
|
|
|
|
<span :class="$style.name">{{ role.name }}</span>
|
|
|
|
<span v-if="role.target === 'manual'" :class="$style.users">{{ role.usersCount }} users</span>
|
|
|
|
<span v-else-if="role.target === 'conditional'" :class="$style.users">({{ i18n.ts._role.conditional }})</span>
|
|
|
|
</div>
|
2023-01-12 06:02:26 -06:00
|
|
|
<div :class="$style.description">{{ role.description }}</div>
|
|
|
|
</MkA>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { } from 'vue';
|
|
|
|
import * as misskey from 'misskey-js';
|
|
|
|
import * as os from '@/os';
|
2023-01-13 20:14:14 -06:00
|
|
|
import { i18n } from '@/i18n';
|
2023-01-12 06:02:26 -06:00
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
role: any;
|
|
|
|
}>();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" module>
|
|
|
|
.root {
|
|
|
|
display: block;
|
|
|
|
padding: 16px 20px;
|
|
|
|
border-left: solid 6px var(--color);
|
|
|
|
}
|
|
|
|
|
|
|
|
.title {
|
2023-01-13 20:14:14 -06:00
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.name {
|
2023-01-12 06:02:26 -06:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2023-01-13 20:14:14 -06:00
|
|
|
.users {
|
|
|
|
margin-left: auto;
|
|
|
|
opacity: 0.7;
|
|
|
|
}
|
|
|
|
|
2023-01-12 06:02:26 -06:00
|
|
|
.description {
|
|
|
|
opacity: 0.7;
|
2023-01-15 15:06:05 -06:00
|
|
|
font-size: 85%;
|
2023-01-12 06:02:26 -06:00
|
|
|
}
|
|
|
|
</style>
|