Refactor page titles and dialog close buttons across multiple views

- Replaced instances of `DialogCloseBtn` with `VDialogCloseBtn` in TransferHistoryView, AccountSettingAbout, AccountSettingSystem, and UserProfileView for consistency.
- Introduced a new component `PageContentTitle` to standardize page titles in SiteCardListView, SubscribeListView, UserListView, and WorkflowListView, improving layout and readability.
- Added keyword filtering functionality in SubscribeListView and SubscribeShareView to enhance user experience during searches.
- Added a new site logo image to the assets.
This commit is contained in:
jxxghp
2025-04-15 13:23:56 +08:00
parent 65ebdb61d0
commit e97d815dc3
63 changed files with 347 additions and 232 deletions

View File

@@ -54,22 +54,11 @@ onActivated(() => {
</script>
<template>
<!-- 页面标题 -->
<VPageContentTitle title="用户管理" />
<div class="card-list-container">
<!-- 页面标题 -->
<div class="my-3 md:flex md:items-center md:justify-between">
<div class="min-w-0 flex-1 mx-0 flex align-middle">
<h2
class="mb-3 ms-2 truncate text-2xl font-bold leading-7 text-gray-100 sm:overflow-visible sm:text-3xl sm:leading-9 md:mb-0"
data-testid="page-header"
>
<span class="text-moviepilot">用户管理</span>
</h2>
</div>
</div>
<!-- 加载中提示 -->
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<!-- 用户卡片网格 -->
<div v-if="allUsers.length > 0 && isRefreshed" class="grid gap- grid-user-card">
<!-- 普通用户卡片 -->

View File

@@ -57,7 +57,7 @@ const accountInfo = ref<User>({
is_otp: false,
permissions: {},
settings: {},
nickname: ''
nickname: '',
})
// 二维码信息
@@ -135,15 +135,15 @@ async function saveAccountInfo() {
}
accountInfo.value.password = newPassword.value
}
// 将nickname保存到settings中后端可以直接处理JSON对象
if (accountInfo.value.nickname) {
if (!accountInfo.value.settings) {
accountInfo.value.settings = {};
accountInfo.value.settings = {}
}
accountInfo.value.settings.nickname = accountInfo.value.nickname;
accountInfo.value.settings.nickname = accountInfo.value.nickname
}
const oldUserName = accountInfo.value.name
const oldAvatar = accountInfo.value.avatar
accountInfo.value.avatar = currentAvatar.value
@@ -151,10 +151,10 @@ async function saveAccountInfo() {
isSaving.value = true
try {
// 创建一个临时对象来保存用户数据,确保所有字段都会发送
const userData = { ...accountInfo.value };
const userData = { ...accountInfo.value }
const result: { [key: string]: any } = await api.put('user/', userData)
if (result.success) {
if (oldUserName !== currentUserName.value) {
$toast.success(`${oldUserName}】更名【${currentUserName.value}】,用户信息保存成功!`)
@@ -312,12 +312,7 @@ watch(
<VForm class="mt-6">
<VRow>
<VCol cols="12" md="6">
<VTextField
v-model="currentUserName"
density="comfortable"
readonly
label="用户名"
/>
<VTextField v-model="currentUserName" density="comfortable" readonly label="用户名" />
</VCol>
<VCol cols="12" md="6">
<VTextField v-model="accountInfo.email" density="comfortable" clearable label="邮箱" type="email" />
@@ -430,7 +425,7 @@ watch(
<VDialog v-if="otpDialog" v-model="otpDialog" max-width="45rem" scrollable>
<!-- 开启双重验证弹窗内容 -->
<VCard>
<DialogCloseBtn @click="otpDialog = false" />
<VDialogCloseBtn @click="otpDialog = false" />
<VCardText>
<h4 class="text-h4 text-center mb-6 mt-5">登录双重验证</h4>
<h5 class="text-h5 font-weight-medium mb-2">身份验证器</h5>