Add share manage dialog
This commit is contained in:
19
frontend/src/components/ShareDomain/RoleLabel.vue
Normal file
19
frontend/src/components/ShareDomain/RoleLabel.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<q-badge v-if="isOwner" color="purple">所有者</q-badge>
|
||||
<q-badge v-else-if="isManager" color="primary">管理者</q-badge>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import { IDomainOwnerDisplay } from '../../types/DomainTypes';
|
||||
|
||||
interface Props {
|
||||
user: { id: number };
|
||||
domain: IDomainOwnerDisplay;
|
||||
}
|
||||
|
||||
const props = defineProps<Props>();
|
||||
|
||||
const isOwner = computed(() => props.user.id === props.domain.owner.id);
|
||||
const isManager = computed(() => props.user.id === props.domain.owner.id); // TODO
|
||||
</script>
|
||||
Reference in New Issue
Block a user