Skip to content

Commit

Permalink
Change style
Browse files Browse the repository at this point in the history
  • Loading branch information
HeHang0 committed Oct 31, 2023
1 parent 45e1ee0 commit 2ad8bbf
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 40 deletions.
3 changes: 2 additions & 1 deletion web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ yarn.lock
env.d.ts
*.log
.vscode
PingFang-SC-Regular.otf
PingFang-SC-Regular.otf
tsconfig.tsbuildinfo
1 change: 0 additions & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/src/assets/images/logo-circle.png" />
<title>音乐和</title>
</head>
<body>
Expand Down
5 changes: 5 additions & 0 deletions web/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
</script>

Expand Down
27 changes: 0 additions & 27 deletions web/src/components/IconSVG.vue

This file was deleted.

2 changes: 1 addition & 1 deletion web/src/components/login/CloudMusicLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion web/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 2 additions & 4 deletions web/src/utils/api/qq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,7 @@ export async function daily(
return null;
}

export async function yours(
cookies: Record<string, string>,
offset: number
): Promise<{
export async function yours(cookies: Record<string, string>): Promise<{
total: number;
list: Playlist[];
}> {
Expand Down Expand Up @@ -443,6 +440,7 @@ export function rankingPlaylist(ranking: RankingType): Playlist {
id,
name: 'QQ音乐' + name,
image,
description: desc,
type: MusicType.QQMusic
};
}
Expand Down
5 changes: 1 addition & 4 deletions web/src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ export function generateGuid() {
}

const cookieSkipKeys = ['max-age', 'path', 'httponly', 'expires'];
export function parseCookie(
cookie: string,
splitComma?: boolean
): Record<string, string> {
export function parseCookie(cookie: string): Record<string, string> {
if (!cookie) cookie = '';
let cookies = cookie.split(/[;,]/);
let cookieObj: Record<string, string> = {};
Expand Down
5 changes: 4 additions & 1 deletion web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"noFallthroughCasesInSwitch": true,

"composite": true,
"types": ["node", "vite/client"]
},
"include": [
"src/**/*.ts",
Expand Down

0 comments on commit 2ad8bbf

Please sign in to comment.