From 95351834056c4d84ebf5b311883735c911dcab54 Mon Sep 17 00:00:00 2001 From: alger Date: Wed, 22 Oct 2025 21:51:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E7=83=AD=E5=8A=9B=E5=9B=BE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/lang/en-US/history.ts | 26 +- src/i18n/lang/ja-JP/history.ts | 26 +- src/i18n/lang/ko-KR/history.ts | 26 +- src/i18n/lang/zh-CN/history.ts | 26 +- src/i18n/lang/zh-Hant/history.ts | 26 +- src/renderer/router/other.ts | 11 + src/renderer/views/favorite/index.vue | 3 + src/renderer/views/heatmap/index.vue | 737 ++++++++++++++++++++++++++ src/renderer/views/history/index.vue | 41 +- 9 files changed, 912 insertions(+), 10 deletions(-) create mode 100644 src/renderer/views/heatmap/index.vue diff --git a/src/i18n/lang/en-US/history.ts b/src/i18n/lang/en-US/history.ts index 3e5f33a..e9b2d53 100644 --- a/src/i18n/lang/en-US/history.ts +++ b/src/i18n/lang/en-US/history.ts @@ -1,5 +1,6 @@ export default { title: 'Play History', + heatmapTitle: 'Heatmap', playCount: '{count}', getHistoryFailed: 'Failed to get play history', categoryTabs: { @@ -17,5 +18,28 @@ export default { merging: 'Merging records...', noDescription: 'No description', noData: 'No records', - newKey: 'New translation' + newKey: 'New translation', + heatmap: { + title: 'Play Heatmap', + loading: 'Loading data...', + unit: 'plays', + footerText: 'Hover to view details', + playCount: 'Played {count} times', + topSongs: 'Top songs of the day', + times: 'times', + totalPlays: 'Total Plays', + activeDays: 'Active Days', + noData: 'No play records', + colorTheme: 'Color Theme', + colors: { + green: 'Green', + blue: 'Blue', + orange: 'Orange', + purple: 'Purple', + red: 'Red' + }, + mostPlayedSong: 'Most Played Song', + mostActiveDay: 'Most Active Day', + latestNightSong: 'Latest Night Song' + } }; diff --git a/src/i18n/lang/ja-JP/history.ts b/src/i18n/lang/ja-JP/history.ts index 20518a5..959d013 100644 --- a/src/i18n/lang/ja-JP/history.ts +++ b/src/i18n/lang/ja-JP/history.ts @@ -1,5 +1,6 @@ export default { title: '再生履歴', + heatmapTitle: 'ヒートマップ', playCount: '{count}', getHistoryFailed: '履歴の取得に失敗しました', tabs: { @@ -9,5 +10,28 @@ export default { }, getCloudRecordFailed: 'クラウド記録の取得に失敗しました', needLogin: 'cookieを使用してログインしてクラウド記録を表示できます', - merging: '記録を統合中...' + merging: '記録を統合中...', + heatmap: { + title: '再生ヒートマップ', + loading: 'データを読み込み中...', + unit: '回再生', + footerText: 'ホバーして詳細を表示', + playCount: '{count} 回再生', + topSongs: 'その日の人気曲', + times: '回', + totalPlays: '総再生回数', + activeDays: 'アクティブ日数', + noData: '再生記録がありません', + colorTheme: 'カラーテーマ', + colors: { + green: 'グリーン', + blue: 'ブルー', + orange: 'オレンジ', + purple: 'パープル', + red: 'レッド' + }, + mostPlayedSong: '最も再生された曲', + mostActiveDay: '最もアクティブな日', + latestNightSong: '深夜に再生した曲' + } }; diff --git a/src/i18n/lang/ko-KR/history.ts b/src/i18n/lang/ko-KR/history.ts index a44506f..a821abf 100644 --- a/src/i18n/lang/ko-KR/history.ts +++ b/src/i18n/lang/ko-KR/history.ts @@ -1,5 +1,6 @@ export default { title: '재생 기록', + heatmapTitle: '히트맵', playCount: '{count}', getHistoryFailed: '기록 가져오기 실패', tabs: { @@ -9,5 +10,28 @@ export default { }, getCloudRecordFailed: '클라우드 기록 가져오기 실패', needLogin: 'cookie를 사용하여 로그인하여 클라우드 기록을 볼 수 있습니다', - merging: '기록 병합 중...' + merging: '기록 병합 중...', + heatmap: { + title: '재생 히트맵', + loading: '데이터 로딩 중...', + unit: '회 재생', + footerText: '마우스를 올려서 자세히 보기', + playCount: '{count}회 재생', + topSongs: '오늘의 인기곡', + times: '회', + totalPlays: '총 재생 횟수', + activeDays: '활동 일수', + noData: '재생 기록이 없습니다', + colorTheme: '색상 테마', + colors: { + green: '그린', + blue: '블루', + orange: '오렌지', + purple: '퍼플', + red: '레드' + }, + mostPlayedSong: '가장 많이 재생한 노래', + mostActiveDay: '가장 활발한 날', + latestNightSong: '가장 늘게 재생한 노래' + } }; diff --git a/src/i18n/lang/zh-CN/history.ts b/src/i18n/lang/zh-CN/history.ts index bbc6c59..6961871 100644 --- a/src/i18n/lang/zh-CN/history.ts +++ b/src/i18n/lang/zh-CN/history.ts @@ -1,5 +1,6 @@ export default { title: '播放历史', + heatmapTitle: '热力图', playCount: '{count}', getHistoryFailed: '获取历史记录失败', categoryTabs: { @@ -16,5 +17,28 @@ export default { needLogin: '请使用cookie登录以查看云端记录', merging: '正在合并记录...', noDescription: '暂无描述', - noData: '暂无记录' + noData: '暂无记录', + heatmap: { + title: '播放热力图', + loading: '正在加载数据...', + unit: '次播放', + footerText: '鼠标悬停查看详细信息', + playCount: '播放 {count} 次', + topSongs: '当天热门歌曲', + times: '次', + totalPlays: '总播放次数', + activeDays: '活跃天数', + noData: '暂无播放记录', + colorTheme: '配色方案', + colors: { + green: '绿色', + blue: '蓝色', + orange: '橙色', + purple: '紫色', + red: '红色' + }, + mostPlayedSong: '播放最多的歌曲', + mostActiveDay: '最活跃的一天', + latestNightSong: '最晚播放的歌曲' + } }; diff --git a/src/i18n/lang/zh-Hant/history.ts b/src/i18n/lang/zh-Hant/history.ts index 8f13d55..8a8f135 100644 --- a/src/i18n/lang/zh-Hant/history.ts +++ b/src/i18n/lang/zh-Hant/history.ts @@ -1,5 +1,6 @@ export default { title: '播放歷史', + heatmapTitle: '熱力圖', playCount: '{count}', getHistoryFailed: '取得歷史記錄失敗', categoryTabs: { @@ -16,5 +17,28 @@ export default { needLogin: '請使用cookie登入以查看雲端記錄', merging: '正在合併記錄...', noDescription: '暫無描述', - noData: '暫無記錄' + noData: '暫無記錄', + heatmap: { + title: '播放熱力圖', + loading: '正在載入數據...', + unit: '次播放', + footerText: '滑鼠懸停查看詳細信息', + playCount: '播放 {count} 次', + topSongs: '當天熱門歌曲', + times: '次', + totalPlays: '總播放次數', + activeDays: '活躍天數', + noData: '暫無播放記錄', + colorTheme: '配色方案', + colors: { + green: '綠色', + blue: '藍色', + orange: '橙色', + purple: '紫色', + red: '紅色' + }, + mostPlayedSong: '播放最多的歌曲', + mostActiveDay: '最活躍的一天', + latestNightSong: '最晚播放的歌曲' + } }; diff --git a/src/renderer/router/other.ts b/src/renderer/router/other.ts index 326cb0e..4ab8d93 100644 --- a/src/renderer/router/other.ts +++ b/src/renderer/router/other.ts @@ -86,6 +86,17 @@ const otherRouter = [ back: true }, component: () => import('@/views/playlist/ImportPlaylist.vue') + }, + { + path: '/heatmap', + name: 'heatmap', + meta: { + title: '播放热力图', + keepAlive: true, + showInMenu: false, + back: true + }, + component: () => import('@/views/heatmap/index.vue') } ]; export default otherRouter; diff --git a/src/renderer/views/favorite/index.vue b/src/renderer/views/favorite/index.vue index 841046f..3fd4369 100644 --- a/src/renderer/views/favorite/index.vue +++ b/src/renderer/views/favorite/index.vue @@ -80,6 +80,7 @@ @play="handlePlay" @select="handleSelect" /> +
{{ t('common.viewMore') }}
@@ -90,6 +91,7 @@
{{ t('common.noMore') }}
+ @@ -102,6 +104,7 @@ import { useRouter } from 'vue-router'; import { processBilibiliVideos } from '@/api/bilibili'; import { getMusicDetail } from '@/api/music'; +import PlayBottom from '@/components/common/PlayBottom.vue'; import SongItem from '@/components/common/SongItem.vue'; import { useDownload } from '@/hooks/useDownload'; import { usePlayerStore } from '@/store'; diff --git a/src/renderer/views/heatmap/index.vue b/src/renderer/views/heatmap/index.vue new file mode 100644 index 0000000..cc47422 --- /dev/null +++ b/src/renderer/views/heatmap/index.vue @@ -0,0 +1,737 @@ + + + + + diff --git a/src/renderer/views/history/index.vue b/src/renderer/views/history/index.vue index b998168..60f0be0 100644 --- a/src/renderer/views/history/index.vue +++ b/src/renderer/views/history/index.vue @@ -1,7 +1,19 @@