mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-07 16:56:40 +08:00
fix: bug
- 修复超管判断条件。
This commit is contained in:
@@ -24,6 +24,9 @@ const props = defineProps({
|
|||||||
// 当前用户的ID
|
// 当前用户的ID
|
||||||
const currentLoginUserId = computed(() => store.state.auth.userID)
|
const currentLoginUserId = computed(() => store.state.auth.userID)
|
||||||
|
|
||||||
|
// 当前用户是否是管理员
|
||||||
|
const currentUserIsSuperuser = computed(() => store.state.auth.superUser)
|
||||||
|
|
||||||
// 定义触发的自定义事件
|
// 定义触发的自定义事件
|
||||||
const emit = defineEmits(['remove', 'save'])
|
const emit = defineEmits(['remove', 'save'])
|
||||||
|
|
||||||
@@ -126,8 +129,9 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardText class="pb-6">
|
<VCardText class="pb-6">
|
||||||
<h5 class="text-h6">详情</h5>
|
<VDivider class="my-2">
|
||||||
<VDivider class="my-2" />
|
<h5 class="text-h6">详情</h5>
|
||||||
|
</VDivider>
|
||||||
<VList lines="one">
|
<VList lines="one">
|
||||||
<VListItem>
|
<VListItem>
|
||||||
<VListItemTitle class="text-sm">
|
<VListItemTitle class="text-sm">
|
||||||
@@ -158,6 +162,7 @@ onMounted(() => {
|
|||||||
</VCardText>
|
</VCardText>
|
||||||
<VCardText class="flex flex-row justify-center">
|
<VCardText class="flex flex-row justify-center">
|
||||||
<VBtn
|
<VBtn
|
||||||
|
v-if="currentUserIsSuperuser"
|
||||||
color="primary"
|
color="primary"
|
||||||
class="me-4"
|
class="me-4"
|
||||||
@click="editUser"
|
@click="editUser"
|
||||||
@@ -165,7 +170,7 @@ onMounted(() => {
|
|||||||
编辑
|
编辑
|
||||||
</VBtn>
|
</VBtn>
|
||||||
<VBtn
|
<VBtn
|
||||||
v-if="props.user.id != currentLoginUserId"
|
v-if="currentUserIsSuperuser && props.user.id != currentLoginUserId"
|
||||||
color="error"
|
color="error"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
@click="removeUser"
|
@click="removeUser"
|
||||||
|
|||||||
Reference in New Issue
Block a user