Skip to content

Commit bc84e11

Browse files
authored
Merge pull request #18 from imsyy/dev
feat: 设置页面重构
2 parents 6a102a1 + 5425288 commit bc84e11

24 files changed

Lines changed: 688 additions & 462 deletions

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ VITE_ICP = "豫ICP备2022018134号-1"
1616
VITE_ANN_TITLE = ""
1717
## 公告内容
1818
VITE_ANN_CONTENT = ""
19-
## 公告时长(毫秒)
19+
## 公告时长(毫秒)不可超过 999999
2020
VITE_ANN_DURATION = 3000

.hintrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": [
3+
"development"
4+
],
5+
"hints": {
6+
"detect-css-reflows/composite": "off",
7+
"detect-css-reflows/layout": "off",
8+
"detect-css-reflows/paint": "off",
9+
"compat-api/css": [
10+
"default",
11+
{
12+
"ignore": [
13+
"backdrop-filter"
14+
]
15+
}
16+
]
17+
}
18+
}

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "splayer",
3-
"version": "1.1.1",
4-
"private": true,
3+
"version": "1.1.2",
54
"author": "imsyy",
65
"home": "https://imsyy.top",
76
"github": "https://github.com/imsyy/SPlayer",

src/api/song.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export const getMusicUrl = (id, level = "exhigh") => {
4444
*/
4545
export const getMusicNumUrl = async (id) => {
4646
const server =
47-
process.env.NODE_ENV === "development" ? "kuwo,qq,pyncmd" : "qq,pyncmd";
47+
process.env.NODE_ENV === "development"
48+
? "kuwo,qq,pyncmd,kugou"
49+
: "qq,pyncmd,kugou";
4850
const url = `${import.meta.env.VITE_UNM_API}match?id=${id}&server=${server}`;
4951
const response = await fetch(url, {
5052
method: "GET",

src/components/DataList/CoverLists.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ onMounted(() => {
373373
color: #fff;
374374
padding: 0.5vw;
375375
background-color: #00000010;
376+
-webkit-backdrop-filter: blur(10px);
376377
backdrop-filter: blur(10px);
377378
border-radius: 50%;
378379
transform: scale(0.8);
@@ -385,6 +386,7 @@ onMounted(() => {
385386
color: #fff;
386387
background-color: #00000030;
387388
font-size: 12px;
389+
-webkit-backdrop-filter: blur(4px);
388390
backdrop-filter: blur(4px);
389391
padding: 6px;
390392
border-top-left-radius: 8px;

src/components/DataList/VideoLists.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ const props = defineProps({
115115
color: #fff;
116116
padding: 0.5vw;
117117
background-color: #00000010;
118+
-webkit-backdrop-filter: blur(10px);
118119
backdrop-filter: blur(10px);
119120
border-radius: 50%;
120121
transform: scale(0.8);
@@ -126,6 +127,7 @@ const props = defineProps({
126127
color: #fff;
127128
background-color: #00000030;
128129
font-size: 12px;
130+
-webkit-backdrop-filter: blur(4px);
129131
backdrop-filter: blur(4px);
130132
padding: 4px 8px;
131133
transition: all 0.3s;

src/components/Personalized/PaPersonalFm.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ onMounted(() => {
127127
width: 100%;
128128
height: 100%;
129129
background-color: #00000040;
130+
-webkit-backdrop-filter: blur(80px);
130131
backdrop-filter: blur(80px);
131132
z-index: -1;
132133
}

src/components/Player/BigPlayer.vue

Lines changed: 92 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,40 @@
1212
"
1313
>
1414
<div class="gray" />
15-
<n-icon
16-
class="close"
17-
size="40"
18-
:component="KeyboardArrowDownFilled"
19-
@click="music.setBigPlayerState(false)"
20-
/>
21-
<n-icon
22-
class="screenfull"
23-
size="36"
24-
:component="screenfullIcon"
25-
@click="screenfullChange"
26-
/>
15+
<div class="icon-menu">
16+
<div class="menu-left">
17+
<div class="icon">
18+
<n-icon
19+
class="setting"
20+
size="30"
21+
:component="SettingsRound"
22+
@click="
23+
() => {
24+
music.setBigPlayerState(false);
25+
router.push('/setting/player');
26+
}
27+
"
28+
/>
29+
</div>
30+
</div>
31+
<div class="menu-right">
32+
<div class="icon">
33+
<n-icon
34+
class="screenfull"
35+
:component="screenfullIcon"
36+
@click="screenfullChange"
37+
/>
38+
</div>
39+
<div class="icon">
40+
<n-icon
41+
class="close"
42+
:component="KeyboardArrowDownFilled"
43+
@click="music.setBigPlayerState(false)"
44+
/>
45+
</div>
46+
</div>
47+
</div>
48+
2749
<div
2850
:class="
2951
music.getPlaySongLyric.lrc[0] && music.getPlaySongLyric.lrc.length > 4
@@ -124,6 +146,7 @@ import {
124146
MessageFilled,
125147
FullscreenRound,
126148
FullscreenExitRound,
149+
SettingsRound,
127150
} from "@vicons/material";
128151
import { musicStore, settingStore } from "@/store";
129152
import { useRouter } from "vue-router";
@@ -296,11 +319,63 @@ watch(
296319
width: 100%;
297320
height: 100%;
298321
background-color: #00000060;
322+
-webkit-backdrop-filter: blur(80px);
299323
backdrop-filter: blur(80px);
300324
z-index: -1;
301325
}
326+
.icon-menu {
327+
padding: 20px;
328+
width: 100%;
329+
height: 80px;
330+
position: absolute;
331+
top: 0;
332+
left: 0;
333+
display: flex;
334+
align-items: center;
335+
justify-content: space-between;
336+
z-index: 2;
337+
box-sizing: border-box;
338+
.menu-left,
339+
.menu-right {
340+
display: flex;
341+
align-items: center;
342+
.icon {
343+
width: 40px;
344+
height: 40px;
345+
display: flex;
346+
align-items: center;
347+
justify-content: center;
348+
font-size: 40px;
349+
opacity: 0.3;
350+
border-radius: 8px;
351+
transition: all 0.3s;
352+
cursor: pointer;
353+
&:hover {
354+
background-color: #ffffff20;
355+
transform: scale(1.05);
356+
opacity: 1;
357+
}
358+
&:active {
359+
transform: scale(1);
360+
}
361+
.screenfull,
362+
.setting {
363+
@media (max-width: 768px) {
364+
display: none;
365+
}
366+
}
367+
}
368+
}
369+
.menu-right {
370+
.icon {
371+
margin-left: 12px;
372+
}
373+
}
374+
}
375+
/*
302376
.close,
303-
.screenfull {
377+
.screenfull,
378+
.setting {
304379
position: absolute;
305380
top: 24px;
306381
right: 24px;
@@ -326,6 +401,9 @@ watch(
326401
display: none;
327402
}
328403
}
404+
.setting {
405+
left: 24px;
406+
}*/
329407
.all {
330408
width: 100%;
331409
height: 100%;
@@ -379,6 +457,7 @@ watch(
379457
height: 40px;
380458
border-radius: 25px;
381459
background-color: #ffffff20;
460+
-webkit-backdrop-filter: blur(20px);
382461
backdrop-filter: blur(20px);
383462
display: flex;
384463
align-items: center;

src/components/Player/CountDown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div
44
class="countdown"
55
:style="{ animationPlayState: music.getPlayState ? 'running' : 'paused' }"
6-
v-if="remainingPoint <= 2"
6+
v-if="remainingPoint <= 2 && totalDuration > 3"
77
>
88
<span class="point" :class="remainingPoint > 2 ? 'hidden' : null">●</span>
99
<span class="point" :class="remainingPoint > 1 ? 'hidden' : null">●</span>

src/components/Player/PlayerCover.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,6 @@ const router = useRouter();
149149
const music = musicStore();
150150
const user = userStore();
151151
152-
const canvas = ref(null);
153-
154152
// 歌曲进度条更新
155153
const songTimeSliderUpdate = (val) => {
156154
if ($player && music.getPlaySongTime && music.getPlaySongTime.duration)

0 commit comments

Comments
 (0)