mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 07:28:37 +08:00
fix user ui
This commit is contained in:
@@ -92,7 +92,6 @@ const canEditUser = computed(() => {
|
|||||||
|
|
||||||
// 计算是否有用户管理权限
|
// 计算是否有用户管理权限
|
||||||
const canManageUser = computed(() => {
|
const canManageUser = computed(() => {
|
||||||
if (props.user.name == currentLoginUser) return false
|
|
||||||
return canEditUser
|
return canEditUser
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ const currentUserName = ref('')
|
|||||||
const emit = defineEmits(['save', 'close'])
|
const emit = defineEmits(['save', 'close'])
|
||||||
|
|
||||||
// 创建新用户按钮运行状态
|
// 创建新用户按钮运行状态
|
||||||
const isAdding = ref(false);
|
const isAdding = ref(false)
|
||||||
|
|
||||||
// 更新用户消息按钮运行状态
|
// 更新用户消息按钮运行状态
|
||||||
const isUpdating = ref(false);
|
const isUpdating = ref(false)
|
||||||
|
|
||||||
// 提示框
|
// 提示框
|
||||||
const $toast = useToast()
|
const $toast = useToast()
|
||||||
@@ -235,7 +235,7 @@ const canControl = computed(() => {
|
|||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
// 调用isCurrentUser函数判断是否为当前用户
|
// 调用isCurrentUser函数判断是否为当前用户
|
||||||
return !(isCurrentUser.value)
|
return !isCurrentUser.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -249,7 +249,6 @@ onMounted(() => {
|
|||||||
fetchUserInfo()
|
fetchUserInfo()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -279,12 +278,15 @@ onMounted(() => {
|
|||||||
<span v-if="display.mdAndUp.value" class="ms-2">重置</span>
|
<span v-if="display.mdAndUp.value" class="ms-2">重置</span>
|
||||||
</VBtn>
|
</VBtn>
|
||||||
|
|
||||||
<VBtn type="reset" :color="props.oper === 'add'? 'info' : 'error'" variant="tonal"
|
<VBtn
|
||||||
@click="resetDefaultAvatar">
|
type="reset"
|
||||||
|
:color="props.oper === 'add' ? 'info' : 'error'"
|
||||||
|
variant="tonal"
|
||||||
|
@click="resetDefaultAvatar"
|
||||||
|
>
|
||||||
<VIcon icon="mdi-image-sync-outline" />
|
<VIcon icon="mdi-image-sync-outline" />
|
||||||
<span v-if="display.mdAndUp.value" class="ms-2">默认</span>
|
<span v-if="display.mdAndUp.value" class="ms-2">默认</span>
|
||||||
</VBtn>
|
</VBtn>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p class="text-body-1 mb-0">允许 JPG、PNG、GIF 格式, 最大尺寸 800K。</p>
|
<p class="text-body-1 mb-0">允许 JPG、PNG、GIF 格式, 最大尺寸 800K。</p>
|
||||||
@@ -300,17 +302,12 @@ onMounted(() => {
|
|||||||
<VTextField
|
<VTextField
|
||||||
v-model="currentUserName"
|
v-model="currentUserName"
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
clearable
|
:readonly="props.oper !== 'add'"
|
||||||
label="用户名"
|
label="用户名"
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField v-model="userForm.email" density="comfortable" clearable label="邮箱" type="email" />
|
||||||
v-model="userForm.email"
|
|
||||||
density="comfortable"
|
|
||||||
clearable
|
|
||||||
label="邮箱"
|
|
||||||
type="email" />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
@@ -352,32 +349,26 @@ onMounted(() => {
|
|||||||
</VDivider>
|
</VDivider>
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField v-model="userForm.settings.wechat_userid" density="comfortable" clearable label="微信用户" />
|
||||||
v-model="userForm.settings.wechat_userid"
|
|
||||||
density="comfortable"
|
|
||||||
clearable
|
|
||||||
label="微信用户" />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="userForm.settings.telegram_userid"
|
v-model="userForm.settings.telegram_userid"
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
clearable
|
clearable
|
||||||
label="Telegram用户" />
|
label="Telegram用户"
|
||||||
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField v-model="userForm.settings.slack_userid" density="comfortable" clearable label="Slack用户" />
|
||||||
v-model="userForm.settings.slack_userid"
|
|
||||||
density="comfortable"
|
|
||||||
clearable
|
|
||||||
label="Slack用户" />
|
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
v-model="userForm.settings.vocechat_userid"
|
v-model="userForm.settings.vocechat_userid"
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
clearable
|
clearable
|
||||||
label="VoceChat用户" />
|
label="VoceChat用户"
|
||||||
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
<VCol cols="12" md="6">
|
<VCol cols="12" md="6">
|
||||||
<VTextField
|
<VTextField
|
||||||
@@ -413,7 +404,7 @@ onMounted(() => {
|
|||||||
prepend-icon="mdi-content-save"
|
prepend-icon="mdi-content-save"
|
||||||
class="px-5"
|
class="px-5"
|
||||||
>
|
>
|
||||||
<span v-if="isUpdating" >更新中...</span>
|
<span v-if="isUpdating">更新中...</span>
|
||||||
<span v-else>更新</span>
|
<span v-else>更新</span>
|
||||||
</VBtn>
|
</VBtn>
|
||||||
</VCardActions>
|
</VCardActions>
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ watch(
|
|||||||
<VTextField
|
<VTextField
|
||||||
v-model="currentUserName"
|
v-model="currentUserName"
|
||||||
density="comfortable"
|
density="comfortable"
|
||||||
clearable
|
readonly
|
||||||
label="用户名"
|
label="用户名"
|
||||||
/>
|
/>
|
||||||
</VCol>
|
</VCol>
|
||||||
|
|||||||
Reference in New Issue
Block a user