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

1
components.d.ts vendored
View File

@@ -12,6 +12,7 @@ declare module 'vue' {
ExistIcon: typeof import('./src/@core/components/ExistIcon.vue')['default']
LoadingBanner: typeof import('./src/@core/components/LoadingBanner.vue')['default']
MoreBtn: typeof import('./src/@core/components/MoreBtn.vue')['default']
PageContentTitle: typeof import('./src/@core/components/PageContentTitle.vue')['default']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
ScrollToTopBtn: typeof import('./src/@core/components/ScrollToTopBtn.vue')['default']

View File

@@ -240,7 +240,7 @@ onMounted(() => {
<VIcon icon="mdi-palette" class="me-2" />
自定义主题风格
</VCardTitle>
<DialogCloseBtn @click="cssDialog = false" />
<VDialogCloseBtn @click="cssDialog = false" />
</VCardItem>
<VDivider />
<VAceEditor

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@@ -95,7 +95,7 @@ function onClose() {
<VIcon class="cursor-move" icon="mdi-drag" />
</IconBtn>
</span>
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardText class="flex justify-space-between align-center gap-3">
<div class="align-self-start">
<h5 class="text-h6 mb-1">{{ props.rule.name }}</h5>
@@ -106,7 +106,7 @@ function onClose() {
</VCard>
<VDialog v-if="ruleInfoDialog" v-model="ruleInfoDialog" scrollable max-width="40rem" persistent>
<VCard :title="`${props.rule.id} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="ruleInfoDialog" />
<VDialogCloseBtn v-model="ruleInfoDialog" />
<VDivider />
<VCardText>
<VForm>

View File

@@ -175,7 +175,7 @@ watch(
<template>
<VCard variant="tonal" :width="props.width" :height="props.height">
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardItem>
<VTextField
v-model="props.directory.name"

View File

@@ -150,7 +150,7 @@ onUnmounted(() => {
@click="openDownloaderInfoDialog"
:class="{ 'transition transform-cpu duration-300 -translate-y-1': hover.isHovering }"
>
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<span class="absolute top-3 right-12">
<IconBtn>
<VIcon class="cursor-move" icon="mdi-drag" />
@@ -181,7 +181,7 @@ onUnmounted(() => {
</VHover>
<VDialog v-if="downloaderInfoDialog" v-model="downloaderInfoDialog" scrollable max-width="40rem" persistent>
<VCard :title="`${props.downloader.name} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="downloaderInfoDialog" />
<VDialogCloseBtn v-model="downloaderInfoDialog" />
<VDivider />
<VCardText>
<VForm>

View File

@@ -47,7 +47,7 @@ onMounted(() => {
<VIcon class="cursor-move" icon="mdi-drag" />
</IconBtn>
</span>
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardItem>
<VCardTitle>优先级 {{ props.pri }}</VCardTitle>
<VRow>

View File

@@ -208,7 +208,7 @@ function onClose() {
<VIcon class="cursor-move" icon="mdi-drag" />
</IconBtn>
</span>
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardText class="flex justify-space-between align-center gap-3">
<div class="align-self-start">
<h5 class="text-h6 mb-1">{{ props.group.name }}</h5>
@@ -222,7 +222,7 @@ function onClose() {
</VCard>
<VDialog v-if="groupInfoDialog" v-model="groupInfoDialog" scrollable max-width="80rem" persistent>
<VCard :title="`${props.group.name} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="groupInfoDialog" />
<VDialogCloseBtn v-model="groupInfoDialog" />
<VDivider />
<VCardItem class="pt-1">
<VRow class="mt-1">

View File

@@ -175,7 +175,7 @@ onMounted(() => {
<template>
<div>
<VCard variant="tonal" @click="openMediaServerInfoDialog">
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardText class="flex justify-space-between align-center gap-3">
<div class="align-self-start flex-1">
<div class="text-h6 mb-1">{{ mediaserver.name }}</div>
@@ -190,7 +190,7 @@ onMounted(() => {
</VCard>
<VDialog v-if="mediaServerInfoDialog" v-model="mediaServerInfoDialog" scrollable max-width="40rem" persistent>
<VCard :title="`${props.mediaserver.name} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="mediaServerInfoDialog" />
<VDialogCloseBtn v-model="mediaServerInfoDialog" />
<VDivider />
<VCardText>
<VForm>
@@ -313,19 +313,10 @@ onMounted(() => {
/>
</VCol>
<VCol cols="12" md="6">
<VTextField
v-model="mediaServerInfo.config.username"
label="用户名"
active
/>
<VTextField v-model="mediaServerInfo.config.username" label="用户名" active />
</VCol>
<VCol cols="12" md="6">
<VTextField
type="password"
v-model="mediaServerInfo.config.password"
label="密码"
active
/>
<VTextField type="password" v-model="mediaServerInfo.config.password" label="密码" active />
</VCol>
</VRow>
<VRow v-if="mediaServerInfo.type == 'plex'">

View File

@@ -119,7 +119,7 @@ function onClose() {
<VIcon class="cursor-move" icon="mdi-drag" />
</IconBtn>
</span>
<DialogCloseBtn @click="onClose" />
<VDialogCloseBtn @click="onClose" />
<VCardText class="flex justify-space-between align-center gap-3">
<div class="align-self-start">
<div class="flex items-center">
@@ -133,7 +133,7 @@ function onClose() {
</VCard>
<VDialog v-if="notificationInfoDialog" v-model="notificationInfoDialog" scrollable max-width="40rem" persistent>
<VCard :title="`${props.notification.name} - 配置`" class="rounded-t">
<DialogCloseBtn v-model="notificationInfoDialog" />
<VDialogCloseBtn v-model="notificationInfoDialog" />
<VDivider />
<VCardText>
<VForm>

View File

@@ -227,7 +227,7 @@ const dropdownItems = ref([
<!-- 更新日志 -->
<VDialog v-if="releaseDialog" v-model="releaseDialog" width="600" scrollable>
<VCard :title="`${props.plugin?.plugin_name} 更新说明`">
<DialogCloseBtn @click="releaseDialog = false" />
<VDialogCloseBtn @click="releaseDialog = false" />
<VDivider />
<VersionHistory :history="props.plugin?.history" />
</VCard>
@@ -235,7 +235,7 @@ const dropdownItems = ref([
<!-- 插件详情-->
<VDialog v-if="detailDialog" v-model="detailDialog" max-width="30rem">
<VCard>
<DialogCloseBtn @click="detailDialog = false" />
<VDialogCloseBtn @click="detailDialog = false" />
<VCardText>
<VCol>
<div class="d-flex justify-space-between flex-wrap flex-md-nowrap flex-column flex-md-row">

View File

@@ -441,7 +441,7 @@ watch(
<!-- 更新日志 -->
<VDialog v-if="releaseDialog" v-model="releaseDialog" width="600" scrollable>
<VCard :title="`${props.plugin?.plugin_name} 更新说明`">
<DialogCloseBtn @click="releaseDialog = false" />
<VDialogCloseBtn @click="releaseDialog = false" />
<VDivider />
<VersionHistory :history="props.plugin?.history" />
<VDivider />

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { PropType } from 'vue'
import noImage from '@images/logos/site.webp'
import { useToast } from 'vue-toast-notification'
import SiteAddEditDialog from '../dialog/SiteAddEditDialog.vue'
import SiteUserDataDialog from '../dialog/SiteUserDataDialog.vue'
@@ -54,6 +55,9 @@ const siteStats = ref<SiteStatistic>({})
async function getSiteIcon() {
try {
siteIcon.value = (await api.get(`site/icon/${cardProps.site?.id}`)).data.icon
if (!siteIcon.value) {
siteIcon.value = noImage
}
} catch (error) {
console.error(error)
}
@@ -212,16 +216,19 @@ onMounted(() => {
<!-- 顶部图标和站点名称 -->
<div class="flex items-center mb-1">
<!-- 站点图标 -->
<div class="site-icon-container mr-2.5" @click.stop="siteEditDialog = true">
<img :src="siteIcon" class="site-icon" :alt="cardProps.site?.name" />
<div class="site-icon-container mr-2.5">
<VImg :src="siteIcon" class="site-icon" :alt="cardProps.site?.name">
<template #placeholder>
<div class="w-full h-full">
<VSkeletonLoader class="object-cover aspect-w-1 aspect-h-1" />
</div>
</template>
</VImg>
<div class="site-icon-edit-overlay">
<VIcon icon="mdi-pencil" color="white" size="16" />
<VIcon icon="mdi-drag" color="white" size="24" class="cursor-move" />
</div>
</div>
<!-- 拖动图标 -->
<VIcon icon="mdi-drag" size="20" class="drag-handle cursor-move opacity-40 mr-1.5 z-10" />
<!-- 站点名称和特性图标 -->
<div class="flex-1 min-w-0 flex items-center">
<h3 class="site-title truncate">{{ cardProps.site?.name }}</h3>
@@ -245,7 +252,7 @@ onMounted(() => {
</div>
<!-- 中间部分网址 -->
<div class="site-meta mb-1.5">
<div class="site-meta my-3">
<div class="site-url truncate" @click.stop="openSitePage">
{{ cardProps.site?.url }}
</div>
@@ -366,7 +373,6 @@ onMounted(() => {
.site-card {
position: relative;
overflow: hidden;
border: 1px solid rgba(var(--v-theme-on-surface), 0.09);
border-radius: 10px;
background: rgba(var(--v-theme-surface), 0.95);
cursor: pointer;
@@ -374,7 +380,7 @@ onMounted(() => {
}
.site-card:hover {
border-color: rgba(var(--v-theme-primary), 0.2);
border: 1px solid rgba(var(--v-theme-primary), 0.2);
box-shadow: 0 3px 12px -6px rgba(0, 0, 0, 10%);
transform: translateY(-4px);
}
@@ -393,7 +399,7 @@ onMounted(() => {
.site-status-indicator {
position: absolute;
z-index: 1;
block-size: 2px;
block-size: 4px;
inset-block-start: 0;
inset-inline: 0;
opacity: 0.5;
@@ -643,7 +649,6 @@ onMounted(() => {
/* 数据统计 */
.site-stats {
margin-block-start: auto;
padding-block-start: 1rem;
}
.site-data-values {

View File

@@ -288,7 +288,6 @@ onUnmounted(() => {
}
.user-card-admin {
border: 2px solid transparent;
background-clip: content-box, border-box;
background-image: linear-gradient(rgb(var(--v-theme-surface)), rgb(var(--v-theme-surface))),
linear-gradient(120deg, rgba(var(--v-theme-warning), 0.5), rgba(var(--v-theme-error), 0.5));
@@ -318,7 +317,7 @@ onUnmounted(() => {
align-items: center;
inset-block-start: 0;
inset-inline: 0;
padding-block: 4px;
padding-block: 8px;
padding-inline: 12px;
}

View File

@@ -125,7 +125,7 @@ onMounted(() => {
<span v-if="title">{{ torrent?.site_name }} - {{ title }}</span>
<span v-else>确认下载</span>
</VCardTitle>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VList lines="one">
<VListItem>

View File

@@ -31,7 +31,7 @@ async function savaAlistConfig() {
<template>
<VDialog width="50rem" scrollable max-height="85vh">
<VCard title="AList配置" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText>
<VRow>
<VCol cols="12">

View File

@@ -86,7 +86,7 @@ onUnmounted(() => {
<template>
<VDialog width="40rem" scrollable max-height="85vh">
<VCard title="阿里云盘登录" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText class="pt-2 flex flex-col items-center">
<div class="my-6 shadow-lg rounded text-center p-3 border">
<VImg class="mx-auto" :src="qrCodeUrl" width="200" height="200">

View File

@@ -165,7 +165,7 @@ onMounted(() => {
<template>
<VDialog max-width="40rem" scrollable>
<VCard>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText>
<VCol>
<div class="d-flex justify-space-between flex-wrap flex-md-nowrap flex-column flex-md-row">

View File

@@ -21,7 +21,7 @@ function handleImport() {
<template>
<VDialog width="40rem" scrollable max-height="85vh" persistent>
<VCard :title="props.title" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText class="pt-2">
<VTextarea v-model="codeString" />
</VCardText>

View File

@@ -13,7 +13,7 @@ const emit = defineEmits(['close'])
<template>
<VDialog max-width="50rem">
<VCard>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardItem>
<MediaInfoCard :context="context" />
</VCardItem>

View File

@@ -92,7 +92,7 @@ onBeforeMount(async () => {
<template>
<VDialog scrollable max-width="60rem" :fullscreen="!display.mdAndUp.value">
<VCard :title="`${props.plugin?.plugin_name} - 配置`" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardText v-if="isRefreshed">
<FormRender v-for="(item, index) in pluginFormItems" :key="index" :config="item" :model="pluginConfigForm" />

View File

@@ -43,7 +43,7 @@ onMounted(() => {
<template>
<VDialog scrollable max-width="80rem" :fullscreen="!display.mdAndUp.value">
<VCard :title="`${props.plugin?.plugin_name}`" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<LoadingBanner v-if="!isRefreshed" class="mt-5" />
<VCardText v-else class="min-h-40">
<PageRender @action="loadPluginPage" v-for="(item, index) in pluginPageItems" :key="index" :config="item" />

View File

@@ -48,7 +48,7 @@ onMounted(() => {
<VIcon icon="mdi-store-cog" class="me-2" />
插件仓库设置
</VCardTitle>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
</VCardItem>
<VCardText class="pt-2">
<VTextarea

View File

@@ -39,7 +39,7 @@ async function savaRcloneConfig() {
<template>
<VDialog width="50rem" scrollable max-height="85vh">
<VCard title="RClone配置" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText>
<VRow>
<VCol cols="12">

View File

@@ -224,7 +224,7 @@ onUnmounted(() => {
<template>
<VDialog scrollable max-width="45rem" :fullscreen="!display.mdAndUp.value">
<VCard :title="dialogTitle" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardText>
<VForm @submit.prevent="() => {}">

View File

@@ -148,7 +148,7 @@ onMounted(async () => {
:title="`${props.oper === 'add' ? '新增' : '编辑'}站点${props.oper !== 'add' ? ` - ${siteForm.name}` : ''}`"
class="rounded-t"
>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardText>
<VForm @submit.prevent="() => {}">

View File

@@ -70,7 +70,7 @@ async function updateSiteCookie() {
<VDialog max-width="30rem">
<!-- Dialog Content -->
<VCard title="更新站点Cookie & UA">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardText>
<VForm @submit.prevent="() => {}">

View File

@@ -285,7 +285,7 @@ onBeforeMount(async () => {
>{{ `数据 - ${props.site?.name}` }}
<IconBtn @click.stop="refreshSiteData" color="info"><VIcon icon="mdi-refresh" /></IconBtn>
</VCardTitle>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
</VCardItem>
<VDivider />
<VCardText class="pt-5">

View File

@@ -370,7 +370,7 @@ onMounted(() => {
class="rounded-t"
>
<VCardText>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VForm @submit.prevent="() => {}">
<VTabs v-model="activeTab" show-arrows>
<VTab value="basic">

View File

@@ -78,7 +78,7 @@ onBeforeMount(() => {
<VDialog scrollable max-width="80rem" :fullscreen="!display.mdAndUp.value">
<VCard class="rounded-t">
<VCardItem class="my-2">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
</VCardItem>
<VCardText>
<div class="media-page">
@@ -237,7 +237,7 @@ onBeforeMount(() => {
.media-overview {
display: flex;
flex-direction: column;
padding-block: 1rem 1rem;
padding-block: 1rem;
}
@media (width >= 1024px) {

View File

@@ -138,7 +138,7 @@ const dropdownItems = ref([
<VCardTitle>{{ props.type + '订阅历史' }}</VCardTitle>
</VCardItem>
<VDivider />
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VList lines="two">
<VInfiniteScroll mode="intersect" side="end" :items="historyList" class="overflow-hidden" @load="loadHistory">
<template #loading>

View File

@@ -189,7 +189,7 @@ onMounted(async () => {
<template>
<VBottomSheet inset scrollable>
<VCard class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardItem>
<VCardTitle class="pe-10"> 订阅 - {{ props.media?.title }} </VCardTitle>
</VCardItem>

View File

@@ -57,7 +57,7 @@ const $toast = useToast()
class="rounded-t"
>
<VCardText>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VForm @submit.prevent="() => {}" class="pt-2">
<VRow>
<VCol cols="12">

View File

@@ -140,7 +140,7 @@ onUnmounted(() => {
<VCardItem>
<VCardTitle>整理队列</VCardTitle>
</VCardItem>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VProgressLinear
v-if="dataList.length > 0 && progressValue > 0"

View File

@@ -93,7 +93,7 @@ onUnmounted(() => {
<template>
<VDialog width="40rem" scrollable max-height="85vh">
<VCard title="115网盘登录" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText class="pt-2 flex flex-col items-center">
<div class="my-6 shadow-lg rounded text-center p-3 border">
<QrcodeVue class="mx-auto" :value="qrCodeContent" :size="200" />

View File

@@ -291,7 +291,7 @@ onMounted(() => {
:title="`${props.oper === 'add' ? '新增' : '编辑'}用户${props.oper !== 'add' ? ` - ${userName}` : ''}`"
class="rounded-t"
>
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardItem>
<!-- 👉 Avatar -->

View File

@@ -131,7 +131,7 @@ onMounted(async () => {
<template>
<VDialog width="40rem" max-height="85vh">
<VCard title="用户认证" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VCardText>
<VRow>
<VCol cols="12">

View File

@@ -81,7 +81,7 @@ async function editWorkflow() {
<template>
<VDialog scrollable :close-on-back="false" eager max-width="30rem" :fullscreen="!display.mdAndUp.value">
<VCard :title="`${title}任务`" class="rounded-t">
<DialogCloseBtn @click="emit('close')" />
<VDialogCloseBtn @click="emit('close')" />
<VDivider />
<VCardText>
<VForm @submit.prevent="() => {}">

View File

@@ -688,7 +688,7 @@ onMounted(() => {
<!-- 重命名弹窗 -->
<VDialog v-if="renamePopper" v-model="renamePopper" max-width="35rem">
<VCard title="重命名">
<DialogCloseBtn @click="renamePopper = false" />
<VDialogCloseBtn @click="renamePopper = false" />
<VDivider />
<VCardText>
<VRow>

View File

@@ -168,7 +168,7 @@ const sortIcon = computed(() => {
</IconBtn>
</template>
<VCard title="新建文件夹">
<DialogCloseBtn @click="newFolderPopper = false" />
<VDialogCloseBtn @click="newFolderPopper = false" />
<VDivider />
<VCardText>
<VTextField v-model="newFolderName" label="名称" />

View File

@@ -103,7 +103,7 @@ onMounted(() => {
@keydown.enter="searchMedias"
/>
</VToolbar>
<DialogCloseBtn
<VDialogCloseBtn
@click="
() => {
emit('close')

View File

@@ -96,7 +96,6 @@ onUnmounted(() => {
backdrop-filter: blur(10px);
background-color: rgba(var(--v-theme-background), 0.8);
border-block-end: 1px solid rgba(var(--v-theme-on-surface), 0.05);
gap: 16px; // 为按钮留出空间
inset-block-start: 0;
margin-block-end: 16px;
padding-block: 8px;

View File

@@ -0,0 +1,18 @@
<script setup lang="ts">
defineProps({
// 标题
title: String,
})
</script>
<template>
<div v-if="title" class="my-3 md:flex md:items-center md:justify-between">
<div class="min-w-0 flex-1 mx-0">
<h2
class="ms-1 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">{{ title }}</span>
</h2>
</div>
</div>
</template>

View File

@@ -210,7 +210,7 @@ onMounted(() => {
<VIcon icon="mdi-text-recognition" class="me-2" />
名称识别测试
</VCardTitle>
<DialogCloseBtn @click="nameTestDialog = false" />
<VDialogCloseBtn @click="nameTestDialog = false" />
</VCardItem>
<VDivider />
<VCardText>
@@ -226,7 +226,7 @@ onMounted(() => {
<VIcon icon="mdi-network" class="me-2" />
网速连通性测试
</VCardTitle>
<DialogCloseBtn @click="netTestDialog = false" />
<VDialogCloseBtn @click="netTestDialog = false" />
</VCardItem>
<VDivider />
<VCardText>
@@ -243,7 +243,7 @@ onMounted(() => {
:fullscreen="!display.mdAndUp.value"
>
<VCard>
<DialogCloseBtn @click="loggingDialog = false" />
<VDialogCloseBtn @click="loggingDialog = false" />
<VCardItem>
<VCardTitle class="inline-flex">
<VIcon icon="mdi-file-document" class="me-2" />
@@ -272,7 +272,7 @@ onMounted(() => {
<VIcon icon="mdi-filter-cog" class="me-2" />
规则测试
</VCardTitle>
<DialogCloseBtn @click="ruleTestDialog = false" />
<VDialogCloseBtn @click="ruleTestDialog = false" />
</VCardItem>
<VDivider />
<VCardText>
@@ -288,7 +288,7 @@ onMounted(() => {
<VIcon icon="mdi-cog" class="me-2" />
系统健康检查
</VCardTitle>
<DialogCloseBtn @click="systemTestDialog = false" />
<VDialogCloseBtn @click="systemTestDialog = false" />
</VCardItem>
<VDivider />
<VCardText>
@@ -310,7 +310,7 @@ onMounted(() => {
<VIcon icon="mdi-message" class="me-2" />
消息中心
</VCardTitle>
<DialogCloseBtn @click="messageDialog = false" />
<VDialogCloseBtn @click="messageDialog = false" />
</VCardItem>
<VDivider />
<VCardText ref="chatContainer">

View File

@@ -189,7 +189,7 @@ const userLevel = computed(() => userStore.level)
<VBtn variant="elevated" color="error" @click="restart" prepend-icon="mdi-restart" class="px-5"> 确定 </VBtn>
<VBtn variant="tonal" color="secondary" class="px-5" @click="restartDialog = false">取消</VBtn>
</VCardActions>
<DialogCloseBtn @click="restartDialog = false" />
<VDialogCloseBtn @click="restartDialog = false" />
</VCard>
</VDialog>
</template>

View File

@@ -38,6 +38,7 @@ import MediaIdSelector from './components/misc/MediaIdSelector.vue'
import CronField from './components/field/CronField.vue'
import PathField from './components/field/PathField.vue'
import HeaderTab from './layouts/components/HeaderTab.vue'
import PageContentTitle from './layouts/components/PageContentTitle.vue'
// 7. 样式文件
import '@core/scss/template/libs/vuetify/index.scss'
@@ -95,6 +96,7 @@ initializeApp().then(() => {
.component('VCronField', CronField)
.component('VPathField', PathField)
.component('VHeaderTab', HeaderTab)
.component('VPageContentTitle', PageContentTitle)
// 5. 注册其他插件
app

View File

@@ -27,16 +27,7 @@ function getApiPath(paths: string[] | string) {
<template>
<div>
<div v-if="title" class="my-3 md:flex md:items-center md:justify-between">
<div class="min-w-0 flex-1 mx-0">
<h2
class="ms-1 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">{{ title }}</span>
</h2>
</div>
</div>
<VPageContentTitle :title="title" />
<PersonCardListView v-if="type === 'person'" :apipath="getApiPath(props.paths || '')" :params="route.query" />
<MediaCardListView v-else :apipath="getApiPath(props.paths || '')" :params="route.query" />
<VScrollToTopBtn />

View File

@@ -18,26 +18,14 @@ const type = route.query?.type?.toString()
// 计算API路径
function getApiPath(paths: string[] | string) {
if (Array.isArray(paths))
return paths.join('/')
else
return paths
if (Array.isArray(paths)) return paths.join('/')
else return paths
}
</script>
<template>
<div>
<div v-if="title" class="mt-3 md:flex md:items-center md:justify-between">
<div class="min-w-0 flex-1 mx-0">
<h2 class="mb-4 truncate text-2xl font-bold leading-7 text-gray-100 sm:overflow-visible sm:text-4xl sm:leading-9 md:mb-0" data-testid="page-header">
<span class="text-moviepilot">{{ title }}</span>
</h2>
</div>
</div>
<PersonCardListView
:apipath="getApiPath(props.paths || '')"
:params="route.query"
:type="type"
/>
<VPageContentTitle :title="title" />
<PersonCardListView :apipath="getApiPath(props.paths || '')" :params="route.query" :type="type" />
</div>
</template>

View File

@@ -347,7 +347,7 @@ onDeactivated(() => {
<VIcon icon="mdi-tune" size="small" class="me-2" />
设置仪表板
</VCardTitle>
<DialogCloseBtn @click="dialog = false" />
<VDialogCloseBtn @click="dialog = false" />
</VCardItem>
<VDivider />
<VCardText>

View File

@@ -135,7 +135,7 @@ onActivated(async () => {
<VBtn
icon="mdi-order-alphabetical-ascending"
variant="text"
color="primary"
color="grey"
size="default"
class="settings-icon-button"
@click="orderConfigDialog = true"
@@ -181,7 +181,7 @@ onActivated(async () => {
<VIcon icon="mdi-order-alphabetical-ascending" size="small" class="me-2" />
设置标签顺序
</VCardTitle>
<DialogCloseBtn @click="orderConfigDialog = false" />
<VDialogCloseBtn @click="orderConfigDialog = false" />
</VCardItem>
<VDivider />
<VCardText>

View File

@@ -205,7 +205,7 @@ onActivated(async () => {
<VBtn
icon="mdi-tune"
variant="text"
color="primary"
color="grey"
size="default"
class="settings-icon-button"
@click="dialog = true"
@@ -234,7 +234,7 @@ onActivated(async () => {
<VIcon icon="mdi-tune" size="small" class="me-2" />
自定义内容
</VCardTitle>
<DialogCloseBtn @click="dialog = false" />
<VDialogCloseBtn @click="dialog = false" />
</VCardItem>
<VDivider />
<VCardText>

View File

@@ -12,17 +12,30 @@ const subType = route.meta.subType?.toString()
const subId = ref(route.query.id as string)
const activeTab = ref(route.query.tab)
const shareViewKey = ref(0)
const subscribeViewKey = ref(0)
// 默认订阅设置弹窗
const subscribeEditDialog = ref(false)
// 订阅过滤弹窗
const filterSubscribeDialog = ref(false)
// 搜索订阅分享弹窗
const searchShareDialog = ref(false)
// 分享订阅过滤词
const shareFilter = ref('')
// 订阅过滤词
const subscribeFilter = ref('')
// 触发搜索订阅
// 分享搜索词
const shareKeyword = ref('')
// 过滤订阅
const filterSubscribes = () => {
filterSubscribeDialog.value = false
subscribeViewKey.value++
}
// 搜索分享
const searchShares = () => {
searchShareDialog.value = false
shareViewKey.value++
@@ -33,26 +46,50 @@ const searchShares = () => {
<div>
<VHeaderTab :items="subType == '电影' ? SubscribeMovieTabs : SubscribeTvTabs" v-model="activeTab">
<template #append>
<VBtn
<VMenu
v-if="activeTab === '我的订阅'"
icon="mdi-clipboard-edit-outline"
variant="text"
color="primary"
size="default"
class="settings-icon-button"
@click="subscribeEditDialog = true"
/>
v-model="filterSubscribeDialog"
width="25rem"
:close-on-content-click="false"
>
<template #activator="{ props }">
<VBtn
icon="mdi-filter-cog-outline"
variant="text"
:color="subscribeFilter ? 'primary' : 'gray'"
size="default"
class="settings-icon-button"
v-bind="props"
/>
</template>
<VCard>
<VCardItem>
<VCardTitle>
<VIcon icon="mdi-filter-cog-outline" class="mr-2" />
筛选订阅
</VCardTitle>
<VDialogCloseBtn @click="filterSubscribeDialog = false" />
</VCardItem>
<VCardText>
<VTextField v-model="subscribeFilter" label="名称" clearable density="comfortable">
<template #append>
<VBtn prepend-icon="mdi-check" color="primary" @click="filterSubscribes">确定</VBtn>
</template>
</VTextField>
</VCardText>
</VCard>
</VMenu>
<VMenu
v-if="activeTab === '订阅分享'"
v-model="searchShareDialog"
width="35rem"
width="25rem"
:close-on-content-click="false"
>
<template #activator="{ props }">
<VBtn
icon="mdi-movie-search-outline"
variant="text"
color="primary"
:color="shareKeyword ? 'primary' : 'gray'"
size="default"
class="settings-icon-button"
v-bind="props"
@@ -64,10 +101,10 @@ const searchShares = () => {
<VIcon icon="mdi-movie-search-outline" class="mr-2" />
搜索订阅分享
</VCardTitle>
<DialogCloseBtn @click="searchShareDialog = false" />
<VDialogCloseBtn @click="searchShareDialog = false" />
</VCardItem>
<VCardText>
<VTextField v-model="shareFilter" label="搜索关键词" clearable>
<VTextField v-model="shareKeyword" label="关键词" clearable density="comfortable">
<template #append>
<VBtn prepend-icon="mdi-magnify" color="primary" @click="searchShares">搜索</VBtn>
</template>
@@ -75,14 +112,23 @@ const searchShares = () => {
</VCardText>
</VCard>
</VMenu>
<VBtn
v-if="activeTab === '我的订阅'"
icon="mdi-clipboard-edit-outline"
variant="text"
color="gray"
size="default"
class="settings-icon-button"
@click="subscribeEditDialog = true"
/>
</template>
</VHeaderTab>
<VWindow v-model="activeTab" class="disable-tab-transition" :touch="false">
<VWindowItem value="我的订阅">
<transition name="fade-slide" appear>
<div class="mt-4">
<SubscribeListView :type="subType" :subid="subId" />
<div>
<SubscribeListView :type="subType" :subid="subId" :key="subscribeViewKey" :keyword="subscribeFilter" />
</div>
</transition>
</VWindowItem>
@@ -96,7 +142,7 @@ const searchShares = () => {
<VWindowItem value="订阅分享">
<transition name="fade-slide" appear>
<div>
<SubscribeShareView :keyword="shareFilter" :key="shareViewKey" />
<SubscribeShareView :keyword="shareKeyword" :key="shareViewKey" />
</div>
</transition>
</VWindowItem>

View File

@@ -134,6 +134,7 @@ html {
.backdrop-blur {
--tw-backdrop-blur: blur(8px)!important;
backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)!important;
}
@@ -319,3 +320,8 @@ html {
flex-shrink: 0;
min-inline-size: auto;
}
.v-infinite-scroll__side {
padding: 0;
}

View File

@@ -47,6 +47,9 @@ const loading = ref(false)
// 已安装插件列表
const dataList = ref<Plugin[]>([])
// 过滤后的已安装插件列表
const filteredDataList = ref<Plugin[]>([])
// 未安装插件列表
const uninstalledList = ref<Plugin[]>([])
@@ -101,6 +104,25 @@ const filterForm = reactive({
repo: [] as string[],
})
// 计算过滤表单是否全部为空
const isFilterFormEmpty = computed(() => {
return (
filterForm.name === '' &&
filterForm.author.length === 0 &&
filterForm.label.length === 0 &&
filterForm.repo.length === 0
)
})
// 插件过滤条件
const installedFilter = ref('')
// 已安装插件过滤窗口
const filterInstalledPluginDialog = ref(false)
// 插件市场过滤窗口
const filterMarketPluginDialog = ref(false)
// 作者过滤项
const authorFilterOptions = ref<string[]>([])
// 标签过滤项
@@ -380,6 +402,13 @@ function handleRepoUrl(url: string | undefined) {
return url.replace('https://github.com/', '').replace('https://raw.githubusercontent.com/', '')
}
// 监测dataList变化或installedFilter变化时更新filteredDataList
watch([dataList, installedFilter], () => {
filteredDataList.value = dataList.value.filter(item => {
return item.plugin_name?.toLowerCase().includes(installedFilter.value.toLowerCase())
})
})
// 加载时获取数据
onMounted(async () => {
await loadPluginOrderConfig()
@@ -399,10 +428,112 @@ onMounted(async () => {
<div>
<VHeaderTab :items="PluginTabs" v-model="activeTab">
<template #append>
<VMenu
v-if="activeTab === '我的插件'"
v-model="filterInstalledPluginDialog"
width="20rem"
:close-on-content-click="false"
>
<template #activator="{ props }">
<VBtn
icon="mdi-filter-cog-outline"
variant="text"
:color="installedFilter ? 'primary' : 'gray'"
size="default"
class="settings-icon-button"
v-bind="props"
/>
</template>
<VCard>
<VCardItem>
<VCardTitle>
<VIcon icon="mdi-filter-cog-outline" class="mr-2" />
筛选插件
</VCardTitle>
<VDialogCloseBtn @click="filterInstalledPluginDialog = false" />
</VCardItem>
<VCardText>
<VTextField v-model="installedFilter" label="名称" density="comfortable" clearable />
</VCardText>
</VCard>
</VMenu>
<VMenu
v-if="activeTab === '插件市场'"
v-model="filterMarketPluginDialog"
width="25rem"
:close-on-content-click="false"
>
<template #activator="{ props }">
<VBtn
icon="mdi-filter-cog-outline"
variant="text"
:color="isFilterFormEmpty ? 'gray' : 'primary'"
size="default"
class="settings-icon-button"
v-bind="props"
/>
</template>
<VCard>
<VCardItem>
<VCardTitle>
<VIcon icon="mdi-filter-cog-outline" class="mr-2" />
筛选插件
</VCardTitle>
<VDialogCloseBtn @click="filterMarketPluginDialog = false" />
</VCardItem>
<VCardText>
<!-- 过滤表单 -->
<div v-if="isAppMarketLoaded">
<VRow>
<VCol cols="12" md="6">
<VTextField v-model="filterForm.name" density="comfortable" label="名称" clearable />
</VCol>
<VCol v-if="authorFilterOptions.length > 0" cols="12" md="6">
<VSelect
v-model="filterForm.author"
:items="authorFilterOptions"
density="comfortable"
chips
label="作者"
multiple
clearable
/>
</VCol>
<VCol v-if="labelFilterOptions.length > 0" cols="12" md="6">
<VSelect
v-model="filterForm.label"
:items="labelFilterOptions"
density="comfortable"
chips
label="标签"
multiple
clearable
/>
</VCol>
<VCol v-if="repoFilterOptions.length > 0" cols="12" md="6">
<VSelect
v-model="filterForm.repo"
:items="repoFilterOptions"
density="comfortable"
chips
label="插件库"
multiple
clearable
/>
</VCol>
<VCol v-if="repoFilterOptions.length > 0" cols="12" md="6">
<VSelect v-model="activeSort" :items="sortOptions" density="comfortable" label="排序" />
</VCol>
</VRow>
</div>
</VCardText>
</VCard>
</VMenu>
<VBtn
v-if="activeTab === '插件市场'"
icon="mdi-store-cog"
variant="text"
color="primary"
color="gray"
size="default"
class="settings-icon-button"
@click="MarketSettingDialog = true"
@@ -415,10 +546,11 @@ onMounted(async () => {
<VWindowItem value="我的插件">
<transition name="fade-slide" appear>
<div>
<VPageContentTitle v-if="installedFilter" :title="`筛选:${installedFilter}`" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<draggable
v-if="dataList.length > 0"
v-model="dataList"
v-if="filteredDataList.length > 0"
v-model="filteredDataList"
@end="savePluginOrder"
handle=".cursor-move"
item-key="id"
@@ -437,10 +569,12 @@ onMounted(async () => {
</template>
</draggable>
<NoDataFound
v-if="dataList.length === 0 && isRefreshed"
v-if="filteredDataList.length === 0 && isRefreshed"
error-code="404"
error-title="没有安装插件"
error-description="点击右下角按钮前往插件市场安装插件"
error-title="没有数据"
:error-description="
installedFilter ? '没有搜索到相关内容请更换搜索关键词' : '请先前往插件市场安装插件'
"
/>
</div>
</transition>
@@ -450,50 +584,6 @@ onMounted(async () => {
<transition name="fade-slide" appear>
<div>
<LoadingBanner v-if="!isAppMarketLoaded" class="mt-12" />
<!-- 过滤表单 -->
<div v-if="isAppMarketLoaded" class="bg-transparent mb-3 shadow-none">
<VRow>
<VCol cols="6" md="">
<VTextField v-model="filterForm.name" density="compact" label="名称" clearable />
</VCol>
<VCol v-if="authorFilterOptions.length > 0" cols="6" md="">
<VSelect
v-model="filterForm.author"
:items="authorFilterOptions"
density="compact"
chips
label="作者"
multiple
clearable
/>
</VCol>
<VCol v-if="labelFilterOptions.length > 0" cols="6" md="">
<VSelect
v-model="filterForm.label"
:items="labelFilterOptions"
density="compact"
chips
label="标签"
multiple
clearable
/>
</VCol>
<VCol v-if="repoFilterOptions.length > 0" cols="6" md="">
<VSelect
v-model="filterForm.repo"
:items="repoFilterOptions"
density="compact"
chips
label="插件库"
multiple
clearable
/>
</VCol>
<VCol v-if="repoFilterOptions.length > 0" cols="6" md="">
<VSelect v-model="activeSort" :items="sortOptions" density="compact" label="排序" />
</VCol>
</VRow>
</div>
<div v-if="isAppMarketLoaded" class="grid gap-4 grid-plugin-card">
<template v-for="(data, index) in sortedUninstalledList" :key="`${data.id}_v${data.plugin_version}`">
<PluginAppCard :plugin="data" :count="PluginStatistics[data.id || '0']" @install="pluginInstalled" />
@@ -555,7 +645,7 @@ onMounted(async () => {
class="mx-1"
/>
</VToolbar>
<DialogCloseBtn @click="closeSearchDialog" />
<VDialogCloseBtn @click="closeSearchDialog" />
<VList v-if="filterPlugins.length > 0" lines="three">
<VVirtualScroll :items="filterPlugins">
<template #default="{ item }">

View File

@@ -690,7 +690,7 @@ onMounted(fetchData)
<!-- 底部弹窗 -->
<VBottomSheet v-model="deleteConfirmDialog" inset>
<VCard class="text-center rounded-t">
<DialogCloseBtn @click="deleteConfirmDialog = false" />
<VDialogCloseBtn @click="deleteConfirmDialog = false" />
<VCardTitle class="pe-10">
{{ confirmTitle }}
</VCardTitle>

View File

@@ -258,7 +258,7 @@ onMounted(() => {
<VDialog v-if="releaseDialog" v-model="releaseDialog" width="600" scrollable>
<VCard>
<VCardItem>
<DialogCloseBtn @click="releaseDialog = false" />
<VDialogCloseBtn @click="releaseDialog = false" />
<VCardTitle>{{ releaseDialogTitle }} 变更日志</VCardTitle>
</VCardItem>
<VCardText v-html="releaseDialogBody" />

View File

@@ -554,7 +554,7 @@ onDeactivated(() => {
<VDialog v-if="advancedDialog" v-model="advancedDialog" scrollable max-width="60rem" persistent>
<VCard>
<VCardItem>
<DialogCloseBtn @click="advancedDialog = false" />
<VDialogCloseBtn @click="advancedDialog = false" />
<VCardTitle>高级设置</VCardTitle>
<VCardSubtitle>系统进阶设置特殊情况下才需要调整</VCardSubtitle>
</VCardItem>

View File

@@ -89,16 +89,7 @@ onActivated(() => {
<template>
<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>
<VPageContentTitle title="站点管理" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<draggable
v-if="siteList.length > 0"

View File

@@ -19,11 +19,15 @@ const userStore = useUserStore()
const props = defineProps({
type: String,
subid: String,
keyword: String,
})
// 是否刷新过
let isRefreshed = ref(false)
// 搜索关键字
const keyword = ref(props.keyword || '')
// 顺序存储键值
const localOrderKey = props.type === '电影' ? 'MP_SUBSCRIBE_MOVIE_ORDER' : 'MP_SUBSCRIBE_TV_ORDER'
const orderRequestKey = props.type === '电影' ? 'SubscribeMovieOrder' : 'SubscribeTvOrder'
@@ -50,6 +54,10 @@ watch(dataList, () => {
const userName = userStore.userName
if (superUser) displayList.value = dataList.value.filter(data => data.type === props.type)
else displayList.value = dataList.value.filter(data => data.type === props.type && data.username === userName)
// 过滤关键字
if (keyword.value) {
displayList.value = displayList.value.filter(data => data.name.toLowerCase().includes(keyword.value.toLowerCase()))
}
// 排序
sortSubscribeOrder()
})
@@ -139,6 +147,7 @@ onActivated(async () => {
</script>
<template>
<VPageContentTitle v-if="keyword" :title="`筛选:${keyword}`" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<draggable
v-if="displayList.length > 0"
@@ -156,8 +165,8 @@ onActivated(async () => {
<NoDataFound
v-if="displayList.length === 0 && isRefreshed"
error-code="404"
error-title="没有订阅"
error-description="请通过搜索添加电影电视剧订阅"
error-title="没有数据"
:error-description="keyword ? '没有搜索到相关内容请更换搜索关键词' : '请通过搜索添加电影电视剧订阅'"
/>
<!-- 底部操作按钮 -->
<div v-if="isRefreshed">

View File

@@ -21,6 +21,9 @@ const apipath = 'subscribe/shares'
// 当前页码
const page = ref(1)
// 搜索关键字
const keyword = ref(props.keyword)
// 是否加载中
const loading = ref(false)
@@ -36,7 +39,7 @@ function getParams() {
let params = {
page: page.value,
count: 30,
name: props.keyword,
name: keyword.value,
}
return params
}
@@ -112,6 +115,7 @@ function removeData(id: number) {
</script>
<template>
<VPageContentTitle v-if="keyword" :title="`搜索:${keyword}`" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<VInfiniteScroll mode="intersect" side="end" :items="dataList" class="overflow-hidden" @load="fetchData">
<template #loading />
@@ -126,7 +130,7 @@ function removeData(id: number) {
error-code="404"
error-title="没有数据"
:error-description="
keyword ? '没有搜索到相关内容请更换搜索关键词' : '未获取到分享订阅数据未开启数据分享或服务器无法连接'
keyword ? '没有搜索到相关内容请更换搜索关键词' : '未获取到分享订阅数据未开启数据分享或服务器无法连接'
"
/>
</VInfiniteScroll>

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>

View File

@@ -46,17 +46,8 @@ onActivated(() => {
<template>
<div>
<!-- 页面标题 -->
<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>
<VPageContentTitle title="工作流" />
<LoadingBanner v-if="!isRefreshed" class="mt-12" />
<VRow v-if="workflowList.length > 0" class="match-height">
<VCol cols="12" md="6" lg="4" v-for="item in workflowList" :key="item.id">