From caa67a0f49bcfcd0aab1141f526d67b9bc08845f Mon Sep 17 00:00:00 2001 From: jxxghp Date: Wed, 16 Jul 2025 09:37:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E9=98=85=E5=88=86?= =?UTF-8?q?=E4=BA=AB=E7=BB=9F=E8=AE=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/types.ts | 10 + .../dialog/SubscribeShareStatisticsDialog.vue | 306 ++++++++++++++++++ src/locales/en-US.ts | 8 +- src/locales/zh-CN.ts | 5 + src/locales/zh-TW.ts | 5 + src/pages/subscribe.vue | 23 ++ 6 files changed, 356 insertions(+), 1 deletion(-) create mode 100644 src/components/dialog/SubscribeShareStatisticsDialog.vue diff --git a/src/api/types.ts b/src/api/types.ts index becad18a..aaa846e3 100644 --- a/src/api/types.ts +++ b/src/api/types.ts @@ -1391,3 +1391,13 @@ export interface TorrentCacheData { // 缓存数据 data: TorrentCacheItem[] } + +// 订阅分享统计 +export interface SubscribeShareStatistics { + // 分享人 + share_user?: string + // 分享数量 + share_count?: number + // 总复用人次 + total_reuse_count?: number +} diff --git a/src/components/dialog/SubscribeShareStatisticsDialog.vue b/src/components/dialog/SubscribeShareStatisticsDialog.vue new file mode 100644 index 00000000..592e8df8 --- /dev/null +++ b/src/components/dialog/SubscribeShareStatisticsDialog.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index b5082f13..f4b65251 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -807,6 +807,11 @@ export default { 'After reset, {name} will be restored to its initial state, downloaded records will be cleared, and unimported content will be downloaded again. Are you sure?', resetSuccess: '{name} has been reset successfully!', resetFailed: '{name} reset failed: {message}', + shareStatistics: 'Share Statistics', + shareCount: 'Shares', + totalReuseCount: 'Total Reuse Count', + ranking: 'Ranking', + noStatisticsData: 'No share statistics data available', }, recommend: { all: 'All', @@ -1781,7 +1786,8 @@ export default { shareSuccess: '{name} shared successfully!', shareFailed: '{name} share failed: {message}!', securityWarning: 'Security Warning', - securityWarningMessage: 'Before sharing, please ensure the workflow does not contain sensitive information such as PassKey in RSS links to avoid information leakage.', + securityWarningMessage: + 'Before sharing, please ensure the workflow does not contain sensitive information such as PassKey in RSS links to avoid information leakage.', }, u115Auth: { loginTitle: '115 Cloud Login', diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 991d6602..e5700e80 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -803,6 +803,11 @@ export default { resetConfirm: '重置后 {name} 将恢复初始状态,已下载记录将被清除,未入库的内容将会重新下载,是否确认?', resetSuccess: '{name} 重置成功!', resetFailed: '{name} 重置失败:{message}', + shareStatistics: '分享统计', + shareCount: '个分享', + totalReuseCount: '次复用', + ranking: '排名', + noStatisticsData: '暂无分享统计数据', }, recommend: { all: '全部', diff --git a/src/locales/zh-TW.ts b/src/locales/zh-TW.ts index ac2ef7cf..57aa66ed 100644 --- a/src/locales/zh-TW.ts +++ b/src/locales/zh-TW.ts @@ -801,6 +801,11 @@ export default { resetConfirm: '重置後 {name} 將恢復初始狀態,已下載記錄將被清除,未入庫的內容將會重新下載,是否確認?', resetSuccess: '{name} 重置成功!', resetFailed: '{name} 重置失敗:{message}', + shareStatistics: '分享統計', + shareCount: '個分享', + totalReuseCount: '次複用', + ranking: '排名', + noStatisticsData: '暫無分享統計數據', }, recommend: { all: '全部', diff --git a/src/pages/subscribe.vue b/src/pages/subscribe.vue index 9b176979..5475766a 100644 --- a/src/pages/subscribe.vue +++ b/src/pages/subscribe.vue @@ -3,6 +3,7 @@ import SubscribeListView from '@/views/subscribe/SubscribeListView.vue' import SubscribePopularView from '@/views/subscribe/SubscribePopularView.vue' import SubscribeShareView from '@/views/subscribe/SubscribeShareView.vue' import SubscribeEditDialog from '@/components/dialog/SubscribeEditDialog.vue' +import SubscribeShareStatisticsDialog from '@/components/dialog/SubscribeShareStatisticsDialog.vue' import { useI18n } from 'vue-i18n' import { useDynamicHeaderTab } from '@/composables/useDynamicHeaderTab' @@ -36,6 +37,9 @@ const filterSubscribeDialog = ref(false) // 搜索订阅分享弹窗 const searchShareDialog = ref(false) +// 订阅分享统计弹窗 +const shareStatisticsDialog = ref(false) + // 订阅过滤词 const subscribeFilter = ref('') @@ -51,6 +55,7 @@ const searchShares = () => { // VMenu activator选择器 const filterActivator = computed(() => '[data-menu-activator="filter-btn"]') const searchActivator = computed(() => '[data-menu-activator="search-btn"]') +const statisticsActivator = computed(() => '[data-menu-activator="statistics-btn"]') // 使用动态标签页 const { registerHeaderTab } = useDynamicHeaderTab() @@ -71,6 +76,17 @@ registerHeaderTab({ }, show: computed(() => activeTab.value === 'mysub'), }, + { + icon: 'mdi-chart-line', + variant: 'text', + color: 'gray', + class: 'settings-icon-button', + dataAttr: 'statistics-btn', + action: () => { + shareStatisticsDialog.value = true + }, + show: computed(() => activeTab.value === 'share'), + }, { icon: 'mdi-movie-search-outline', variant: 'text', @@ -191,6 +207,13 @@ onMounted(() => { @save="subscribeEditDialog = false" @close="subscribeEditDialog = false" /> + + +