mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 02:07:29 +08:00
refactor: 重构音乐和歌词缓存逻辑 可配置缓存目录
This commit is contained in:
@@ -55,7 +55,7 @@ const getDescription = () => {
|
||||
}
|
||||
|
||||
if (props.item.size !== undefined) {
|
||||
parts.push(t('user.album.songCount', { count: props.item.size }));
|
||||
parts.push(t('common.songCount', { count: props.item.size }));
|
||||
}
|
||||
|
||||
return parts.join(' · ') || t('history.noDescription');
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<span
|
||||
class="px-3 py-1 text-xs font-medium text-white bg-gradient-to-r from-green-500 to-emerald-600 rounded-full"
|
||||
>
|
||||
{{ t('comp.update.newVersion') }}
|
||||
{{ t('comp.update.title') }}
|
||||
</span>
|
||||
</div>
|
||||
<h2 class="text-2xl font-bold text-gray-900 dark:text-white truncate">
|
||||
@@ -65,7 +65,7 @@
|
||||
@click="handleLater"
|
||||
class="flex-1 py-4 px-4 rounded-2xl text-base font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 active:scale-[0.98] transition-all duration-200"
|
||||
>
|
||||
{{ t('comp.update.later') }}
|
||||
{{ t('comp.update.noThanks') }}
|
||||
</button>
|
||||
<button
|
||||
@click="handleUpdate"
|
||||
@@ -73,7 +73,7 @@
|
||||
>
|
||||
<span class="flex items-center justify-center gap-2">
|
||||
<i class="ri-download-2-line text-lg"></i>
|
||||
{{ t('comp.update.updateNow') }}
|
||||
{{ t('comp.update.nowUpdate') }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -213,9 +213,9 @@ let timerInterval: number | null = null;
|
||||
const hasTimerActive = computed(() => playerStore.hasSleepTimerActive);
|
||||
|
||||
const timerStatusText = computed(() => {
|
||||
if (sleepTimer.value.type === 'time') return t('player.sleepTimer.activeTime');
|
||||
if (sleepTimer.value.type === 'songs') return t('player.sleepTimer.activeSongs');
|
||||
if (sleepTimer.value.type === 'end') return t('player.sleepTimer.activeEnd');
|
||||
if (sleepTimer.value.type === 'time') return t('player.sleepTimer.timeMode');
|
||||
if (sleepTimer.value.type === 'songs') return t('player.sleepTimer.songsMode');
|
||||
if (sleepTimer.value.type === 'end') return t('player.sleepTimer.afterPlaylist');
|
||||
return '';
|
||||
});
|
||||
|
||||
|
||||
@@ -396,7 +396,7 @@ const toggleSource = (sourceKey: string) => {
|
||||
if (index > -1) {
|
||||
// 至少保留一个音源
|
||||
if (selectedSources.value.length <= 1) {
|
||||
message.warning(t('settings.playback.musicSourcesMinWarning'));
|
||||
message.warning(t('settings.playback.musicSourcesWarning'));
|
||||
return;
|
||||
}
|
||||
selectedSources.value.splice(index, 1);
|
||||
|
||||
Reference in New Issue
Block a user