feat: 添加Cookie登录功能及自动获取等相关管理设置

feat: #413 #424
This commit is contained in:
alger
2025-08-06 22:36:30 +08:00
parent 09ccd9f2a6
commit 16aeaf2948
18 changed files with 1245 additions and 115 deletions
@@ -36,12 +36,8 @@
<div class="tab-content">
<div class="settings-grid">
<div class="settings-item">
<span>{{ t('settings.lyricSettings.hidePlayBar') }}</span>
<n-switch v-model:value="config.hidePlayBar" />
</div>
<div class="settings-item">
<span>{{ t('settings.lyricSettings.hideMiniPlayBar') }}</span>
<n-switch v-model:value="config.hideMiniPlayBar" />
<span>{{ t('settings.lyricSettings.showMiniPlayBar') }}</span>
<n-switch v-model:value="showMiniPlayBar" />
</div>
</div>
<div class="theme-section">
@@ -120,7 +116,7 @@
</template>
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { computed, onMounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { DEFAULT_LYRIC_CONFIG, LyricConfig } from '@/types/lyric';
@@ -129,6 +125,22 @@ const { t } = useI18n();
const config = ref<LyricConfig>({ ...DEFAULT_LYRIC_CONFIG });
const emit = defineEmits(['themeChange']);
// 显示mini播放栏开关
const showMiniPlayBar = computed({
get: () => !config.value.hideMiniPlayBar,
set: (value: boolean) => {
if (value) {
// 显示mini播放栏,隐藏普通播放栏
config.value.hideMiniPlayBar = false;
config.value.hidePlayBar = true;
} else {
// 显示普通播放栏,隐藏mini播放栏
config.value.hideMiniPlayBar = true;
config.value.hidePlayBar = false;
}
}
});
watch(
() => config.value,
(newConfig) => {