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

@@ -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>