feat: 优化类型处理

This commit is contained in:
alger
2025-08-07 22:57:17 +08:00
parent daa8e7514d
commit 3ba85f34ed
62 changed files with 104 additions and 88 deletions

View File

@@ -3,7 +3,7 @@
// 语言显示名称映射
export const LANGUAGE_DISPLAY_NAMES: Record<string, string> = {
'zh-CN': '简体中文',
'zh-Hant': '繁體中文',
'zh-Hant': '繁體中文',
'en-US': 'English',
'ja-JP': '日本語',
'ko-KR': '한국어'
@@ -22,4 +22,4 @@ export const LANGUAGE_PRIORITY: Record<string, number> = {
'en-US': 3,
'ja-JP': 4,
'ko-KR': 5
};
};

View File

@@ -10,7 +10,7 @@ export const buildLanguageMessages = () => {
const match = path.match(/\.\/lang\/([^/]+)\/([^/]+)\.ts$/);
if (match) {
const [, langCode, moduleName] = match;
// 跳过 index 文件
if (moduleName !== 'index') {
if (!messages[langCode]) {
@@ -45,16 +45,16 @@ export const getLanguageDisplayNames = (): Record<string, string> => {
export const getLanguageOptions = () => {
const supportedLanguages = getSupportedLanguages();
const displayNames = getLanguageDisplayNames();
// 按优先级排序
const sortedLanguages = supportedLanguages.sort((a, b) => {
const priorityA = LANGUAGE_PRIORITY[a] || 999;
const priorityB = LANGUAGE_PRIORITY[b] || 999;
return priorityA - priorityB;
});
return sortedLanguages.map(lang => ({
return sortedLanguages.map((lang) => ({
label: displayNames[lang] || lang,
value: lang
}));
};
};

View File

@@ -13,7 +13,7 @@ const loginTitle = i18n.global.t('login.qrTitle');
*/
const openLoginWindow = async (mainWin: BrowserWindow) => {
let loginTimer: NodeJS.Timeout;
// 如果登录窗口已存在,则聚焦并返回
if (loginWindow && !loginWindow.isDestroyed()) {
loginWindow.focus();
@@ -21,10 +21,10 @@ const openLoginWindow = async (mainWin: BrowserWindow) => {
}
const loginSession = session.fromPartition('persist:login');
// 清除 Cookie
await loginSession.clearStorageData({
storages: ['cookies', 'localstorage'],
storages: ['cookies', 'localstorage']
});
loginWindow = new BrowserWindow({
@@ -38,8 +38,8 @@ const openLoginWindow = async (mainWin: BrowserWindow) => {
session: loginSession,
sandbox: false,
webSecurity: false,
preload: join(__dirname, '../../preload/index.js'),
},
preload: join(__dirname, '../../preload/index.js')
}
});
// 打开网易云登录页面
@@ -57,17 +57,17 @@ const openLoginWindow = async (mainWin: BrowserWindow) => {
if (loginTimer) clearInterval(loginTimer);
return;
}
const MUSIC_U = await loginSession.cookies.get({
name: 'MUSIC_U',
name: 'MUSIC_U'
});
if (MUSIC_U && MUSIC_U?.length > 0) {
if (loginTimer) clearInterval(loginTimer);
const value = `MUSIC_U=${MUSIC_U[0].value};`;
mainWin?.webContents.send('send-cookies', value);
// 关闭登录窗口
loginWindow.destroy();
loginWindow = null;
@@ -81,7 +81,7 @@ const openLoginWindow = async (mainWin: BrowserWindow) => {
loginWindow.webContents.once('did-finish-load', () => {
loginWindow?.show();
loginTimer = setInterval(checkLogin, 500);
loginWindow?.on('closed', () => {
if (loginTimer) clearInterval(loginTimer);
loginWindow = null;

View File

@@ -1,6 +1,6 @@
import axios from 'axios';
import type { MusicSourceType } from '@/type/music';
import type { MusicSourceType } from '@/types/music';
/**
* GD音乐台解析服务

View File

@@ -1,10 +1,10 @@
import { IData } from '@/type';
import { IAlbumNew } from '@/type/album';
import { IDayRecommend } from '@/type/day_recommend';
import { IRecommendMusic } from '@/type/music';
import { IPlayListSort } from '@/type/playlist';
import { IHotSearch, ISearchKeyword } from '@/type/search';
import { IHotSinger } from '@/type/singer';
import { IData } from '@/types';
import { IAlbumNew } from '@/types/album';
import { IDayRecommend } from '@/types/day_recommend';
import { IRecommendMusic } from '@/types/music';
import { IPlayListSort } from '@/types/playlist';
import { IHotSearch, ISearchKeyword } from '@/types/search';
import { IHotSinger } from '@/types/singer';
import request from '@/utils/request';
interface IHotSingerParams {

View File

@@ -1,5 +1,5 @@
import { IList } from '@/type/list';
import type { IListDetail } from '@/type/listDetail';
import { IList } from '@/types/list';
import type { IListDetail } from '@/types/listDetail';
import request from '@/utils/request';
interface IListByTagParams {

View File

@@ -2,8 +2,8 @@ import { cloneDeep } from 'lodash';
import { musicDB } from '@/hooks/MusicHook';
import { useSettingsStore, useUserStore } from '@/store';
import type { ILyric } from '@/type/lyric';
import type { SongResult } from '@/type/music';
import type { ILyric } from '@/types/lyric';
import type { SongResult } from '@/types/music';
import { isElectron } from '@/utils';
import request from '@/utils/request';
import requestMusic from '@/utils/request_music';

View File

@@ -1,5 +1,5 @@
import { IData } from '@/type';
import { IMvUrlData } from '@/type/mv';
import { IData } from '@/types';
import { IMvUrlData } from '@/types/mv';
import request from '@/utils/request';
interface MvParams {

View File

@@ -1,4 +1,4 @@
import type { IUserDetail, IUserFollow } from '@/type/user';
import type { IUserDetail, IUserFollow } from '@/types/user';
import request from '@/utils/request';
// /user/detail

View File

@@ -113,7 +113,7 @@ import { useI18n } from 'vue-i18n';
import { getMusicDetail } from '@/api/music';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import { SongResult } from '@/type/music';
import { SongResult } from '@/types/music';
import { getImgUrl, isMobile, setAnimationClass } from '@/utils';
import PlayBottom from './common/PlayBottom.vue';

View File

@@ -193,7 +193,7 @@ import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
import { getMvUrl } from '@/api/mv';
import { IMvItem } from '@/type/mv';
import { IMvItem } from '@/types/mv';
const { t } = useI18n();
type PlayMode = 'single' | 'auto';

View File

@@ -98,7 +98,7 @@ import { getMusicDetail } from '@/api/music';
import SearchItem from '@/components/common/SearchItem.vue';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore, useSettingsStore } from '@/store';
import { IArtist } from '@/type/artist';
import { IArtist } from '@/types/artist';
import { getImgUrl } from '@/utils';
import PlayBottom from './PlayBottom.vue';

View File

@@ -37,7 +37,7 @@ import { getAlbum, getListDetail } from '@/api/list';
import MvPlayer from '@/components/MvPlayer.vue';
import { useMusicStore } from '@/store/modules/music';
import { usePlayerStore } from '@/store/modules/player';
import { IMvItem } from '@/type/mv';
import { IMvItem } from '@/types/mv';
import { getImgUrl } from '@/utils';
const props = withDefaults(

View File

@@ -17,7 +17,7 @@
<script lang="ts" setup>
import { computed } from 'vue';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import CompactSongItem from './songItemCom/CompactSongItem.vue';
import ListSongItem from './songItemCom/ListSongItem.vue';

View File

@@ -34,7 +34,7 @@
<script lang="ts" setup>
import { useSongItem } from '@/hooks/useSongItem';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isElectron } from '@/utils';
import SongItemDropdown from './SongItemDropdown.vue';

View File

@@ -108,7 +108,7 @@ import { NCheckbox, NEllipsis } from 'naive-ui';
import { computed, ref } from 'vue';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import BaseSongItem from './BaseSongItem.vue';

View File

@@ -87,7 +87,7 @@ import { NCheckbox, NEllipsis, NImage } from 'naive-ui';
import { computed, ref } from 'vue';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
import BaseSongItem from './BaseSongItem.vue';

View File

@@ -84,7 +84,7 @@ import { NCheckbox, NEllipsis, NImage } from 'naive-ui';
import { computed, ref } from 'vue';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
import BaseSongItem from './BaseSongItem.vue';

View File

@@ -19,7 +19,7 @@ import { NDropdown, NEllipsis, NImage } from 'naive-ui';
import { computed, h, inject } from 'vue';
import { useI18n } from 'vue-i18n';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl, isElectron } from '@/utils';
const { t } = useI18n();

View File

@@ -96,7 +96,7 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
import BaseSongItem from './BaseSongItem.vue';

View File

@@ -50,7 +50,7 @@ import { useI18n } from 'vue-i18n';
import { useRouter } from 'vue-router';
import { getPlaylistCategory } from '@/api/home';
import type { IPlayListSort } from '@/type/playlist';
import type { IPlayListSort } from '@/types/playlist';
import { setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();

View File

@@ -33,7 +33,7 @@ import { useRouter } from 'vue-router';
import { getNewAlbum } from '@/api/home';
import { getAlbum } from '@/api/list';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import type { IAlbumNew } from '@/type/album';
import type { IAlbumNew } from '@/types/album';
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();

View File

@@ -28,7 +28,7 @@ import { useI18n } from 'vue-i18n';
import { getRecommendMusic } from '@/api/home';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import type { IRecommendMusic } from '@/type/music';
import type { IRecommendMusic } from '@/types/music';
import { setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();

View File

@@ -137,11 +137,11 @@ import { getUserPlaylist } from '@/api/user';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import { useArtist } from '@/hooks/useArtist';
import { usePlayerStore, useUserStore } from '@/store';
import { IDayRecommend } from '@/type/day_recommend';
import { Playlist } from '@/type/list';
import type { IListDetail } from '@/type/listDetail';
import { SongResult } from '@/type/music';
import type { IHotSinger } from '@/type/singer';
import { IDayRecommend } from '@/types/day_recommend';
import { Playlist } from '@/types/list';
import type { IListDetail } from '@/types/listDetail';
import { SongResult } from '@/types/music';
import type { IHotSinger } from '@/types/singer';
import {
getImgUrl,
isMobile,

View File

@@ -131,7 +131,7 @@ import { allTime, artistList, nowTime, playMusic } from '@/hooks/MusicHook';
import { useArtist } from '@/hooks/useArtist';
import { audioService } from '@/services/audioService';
import { isBilibiliIdMatch, usePlayerStore, useSettingsStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
const playerStore = usePlayerStore();

View File

@@ -63,7 +63,7 @@ import { useI18n } from 'vue-i18n';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isMobile } from '@/utils';
const { t } = useI18n();

View File

@@ -1,7 +1,6 @@
// musicHistoryHooks
import { useLocalStorage } from '@vueuse/core';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
export const useMusicHistory = () => {
const musicHistory = useLocalStorage<SongResult[]>('musicHistory', []);

View File

@@ -1,13 +1,13 @@
import { cloneDeep } from 'lodash';
import { createDiscreteApi } from 'naive-ui';
import { computed, type ComputedRef,nextTick, onUnmounted, ref, watch } from 'vue';
import { computed, type ComputedRef, nextTick, onUnmounted, ref, watch } from 'vue';
import { getBilibiliAudioUrl } from '@/api/bilibili';
import useIndexedDB from '@/hooks/IndexDBHook';
import { audioService } from '@/services/audioService';
import type { usePlayerStore } from '@/store';
import { getSongUrl } from '@/store/modules/player';
import type { Artist, ILyricText, SongResult } from '@/type/music';
import type { Artist, ILyricText, SongResult } from '@/types/music';
import { isElectron } from '@/utils';
import { getTextColors } from '@/utils/linearColor';
@@ -464,7 +464,10 @@ const setupAudioListeners = () => {
let randomIndex;
do {
randomIndex = Math.floor(Math.random() * getPlayerStore().playList.length);
} while (randomIndex === getPlayerStore().playListIndex && getPlayerStore().playList.length > 1);
} while (
randomIndex === getPlayerStore().playListIndex &&
getPlayerStore().playList.length > 1
);
getPlayerStore().playListIndex = randomIndex;
getPlayerStore().setPlay(getPlayerStore().playList[randomIndex]);
}

View File

@@ -6,7 +6,7 @@ import { getMusicLrc, getMusicUrl, getParsingMusicUrl } from '@/api/music';
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
import { audioService } from '@/services/audioService';
import { useSettingsStore } from '@/store';
import type { ILyric, ILyricText, SongResult } from '@/type/music';
import type { ILyric, ILyricText, SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
import { getImageLinearBackground } from '@/utils/linearColor';

View File

@@ -4,7 +4,7 @@ import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { getSongUrl } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isElectron } from '@/utils';
const ipcRenderer = isElectron ? window.electron.ipcRenderer : null;

View File

@@ -3,7 +3,7 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
import { getImageBackground } from '@/utils/linearColor';

View File

@@ -1,6 +1,6 @@
import { Howl, Howler } from 'howler';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isElectron } from '@/utils'; // 导入isElectron常量
class AudioService {

View File

@@ -9,7 +9,7 @@ import { getBilibiliAudioUrl } from '@/api/bilibili';
import { getLikedList, getMusicLrc, getMusicUrl, getParsingMusicUrl, likeSong } from '@/api/music';
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
import { audioService } from '@/services/audioService';
import type { ILyric, ILyricText, SongResult } from '@/type/music';
import type { ILyric, ILyricText, SongResult } from '@/types/music';
import { type Platform } from '@/types/music';
import { getImgUrl } from '@/utils';
import { getImageLinearBackground } from '@/utils/linearColor';

View File

@@ -22,7 +22,9 @@ function getLocalStorageItem<T>(key: string, defaultValue: T): T {
export const useUserStore = defineStore('user', () => {
// 状态
const user = ref<UserData | null>(getLocalStorageItem('user', null));
const loginType = ref<'token' | 'cookie' | 'qr' | 'uid' | null>(getLocalStorageItem('loginType', null));
const loginType = ref<'token' | 'cookie' | 'qr' | 'uid' | null>(
getLocalStorageItem('loginType', null)
);
const searchValue = ref('');
const searchType = ref(1);

View File

@@ -33,3 +33,18 @@ export const DEFAULT_LYRIC_CONFIG: LyricConfig = {
mobileCoverStyle: 'full',
mobileShowLyricLines: 3
};
export interface ILyric {
sgc: boolean;
sfy: boolean;
qfy: boolean;
lrc: Lrc;
klyric: Lrc;
tlyric: Lrc;
code: number;
}
interface Lrc {
version: number;
lyric: string;
}

View File

@@ -90,10 +90,7 @@ export function clearLoginStatus(): void {
* @param loginType 登录类型
* @param token 登录token可选
*/
export function setLoginStatus(
loginType: LoginInfo['loginType'],
token?: string
): void {
export function setLoginStatus(loginType: LoginInfo['loginType'], token?: string): void {
localStorage.setItem('loginType', loginType || '');
if (token) {

View File

@@ -203,7 +203,7 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SearchItem from '@/components/common/SearchItem.vue';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store';
import { IArtist } from '@/type/artist';
import { IArtist } from '@/types/artist';
import { getImgUrl, isMobile } from '@/utils';
defineOptions({

View File

@@ -108,8 +108,8 @@ import { useRoute, useRouter } from 'vue-router';
import { getBilibiliPlayUrl, getBilibiliProxyUrl, getBilibiliVideoDetail } from '@/api/bilibili';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { IBilibiliPage, IBilibiliVideoDetail } from '@/types/bilibili';
import type { SongResult } from '@/types/music';
import { setAnimationClass } from '@/utils';
defineOptions({

View File

@@ -429,7 +429,7 @@ import { useI18n } from 'vue-i18n';
import { getMusicDetail } from '@/api/music';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { getImgUrl } from '@/utils';
const { t } = useI18n();

View File

@@ -105,7 +105,7 @@ import { getMusicDetail } from '@/api/music';
import SongItem from '@/components/common/SongItem.vue';
import { useDownload } from '@/hooks/useDownload';
import { usePlayerStore } from '@/store';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { isElectron, setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();

View File

@@ -40,7 +40,7 @@ import { getMusicDetail } from '@/api/music';
import SongItem from '@/components/common/SongItem.vue';
import { useMusicHistory } from '@/hooks/MusicHistoryHook';
import { usePlayerStore } from '@/store/modules/player';
import type { SongResult } from '@/type/music';
import type { SongResult } from '@/types/music';
import { setAnimationClass, setAnimationDelay } from '@/utils';
const { t } = useI18n();
const { delMusic, musicList } = useMusicHistory();

View File

@@ -66,9 +66,9 @@ import { useRoute, useRouter } from 'vue-router';
import { getPlaylistCategory } from '@/api/home';
import { getListByCat, getListDetail } from '@/api/list';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import type { IRecommendItem } from '@/type/list';
import type { IListDetail } from '@/type/listDetail';
import type { IPlayListSort } from '@/type/playlist';
import type { IRecommendItem } from '@/types/list';
import type { IListDetail } from '@/types/listDetail';
import type { IPlayListSort } from '@/types/playlist';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({

View File

@@ -107,7 +107,7 @@
import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
import ThemeColorPanel from '@/components/lyric/ThemeColorPanel.vue';
import { SongResult } from '@/type/music';
import { SongResult } from '@/types/music';
import {
getCurrentLyricThemeColor,
loadLyricThemeColor,

View File

@@ -232,7 +232,7 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SongItem from '@/components/common/SongItem.vue';
import { useDownload } from '@/hooks/useDownload';
import { useMusicStore, usePlayerStore } from '@/store';
import { SongResult } from '@/type/music';
import { SongResult } from '@/types/music';
import { getImgUrl, isElectron, isMobile, setAnimationClass } from '@/utils';
const { t } = useI18n();

View File

@@ -69,7 +69,7 @@ import { getAllMv, getTopMv } from '@/api/mv';
import MvPlayer from '@/components/MvPlayer.vue';
import { audioService } from '@/services/audioService';
import { usePlayerStore } from '@/store/modules/player';
import { IMvItem } from '@/type/mv';
import { IMvItem } from '@/types/mv';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({

View File

@@ -142,8 +142,8 @@ import SongItem from '@/components/common/SongItem.vue';
import { SEARCH_TYPE } from '@/const/bar-const';
import { usePlayerStore } from '@/store/modules/player';
import { useSearchStore } from '@/store/modules/search';
import type { IHotSearch } from '@/type/search';
import type { IBilibiliSearchResult } from '@/types/bilibili';
import type { IHotSearch } from '@/types/search';
import { isMobile, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({

View File

@@ -42,7 +42,7 @@ import { useRouter } from 'vue-router';
import { getListDetail, getToplist } from '@/api/list';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import type { IListDetail } from '@/type/listDetail';
import type { IListDetail } from '@/types/listDetail';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({

View File

@@ -137,8 +137,8 @@ import { getUserDetail, getUserPlaylist, getUserRecord } from '@/api/user';
import { navigateToMusicList } from '@/components/common/MusicListNavigator';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import type { Playlist } from '@/type/listDetail';
import type { IUserDetail } from '@/type/user';
import type { Playlist } from '@/types/listDetail';
import type { IUserDetail } from '@/types/user';
import { formatNumber, getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
defineOptions({

View File

@@ -73,7 +73,7 @@ import { useRoute, useRouter } from 'vue-router';
import { getUserFollowers } from '@/api/user';
import { useUserStore } from '@/store/modules/user';
import type { IUserFollow } from '@/type/user';
import type { IUserFollow } from '@/types/user';
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';

View File

@@ -73,7 +73,7 @@ import { useRoute, useRouter } from 'vue-router';
import { getUserFollows } from '@/api/user';
import { useUserStore } from '@/store/modules/user';
import type { IUserFollow } from '@/type/user';
import type { IUserFollow } from '@/types/user';
import { getImgUrl, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';

View File

@@ -118,8 +118,8 @@ import PlayBottom from '@/components/common/PlayBottom.vue';
import SongItem from '@/components/common/SongItem.vue';
import { usePlayerStore } from '@/store/modules/player';
import { useUserStore } from '@/store/modules/user';
import type { Playlist } from '@/type/listDetail';
import type { IUserDetail } from '@/type/user';
import type { Playlist } from '@/types/listDetail';
import type { IUserDetail } from '@/types/user';
import { getImgUrl, isElectron, isMobile, setAnimationClass, setAnimationDelay } from '@/utils';
import { checkLoginStatus as checkAuthStatus } from '@/utils/auth';
import LoginComponent from '@/views/login/index.vue';