diff --git a/web/.gitignore b/web/.gitignore index 685d804..5a9f962 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -5,4 +5,5 @@ yarn.lock env.d.ts *.log .vscode -PingFang-SC-Regular.otf \ No newline at end of file +PingFang-SC-Regular.otf +tsconfig.tsbuildinfo \ No newline at end of file diff --git a/web/index.html b/web/index.html index 02f5860..a39c319 100644 --- a/web/index.html +++ b/web/index.html @@ -3,7 +3,6 @@ - 音乐和 diff --git a/web/src/App.vue b/web/src/App.vue index a87414d..f779c9d 100644 --- a/web/src/App.vue +++ b/web/src/App.vue @@ -9,6 +9,7 @@ import WindowHelper from './components/WindowHelper.vue'; import { webView2Services } from './utils/utils'; import { usePlayStore } from './stores/play'; import LogoImage from './assets/images/logo.png'; +import LogoCircleImage from './assets/images/logo-circle.png'; import { MusicConnection } from './stores/connection'; const play = usePlayStore(); document.addEventListener( @@ -21,6 +22,10 @@ document.addEventListener( }, true ); +const iconLink = document.createElement('link'); +iconLink.rel = 'icon'; +iconLink.href = LogoCircleImage; +document.head.appendChild(iconLink); new MusicConnection(webView2Services.enabled); diff --git a/web/src/components/IconSVG.vue b/web/src/components/IconSVG.vue deleted file mode 100644 index 82fda62..0000000 --- a/web/src/components/IconSVG.vue +++ /dev/null @@ -1,27 +0,0 @@ - - \ No newline at end of file diff --git a/web/src/components/login/CloudMusicLogin.vue b/web/src/components/login/CloudMusicLogin.vue index 57206df..43a63ea 100644 --- a/web/src/components/login/CloudMusicLogin.vue +++ b/web/src/components/login/CloudMusicLogin.vue @@ -33,7 +33,7 @@ async function checkQRCode(key: string) { const data = await api.qrCodeState(MusicType.CloudMusic, key); const state = data?.state || 0; if (state == 803) { - var cookieInfo = parseCookie(data!.cookie, true); + var cookieInfo = parseCookie(data!.cookie); const userInfo = await api.userInfo(MusicType.CloudMusic, cookieInfo); if (userInfo && userInfo.id) { setting.userInfo.cloud.id = userInfo.id; diff --git a/web/src/main.ts b/web/src/main.ts index 2650db0..4d70257 100644 --- a/web/src/main.ts +++ b/web/src/main.ts @@ -10,7 +10,7 @@ import 'element-plus/theme-chalk/el-message-box.css'; import 'element-plus/theme-chalk/el-radio-group.css'; import 'element-plus/theme-chalk/el-radio.css'; import 'element-plus/theme-chalk/el-checkbox.css'; -import './assets/main.css'; +import './style/main.css'; const app = createApp(App); diff --git a/web/src/assets/base.less b/web/src/style/base.less similarity index 100% rename from web/src/assets/base.less rename to web/src/style/base.less diff --git a/web/src/assets/element.less b/web/src/style/element.less similarity index 100% rename from web/src/assets/element.less rename to web/src/style/element.less diff --git a/web/src/assets/main.css b/web/src/style/main.css similarity index 100% rename from web/src/assets/main.css rename to web/src/style/main.css diff --git a/web/src/utils/api/qq.ts b/web/src/utils/api/qq.ts index 08e2979..5b7c133 100644 --- a/web/src/utils/api/qq.ts +++ b/web/src/utils/api/qq.ts @@ -156,10 +156,7 @@ export async function daily( return null; } -export async function yours( - cookies: Record, - offset: number -): Promise<{ +export async function yours(cookies: Record): Promise<{ total: number; list: Playlist[]; }> { @@ -443,6 +440,7 @@ export function rankingPlaylist(ranking: RankingType): Playlist { id, name: 'QQ音乐' + name, image, + description: desc, type: MusicType.QQMusic }; } diff --git a/web/src/utils/utils.ts b/web/src/utils/utils.ts index f95b6b3..4c17c69 100644 --- a/web/src/utils/utils.ts +++ b/web/src/utils/utils.ts @@ -133,10 +133,7 @@ export function generateGuid() { } const cookieSkipKeys = ['max-age', 'path', 'httponly', 'expires']; -export function parseCookie( - cookie: string, - splitComma?: boolean -): Record { +export function parseCookie(cookie: string): Record { if (!cookie) cookie = ''; let cookies = cookie.split(/[;,]/); let cookieObj: Record = {}; diff --git a/web/tsconfig.json b/web/tsconfig.json index f5af553..3d9f332 100644 --- a/web/tsconfig.json +++ b/web/tsconfig.json @@ -18,7 +18,10 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + + "composite": true, + "types": ["node", "vite/client"] }, "include": [ "src/**/*.ts",