@vicyangorg/dsh-music 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/client/index.js +998 -481
- package/package.json +1 -1
package/client/index.js
CHANGED
|
@@ -206,7 +206,7 @@ window.__ModuleLoader__.load({
|
|
|
206
206
|
lyricsSourceLrclib: 'LRCLIB',
|
|
207
207
|
lyricsSourceWeb: '联网补齐',
|
|
208
208
|
lyricsSource: '歌词来源',
|
|
209
|
-
artistOpen: '
|
|
209
|
+
artistOpen: '查看歌手',
|
|
210
210
|
artistIntro: '简介',
|
|
211
211
|
artistNews: '近期动态',
|
|
212
212
|
artistTrivia: '逸闻趣事',
|
|
@@ -239,9 +239,8 @@ window.__ModuleLoader__.load({
|
|
|
239
239
|
recoSectionEmpty: '这一栏还没有内容,点「换一批」生成。',
|
|
240
240
|
deleteTrack: '删除',
|
|
241
241
|
revealTrack: '在 Finder 显示',
|
|
242
|
-
deleteConfirm: '
|
|
243
|
-
deleteLikedConfirm: '这是 Spotify
|
|
244
|
-
deleteLikedConfirm2: '再次确认:本地文件删除后无法从插件恢复。',
|
|
242
|
+
deleteConfirm: '从曲库移除「{title}」?本地文件会被删除,无法撤销。',
|
|
243
|
+
deleteLikedConfirm: '这是 Spotify 收藏里的歌。删除只会移除本地文件(无法从插件恢复),不会取消云端收藏。',
|
|
245
244
|
deleteFailed: '删除失败',
|
|
246
245
|
searchTypeSong: '歌曲',
|
|
247
246
|
searchTypeArtist: '歌手',
|
|
@@ -415,6 +414,27 @@ window.__ModuleLoader__.load({
|
|
|
415
414
|
historySkipped: '跳过',
|
|
416
415
|
historyComplete: '完整度',
|
|
417
416
|
verified: '已核实',
|
|
417
|
+
statDaily: '最近 7 天播放',
|
|
418
|
+
playsUnitN: '{n} 次',
|
|
419
|
+
miniToggle: '迷你条',
|
|
420
|
+
miniMore: '更多操作',
|
|
421
|
+
miniFabPlaying: '正在播放:{title} — {artist}(点击展开)',
|
|
422
|
+
miniFabPaused: '已暂停:{title} — {artist}(点击展开)',
|
|
423
|
+
backTo: '返回{target}',
|
|
424
|
+
artistPageTitle: '歌手',
|
|
425
|
+
confirmDeleteTitle: '删除本地音频',
|
|
426
|
+
confirmDeleteBtn: '永久删除',
|
|
427
|
+
cancelBtn: '取消',
|
|
428
|
+
durationHours: '{h} 小时 {m} 分',
|
|
429
|
+
durationMins: '{m} 分',
|
|
430
|
+
dayToday: '今天',
|
|
431
|
+
dayYesterday: '昨天',
|
|
432
|
+
lyricsClickHint: '点击歌词跳转',
|
|
433
|
+
tabNowQueue: '接下来播放',
|
|
434
|
+
searchMatchedCount: '匹配 {shown} / {total} 首',
|
|
435
|
+
histSummaryFoot: '{songs} 首歌 · {artists} 位歌手 · 平均完整度 {pct}%',
|
|
436
|
+
histSummarySkip: '{n} 次跳过',
|
|
437
|
+
histSummaryDislike: '{n} 首不喜欢',
|
|
418
438
|
};
|
|
419
439
|
const en = {
|
|
420
440
|
panel: 'Music',
|
|
@@ -578,7 +598,7 @@ window.__ModuleLoader__.load({
|
|
|
578
598
|
lyricsSourceLrclib: 'LRCLIB',
|
|
579
599
|
lyricsSourceWeb: 'Web lookup',
|
|
580
600
|
lyricsSource: 'Lyrics source',
|
|
581
|
-
artistOpen: '
|
|
601
|
+
artistOpen: 'View artist',
|
|
582
602
|
artistIntro: 'Intro',
|
|
583
603
|
artistNews: 'Recent news',
|
|
584
604
|
artistTrivia: 'Trivia',
|
|
@@ -611,9 +631,8 @@ window.__ModuleLoader__.load({
|
|
|
611
631
|
recoSectionEmpty: 'Nothing in this section yet. Generate a new batch.',
|
|
612
632
|
deleteTrack: 'Delete',
|
|
613
633
|
revealTrack: 'Show in Finder',
|
|
614
|
-
deleteConfirm: 'Remove
|
|
615
|
-
deleteLikedConfirm: 'This is a Spotify liked track. Deleting removes only the local file, not
|
|
616
|
-
deleteLikedConfirm2: 'Confirm again: the local file cannot be restored from the plugin.',
|
|
634
|
+
deleteConfirm: 'Remove "{title}" from the library? The local file will be deleted. This cannot be undone.',
|
|
635
|
+
deleteLikedConfirm: 'This is a Spotify liked track. Deleting removes only the local file (it cannot be restored from the plugin), not your cloud like.',
|
|
617
636
|
deleteFailed: 'Delete failed',
|
|
618
637
|
searchTypeSong: 'Songs',
|
|
619
638
|
searchTypeArtist: 'Artists',
|
|
@@ -787,6 +806,27 @@ window.__ModuleLoader__.load({
|
|
|
787
806
|
historySkipped: 'Skipped',
|
|
788
807
|
historyComplete: 'Completion',
|
|
789
808
|
verified: 'Verified',
|
|
809
|
+
statDaily: 'Plays in the last 7 days',
|
|
810
|
+
playsUnitN: '{n} plays',
|
|
811
|
+
miniToggle: 'Mini bar',
|
|
812
|
+
miniMore: 'More actions',
|
|
813
|
+
miniFabPlaying: 'Playing: {title} — {artist} (click to expand)',
|
|
814
|
+
miniFabPaused: 'Paused: {title} — {artist} (click to expand)',
|
|
815
|
+
backTo: 'Back to {target}',
|
|
816
|
+
artistPageTitle: 'Artist',
|
|
817
|
+
confirmDeleteTitle: 'Delete local file',
|
|
818
|
+
confirmDeleteBtn: 'Delete',
|
|
819
|
+
cancelBtn: 'Cancel',
|
|
820
|
+
durationHours: '{h}h {m}m',
|
|
821
|
+
durationMins: '{m}m',
|
|
822
|
+
dayToday: 'Today',
|
|
823
|
+
dayYesterday: 'Yesterday',
|
|
824
|
+
lyricsClickHint: 'Click a line to seek',
|
|
825
|
+
tabNowQueue: 'Up next',
|
|
826
|
+
searchMatchedCount: '{shown} / {total} matched',
|
|
827
|
+
histSummaryFoot: '{songs} songs · {artists} artists · {pct}% avg completion',
|
|
828
|
+
histSummarySkip: '{n} skipped',
|
|
829
|
+
histSummaryDislike: '{n} disliked',
|
|
790
830
|
};
|
|
791
831
|
|
|
792
832
|
/* ================================================================
|
|
@@ -1195,9 +1235,20 @@ window.__ModuleLoader__.load({
|
|
|
1195
1235
|
const IconExternal = makeIcon([['path', { d: 'M14 4h6v6' }], ['path', { d: 'M20 4l-9 9' }], ['path', { d: 'M19 14v4.5a1.5 1.5 0 0 1-1.5 1.5h-12A1.5 1.5 0 0 1 4 18.5v-12A1.5 1.5 0 0 1 5.5 5H10' }]]);
|
|
1196
1236
|
const IconSpotify = makeIcon([['path', { d: 'M6 9.5a12 12 0 0 1 12 0' }], ['path', { d: 'M7.5 12.8a9 9 0 0 1 9 0' }], ['path', { d: 'M9 16a5.5 5.5 0 0 1 6 0' }]]);
|
|
1197
1237
|
const IconImport = makeIcon([
|
|
1198
|
-
['path', { d: '
|
|
1199
|
-
['path', { d: '
|
|
1200
|
-
['path', { d: '
|
|
1238
|
+
['path', { d: 'M19 13v4.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 5 17.5v-11A1.5 1.5 0 0 1 6.5 5H11' }],
|
|
1239
|
+
['path', { d: 'M20 4l-8.5 8.5' }],
|
|
1240
|
+
['path', { d: 'M11.5 7.5v5h5' }],
|
|
1241
|
+
]);
|
|
1242
|
+
const IconTrash = makeIcon([
|
|
1243
|
+
['path', { d: 'M4 7h16' }],
|
|
1244
|
+
['path', { d: 'M9.5 7V4.8a.8.8 0 0 1 .8-.8h3.4a.8.8 0 0 1 .8.8V7' }],
|
|
1245
|
+
['path', { d: 'M6.5 7l.8 11.4a1.6 1.6 0 0 0 1.6 1.6h6.2a1.6 1.6 0 0 0 1.6-1.6L17.5 7' }],
|
|
1246
|
+
['path', { d: 'M10 11v5M14 11v5' }],
|
|
1247
|
+
]);
|
|
1248
|
+
const IconMore = makeIcon([
|
|
1249
|
+
['circle', { cx: 5.5, cy: 12, r: 1.4, ...FILLED }],
|
|
1250
|
+
['circle', { cx: 12, cy: 12, r: 1.4, ...FILLED }],
|
|
1251
|
+
['circle', { cx: 18.5, cy: 12, r: 1.4, ...FILLED }],
|
|
1201
1252
|
]);
|
|
1202
1253
|
/* 设置:齿轮(喜欢列表同步 / 推荐口味 / 音乐库 都收在这一个入口里)。 */
|
|
1203
1254
|
const IconGear = makeIcon([
|
|
@@ -1218,21 +1269,28 @@ window.__ModuleLoader__.load({
|
|
|
1218
1269
|
* 4. Styles — every color is a host theme token (--dsw-alias-*)
|
|
1219
1270
|
* ================================================================ */
|
|
1220
1271
|
const CSS = `
|
|
1221
|
-
.dshm-panel{position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-size:13px;}
|
|
1222
|
-
.dshm-
|
|
1223
|
-
.dshm-
|
|
1224
|
-
.dshm-
|
|
1225
|
-
.dshm-welcome-
|
|
1226
|
-
.dshm-welcome-
|
|
1227
|
-
.dshm-
|
|
1272
|
+
.dshm-panel{--dshm-axis:1160px;--dshm-pad:clamp(16px,2.4vw,32px);--dshm-love:#e5485b;position:relative;display:flex;flex-direction:column;height:100%;min-height:0;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-size:13px;}
|
|
1273
|
+
.dshm-panel :is(button,[role="button"],a,[tabindex]):focus{outline:none;}
|
|
1274
|
+
.dshm-panel :is(button,[role="button"],a,[tabindex]):focus-visible,.dshm-mini :is(button,[role="button"]):focus-visible,.dshm-mini-fab:focus-visible,.dshm-modal :is(button,[tabindex]):focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1275
|
+
.dshm-panel :is(input,select):focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1276
|
+
.dshm-welcome-hero{position:relative;display:block;}
|
|
1277
|
+
.dshm-welcome-glow{display:none;}
|
|
1278
|
+
.dshm-set-masthead{display:flex;align-items:center;gap:14px;}
|
|
1279
|
+
.dshm-welcome-fish{position:relative;display:flex;flex:none;}
|
|
1280
|
+
.dshm-set-masthead-text{min-width:0;}
|
|
1281
|
+
.dshm-welcome-title{font-size:23px;font-weight:700;margin:0 0 4px;letter-spacing:-.2px;text-align:left;line-height:1.2;}
|
|
1282
|
+
.dshm-welcome-sub{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:1.65;max-width:480px;margin:0;text-align:left;}
|
|
1283
|
+
.dshm-welcome-actions{display:flex;gap:10px;justify-content:flex-start;margin-top:22px;flex-wrap:wrap;}
|
|
1228
1284
|
.dshm-wbtn{appearance:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font:inherit;font-size:13px;padding:9px 18px;border-radius:10px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:background .15s,border-color .15s,transform .15s;}
|
|
1229
1285
|
.dshm-wbtn:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1230
1286
|
.dshm-wbtn:active{transform:translateY(1px);}
|
|
1231
1287
|
.dshm-wbtn:disabled{opacity:.55;cursor:not-allowed;}
|
|
1232
1288
|
.dshm-wbtn-primary{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-color:transparent;}
|
|
1233
1289
|
.dshm-wbtn-primary:hover{background:var(--dsw-alias-button-primary-hover);}
|
|
1234
|
-
.dshm-welcome-points{display:flex;flex-
|
|
1235
|
-
.dshm-wpoint{display:flex;align-items:center;gap:
|
|
1290
|
+
.dshm-welcome-points{display:flex;flex-wrap:wrap;gap:4px 14px;margin:14px 0 0;text-align:left;max-width:560px;}
|
|
1291
|
+
.dshm-wpoint{display:inline-flex;align-items:center;gap:6px;color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.5;}
|
|
1292
|
+
.dshm-wpoint-dot{width:4px;height:4px;border-radius:50%;background:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1293
|
+
.dshm-wpoint svg{color:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1236
1294
|
.dshm-welcome-panel{width:100%;}
|
|
1237
1295
|
.dshm-wstep-title{font-size:18px;font-weight:650;margin:0 0 6px;}
|
|
1238
1296
|
.dshm-wstep-sub{color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.6;margin:0 auto 18px;max-width:440px;}
|
|
@@ -1247,10 +1305,10 @@ window.__ModuleLoader__.load({
|
|
|
1247
1305
|
.dshm-wcard:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1248
1306
|
.dshm-wcard-on{border-color:var(--dsw-alias-brand-primary);box-shadow:0 0 0 1px var(--dsw-alias-brand-primary) inset;}
|
|
1249
1307
|
.dshm-wcard-icon{flex:none;width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;background:var(--dsw-alias-bg-layer-2);}
|
|
1250
|
-
.dshm-wcard-text{display:flex;flex-direction:column;gap:3px;}
|
|
1308
|
+
.dshm-wcard-text{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1;}
|
|
1251
1309
|
.dshm-wcard-title{font-size:13px;font-weight:600;}
|
|
1252
1310
|
.dshm-wcard-body{font-size:12px;color:var(--dsw-alias-label-secondary);line-height:1.5;}
|
|
1253
|
-
.dshm-whint{font-size:
|
|
1311
|
+
.dshm-whint{font-size:12px;color:var(--dsw-alias-label-secondary);margin:12px 0 0;line-height:1.55;}
|
|
1254
1312
|
.dshm-wpath{text-align:left;margin-top:14px;}
|
|
1255
1313
|
.dshm-winput{width:100%;box-sizing:border-box;font:inherit;font-size:12.5px;padding:9px 11px;border-radius:9px;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);outline:none;transition:border-color .15s;}
|
|
1256
1314
|
.dshm-winput:focus{border-color:var(--dsw-alias-brand-primary);}
|
|
@@ -1263,45 +1321,53 @@ window.__ModuleLoader__.load({
|
|
|
1263
1321
|
.dshm-wprogress-track{flex:1;height:6px;border-radius:99px;background:var(--dsw-alias-bg-layer-2);overflow:hidden;}
|
|
1264
1322
|
.dshm-wprogress-fill{height:100%;border-radius:99px;background:var(--dsw-alias-brand-primary);transition:width .3s;}
|
|
1265
1323
|
.dshm-wtracks{text-align:left;display:flex;flex-direction:column;gap:5px;margin-bottom:16px;}
|
|
1266
|
-
.dshm-wtrack{display:flex;align-items:center;gap:8px;font-size:
|
|
1267
|
-
.dshm-wtrack-lic{margin-left:auto;font-size:
|
|
1324
|
+
.dshm-wtrack{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--dsw-alias-label-secondary);}
|
|
1325
|
+
.dshm-wtrack-lic{margin-left:auto;font-size:11px;color:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1268
1326
|
@keyframes dshm-float{0%,100%{transform:translateY(0);}50%{transform:translateY(-7px);}}
|
|
1269
1327
|
@keyframes dshm-fade-in{from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:none;}}
|
|
1328
|
+
@keyframes dshm-fade{from{opacity:0;}to{opacity:1;}}
|
|
1329
|
+
@keyframes dshm-pop{from{opacity:0;transform:translateY(8px) scale(.985);}to{opacity:1;transform:none;}}
|
|
1270
1330
|
.dshm-panel *{box-sizing:border-box;}
|
|
1271
|
-
.dshm-header{flex:none;padding:14px
|
|
1272
|
-
.dshm-
|
|
1331
|
+
.dshm-header{flex:none;padding:14px var(--dshm-pad) 0;border-bottom:1px solid var(--dsw-alias-border-l1);}
|
|
1332
|
+
.dshm-header-inner{max-width:var(--dshm-axis);margin:0 auto;}
|
|
1333
|
+
.dshm-header-inner .dshm-title-row{padding-bottom:8px;}
|
|
1334
|
+
.dshm-header-inner .dshm-tabs{margin-top:0;}
|
|
1335
|
+
.dshm-title-row{display:flex;align-items:center;gap:10px;margin-bottom:10px;}
|
|
1273
1336
|
.dshm-title{font-size:17px;font-weight:650;margin:0;letter-spacing:.2px;}
|
|
1274
1337
|
.dshm-count{color:var(--dsw-alias-label-tertiary);font-size:12px;}
|
|
1275
|
-
.dshm-header-actions{margin-left:auto;display:flex;gap:
|
|
1338
|
+
.dshm-header-actions{margin-left:auto;display:flex;gap:4px;align-items:center;}
|
|
1276
1339
|
.dshm-tabs{display:flex;gap:4px;}
|
|
1277
1340
|
.dshm-tab{position:relative;appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:13px;padding:8px 12px 10px;cursor:pointer;border-radius:8px 8px 0 0;display:inline-flex;align-items:center;gap:6px;transition:color .15s;}
|
|
1278
1341
|
.dshm-tab:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover);}
|
|
1279
1342
|
.dshm-tab[aria-selected="true"]{color:var(--dsw-alias-brand-text);font-weight:600;}
|
|
1280
1343
|
.dshm-tab[aria-selected="true"]::after{content:"";position:absolute;left:10px;right:10px;bottom:-1px;height:2px;border-radius:2px;background:var(--dsw-alias-brand-primary);}
|
|
1344
|
+
.dshm-tab:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;border-radius:8px;}
|
|
1281
1345
|
.dshm-tab-dot{width:6px;height:6px;border-radius:50%;background:var(--dsw-alias-brand-primary);animation:dshm-pulse 1.6s ease-in-out infinite;}
|
|
1282
1346
|
.dshm-body{flex:1;min-height:0;display:flex;flex-direction:column;container-type:inline-size;}
|
|
1283
|
-
.dshm-toolbar{flex:none;display:flex;align-items:center;gap:8px;padding:10px
|
|
1284
|
-
.dshm-libtabs{display:flex;align-items:center;gap:4px;padding:8px
|
|
1347
|
+
.dshm-toolbar{flex:none;display:flex;align-items:center;gap:8px;padding:10px var(--dshm-pad);border-bottom:1px solid var(--dsw-alias-border-l1);flex-wrap:wrap;width:100%;max-width:var(--dshm-axis);margin:0 auto;}
|
|
1348
|
+
.dshm-libtabs{display:flex;align-items:center;gap:4px;padding:8px var(--dshm-pad) 0;width:100%;max-width:var(--dshm-axis);margin:0 auto;flex:none;}
|
|
1285
1349
|
.dshm-libtabs-btn{appearance:none;border:1px solid transparent;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12.5px;padding:5px 12px;border-radius:8px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background .12s,color .12s,border-color .12s;white-space:nowrap;}
|
|
1286
1350
|
.dshm-libtabs-btn:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}
|
|
1351
|
+
.dshm-libtabs-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px;}
|
|
1287
1352
|
.dshm-libtabs-on{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary);border-color:var(--dsw-alias-border-l2);font-weight:600;}
|
|
1288
|
-
.dshm-libtabs-count{font-size:
|
|
1289
|
-
.dshm-favs{padding:
|
|
1353
|
+
.dshm-libtabs-count{font-size:11px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-1);border-radius:999px;padding:0 6px;line-height:16px;}
|
|
1354
|
+
.dshm-favs{padding:12px var(--dshm-pad) 2px;width:100%;max-width:var(--dshm-axis);margin:0 auto;flex:none;box-sizing:border-box;}
|
|
1290
1355
|
.dshm-favs-head{display:flex;align-items:center;gap:8px;margin-bottom:8px;}
|
|
1291
1356
|
.dshm-favs-title{font-size:12.5px;font-weight:600;color:var(--dsw-alias-label-primary);}
|
|
1292
1357
|
.dshm-favs-all{margin-left:auto;}
|
|
1293
1358
|
.dshm-favs-empty{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--dsw-alias-label-tertiary);padding:10px 12px;border:1px dashed var(--dsw-alias-border-l1);border-radius:10px;}
|
|
1294
|
-
.dshm-favs-rail{display:flex;gap:
|
|
1295
|
-
.dshm-favcard{appearance:none;border:0;background:transparent;padding:0;width:104px;flex:none;display:flex;flex-direction:column;gap:6px;cursor:pointer;text-align:left;color:inherit;font:inherit;}
|
|
1359
|
+
.dshm-favs-rail{display:flex;gap:12px;overflow-x:auto;padding:2px 0 10px;scrollbar-width:thin;}
|
|
1360
|
+
.dshm-favcard{appearance:none;border:0;background:transparent;padding:0;width:104px;flex:none;display:flex;flex-direction:column;gap:6px;cursor:pointer;text-align:left;color:inherit;font:inherit;border-radius:12px;}
|
|
1296
1361
|
.dshm-favcard-cover{position:relative;display:block;width:104px;height:104px;border-radius:12px;overflow:hidden;background:var(--dsw-alias-bg-layer-2);}
|
|
1297
|
-
.dshm-favcard-heart{position:absolute;top:6px;right:6px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--dsw-alias-bg-layer-1);color:var(--
|
|
1362
|
+
.dshm-favcard-heart{position:absolute;top:6px;right:6px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:50%;background:var(--dsw-alias-bg-layer-1);color:var(--dshm-love);}
|
|
1298
1363
|
.dshm-favcard-title{font-size:12px;font-weight:600;color:var(--dsw-alias-label-primary);}
|
|
1299
|
-
.dshm-favcard-sub{font-size:
|
|
1364
|
+
.dshm-favcard-sub{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1300
1365
|
.dshm-favcard:hover .dshm-favcard-cover{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1366
|
+
.dshm-favcard:focus-visible .dshm-favcard-cover{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1301
1367
|
.dshm-favcard-off{opacity:.5;cursor:not-allowed;}
|
|
1302
1368
|
.dshm-favcard-more{height:104px;justify-content:center;align-items:center;gap:6px;border-radius:12px;border:1px dashed var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);}
|
|
1303
|
-
.dshm-favcard-more-label{font-size:
|
|
1304
|
-
.dshm-toast{position:fixed;right:20px;bottom:96px;z-index:
|
|
1369
|
+
.dshm-favcard-more-label{font-size:12px;}
|
|
1370
|
+
.dshm-toast{position:fixed;right:20px;bottom:96px;z-index:1200;display:flex;align-items:center;gap:8px;padding:8px 10px 8px 12px;border-radius:10px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);box-shadow:0 6px 20px var(--dsw-alias-bg-mask-2);font-size:12.5px;color:var(--dsw-alias-label-primary);animation:dshm-fade-in .18s ease-out;}
|
|
1305
1371
|
.dshm-toast-icon{display:inline-flex;color:var(--dsw-alias-state-success-primary);}
|
|
1306
1372
|
.dshm-toast-main{appearance:none;border:0;background:transparent;color:var(--dsw-alias-brand-text);font:inherit;cursor:pointer;padding:2px 4px;border-radius:6px;}
|
|
1307
1373
|
.dshm-toast-main:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
@@ -1310,34 +1376,47 @@ window.__ModuleLoader__.load({
|
|
|
1310
1376
|
.dshm-search:focus-within{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-label-secondary);}
|
|
1311
1377
|
.dshm-search input{flex:1;min-width:0;border:0;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;outline:none;}
|
|
1312
1378
|
.dshm-search input::placeholder{color:var(--dsw-alias-label-tertiary);}
|
|
1313
|
-
.dshm-select{appearance:none;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;border-radius:9px;padding:6px 26px 6px 10px;cursor:pointer;outline:none;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 14px) 55%,calc(100% - 9px) 55%;background-size:5px 5px;background-repeat:no-repeat;}
|
|
1379
|
+
.dshm-select{appearance:none;border:1px solid var(--dsw-alias-border-l1);background-color:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;border-radius:9px;padding:6px 26px 6px 10px;cursor:pointer;outline:none;background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);background-position:calc(100% - 14px) 55%,calc(100% - 9px) 55%;background-size:5px 5px;background-repeat:no-repeat;}
|
|
1314
1380
|
.dshm-select:focus-visible{border-color:var(--dsw-alias-brand-primary);}
|
|
1315
1381
|
.dshm-chipbtn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-secondary);font:inherit;font-size:12px;border-radius:9px;padding:6px 12px;cursor:pointer;transition:background .15s,color .15s,border-color .15s,transform .1s;}
|
|
1316
1382
|
.dshm-chipbtn:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}
|
|
1317
1383
|
.dshm-chipbtn:active:not(:disabled){transform:scale(.97);}
|
|
1318
1384
|
.dshm-chipbtn:disabled{opacity:.5;cursor:default;}
|
|
1385
|
+
/* 行内「试听」:无边框幽灵按钮,hover 才浮出来(让位给歌名) */
|
|
1386
|
+
.dshm-chipbtn-ghost{border-color:transparent;background:transparent;padding:6px;opacity:0;}
|
|
1387
|
+
.dshm-row:hover .dshm-chipbtn-ghost,.dshm-row:focus-within .dshm-chipbtn-ghost{opacity:1;}
|
|
1388
|
+
.dshm-chipbtn-ghost:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);}
|
|
1319
1389
|
.dshm-chipbtn-primary{background:var(--dsw-alias-button-primary-fill);border-color:transparent;color:var(--dsw-alias-label-primary-inverted);}
|
|
1320
1390
|
.dshm-chipbtn-primary:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover);color:var(--dsw-alias-label-primary-inverted);}
|
|
1321
|
-
.dshm-
|
|
1391
|
+
.dshm-chipbtn-on{background:var(--dsw-alias-interactive-bg-active);border-color:var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);}
|
|
1392
|
+
.dshm-chipbtn-icon{width:32px;height:32px;padding:0;justify-content:center;border-color:transparent;background:transparent;color:var(--dsw-alias-label-secondary);}
|
|
1393
|
+
.dshm-chipbtn-icon:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}
|
|
1394
|
+
.dshm-chipbtn-icon[aria-pressed="true"]{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-active);border-color:var(--dsw-alias-border-l1);}
|
|
1395
|
+
.dshm-list{flex:1;min-height:0;overflow-y:auto;padding:6px 16px 24px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;width:100%;max-width:var(--dshm-axis);margin:0 auto;}
|
|
1322
1396
|
.dshm-list::-webkit-scrollbar{width:10px;}
|
|
1323
1397
|
.dshm-list::-webkit-scrollbar-track{background:transparent;}
|
|
1324
1398
|
.dshm-list::-webkit-scrollbar-thumb{background:var(--dsw-alias-scrollbar-bg-l2);border-radius:6px;border:2px solid var(--dsw-alias-bg-base);}
|
|
1325
1399
|
.dshm-list::-webkit-scrollbar-thumb:hover{background:var(--dsw-alias-scrollbar-hover-l2);}
|
|
1326
1400
|
.dshm-group-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:6px;padding:10px 8px 6px;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:600;}
|
|
1327
1401
|
.dshm-group-head .dshm-group-count{color:var(--dsw-alias-label-tertiary);font-weight:400;}
|
|
1328
|
-
.dshm-row{display:
|
|
1329
|
-
.dshm-row-actions{display:flex;gap:2px;opacity:0;}
|
|
1402
|
+
.dshm-row{display:flex;align-items:center;gap:12px;padding:7px 8px;border-radius:10px;cursor:pointer;transition:background .12s;outline:none;}
|
|
1403
|
+
.dshm-row-actions{display:flex;gap:2px;opacity:0;transition:opacity .15s;}
|
|
1330
1404
|
.dshm-row:hover .dshm-row-actions,.dshm-row:focus-within .dshm-row-actions{opacity:1;}
|
|
1331
1405
|
.dshm-row:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1332
1406
|
.dshm-row:focus-visible{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary);}
|
|
1333
1407
|
.dshm-row-current{background:var(--dsw-alias-interactive-bg-active);}
|
|
1334
1408
|
.dshm-row-current .dshm-row-title{color:var(--dsw-alias-brand-text);}
|
|
1335
|
-
.dshm-row-info{min-width:0;}
|
|
1336
|
-
.dshm-row-title{display:flex;align-items:center;gap:7px;font-size:
|
|
1337
|
-
.dshm-row-sub{font-size:
|
|
1338
|
-
.dshm-row-dur{font-size:
|
|
1339
|
-
.dshm-row-
|
|
1340
|
-
|
|
1409
|
+
.dshm-row-info{min-width:0;flex:1;}
|
|
1410
|
+
.dshm-row-title{display:flex;align-items:center;gap:7px;font-size:13.5px;font-weight:520;color:var(--dsw-alias-label-primary);}
|
|
1411
|
+
.dshm-row-sub{font-size:12px;color:var(--dsw-alias-label-tertiary);margin-top:2px;}
|
|
1412
|
+
.dshm-row-dur{font-size:12px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;}
|
|
1413
|
+
.dshm-row-tail{display:flex;align-items:center;gap:2px;margin-left:auto;flex:none;}
|
|
1414
|
+
/* 搜索结果里的歌手行:整行可点,右侧一枚安静 › */
|
|
1415
|
+
.dshm-row-chev{color:var(--dsw-alias-label-tertiary);opacity:.6;transition:opacity .15s,transform .15s;}
|
|
1416
|
+
.dshm-row:hover .dshm-row-chev{opacity:1;transform:translateX(2px);}
|
|
1417
|
+
.dshm-row-play{appearance:none;border:0;background:transparent;padding:0;width:28px;height:28px;border-radius:7px;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--dsw-alias-label-secondary);opacity:0;transition:opacity .12s,background .12s;}
|
|
1418
|
+
.dshm-row:hover .dshm-row-play,.dshm-row:focus-within .dshm-row-play,.dshm-row-play:focus-visible{opacity:1;}
|
|
1419
|
+
.dshm-row-play:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}
|
|
1341
1420
|
.dshm-row-current .dshm-row-play{opacity:0;}
|
|
1342
1421
|
.dshm-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
|
|
1343
1422
|
.dshm-cover{flex:none;position:relative;border-radius:8px;overflow:hidden;background:linear-gradient(145deg,var(--dsw-alias-bg-layer-2),var(--dsw-alias-bg-layer-3));display:flex;align-items:center;justify-content:center;border:1px solid var(--dsw-alias-border-l1);}
|
|
@@ -1357,6 +1436,7 @@ window.__ModuleLoader__.load({
|
|
|
1357
1436
|
.dshm-iconbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1358
1437
|
.dshm-iconbtn-active{color:var(--dsw-alias-brand-text);}
|
|
1359
1438
|
.dshm-iconbtn-active:hover:not(:disabled){color:var(--dsw-alias-brand-text);}
|
|
1439
|
+
.dshm-iconbtn-danger:hover:not(:disabled){color:var(--dsw-alias-state-error-primary);background:color-mix(in srgb,var(--dsw-alias-state-error-primary) 10%,transparent);}
|
|
1360
1440
|
.dshm-spin{animation:dshm-spin 1s linear infinite;}
|
|
1361
1441
|
@keyframes dshm-spin{to{transform:rotate(360deg);}}
|
|
1362
1442
|
.dshm-state{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:40px 24px;text-align:center;color:var(--dsw-alias-label-secondary);min-height:0;}
|
|
@@ -1365,24 +1445,25 @@ window.__ModuleLoader__.load({
|
|
|
1365
1445
|
.dshm-empty-ctas{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:12px;}
|
|
1366
1446
|
.dshm-empty-dirs{display:flex;flex-direction:column;gap:4px;align-items:flex-start;text-align:left;max-width:440px;margin:14px auto 0;padding:12px 14px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;font-size:12px;color:var(--dsw-alias-label-secondary);}
|
|
1367
1447
|
.dshm-empty-dirs-head{line-height:1.5;}
|
|
1368
|
-
.dshm-empty-dir{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:
|
|
1448
|
+
.dshm-empty-dir{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);border-radius:5px;padding:1px 6px;}
|
|
1369
1449
|
.dshm-chipbtn-off{opacity:.55;}
|
|
1370
1450
|
.dshm-state-body{font-size:12.5px;line-height:1.7;max-width:420px;color:var(--dsw-alias-label-tertiary);}
|
|
1371
1451
|
.dshm-state-error{color:var(--dsw-alias-state-error-primary);}
|
|
1372
1452
|
.dshm-skel{padding:8px 16px;}
|
|
1373
1453
|
.dshm-skel-row{display:flex;gap:12px;align-items:center;padding:8px;}
|
|
1374
1454
|
.dshm-skel-box{border-radius:8px;background:var(--dsw-alias-bg-skeleton);animation:dshm-pulse 1.4s ease-in-out infinite;}
|
|
1375
|
-
.dshm-now{flex:1;min-height:0;
|
|
1376
|
-
.dshm-now
|
|
1377
|
-
.dshm-now
|
|
1378
|
-
.dshm-now-
|
|
1379
|
-
.dshm-now-
|
|
1455
|
+
.dshm-now{position:relative;flex:1;min-height:0;display:flex;flex-direction:column;width:100%;max-width:var(--dshm-axis);margin:0 auto;padding:0 var(--dshm-pad);overflow:hidden;}
|
|
1456
|
+
.dshm-now-glow{position:absolute;inset:-40px;pointer-events:none;z-index:0;opacity:.085;filter:blur(72px) saturate(1.15);transform:scale(1.15);background-position:center;background-size:cover;mask-image:radial-gradient(ellipse 68% 64% at 28% 46%,#000 0%,transparent 74%);}
|
|
1457
|
+
.dshm-now-stage{position:relative;z-index:1;flex:1;min-height:0;display:grid;grid-template-columns:minmax(280px,380px) minmax(0,1fr);gap:clamp(20px,3vw,40px);align-items:stretch;padding:18px 0 8px;}
|
|
1458
|
+
.dshm-now-side{display:flex;flex-direction:column;gap:14px;min-width:0;align-self:center;position:sticky;top:0;}
|
|
1459
|
+
.dshm-now-hero{display:flex;flex-direction:column;gap:16px;min-width:0;}
|
|
1460
|
+
.dshm-now-cover{width:100%;max-width:340px;aspect-ratio:1;height:auto;border-radius:14px;box-shadow:0 14px 38px var(--dsw-alias-bg-mask-2);border:1px solid var(--dsw-alias-border-l1);}
|
|
1380
1461
|
.dshm-now-meta{min-width:0;display:flex;flex-direction:column;gap:10px;}
|
|
1381
|
-
.dshm-now-title{font-size:
|
|
1462
|
+
.dshm-now-title{font-size:22px;font-weight:680;margin:0;line-height:1.28;letter-spacing:-.2px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
|
1382
1463
|
.dshm-now-sub{font-size:13px;color:var(--dsw-alias-label-secondary);margin:0;}
|
|
1383
|
-
.dshm-source-chip{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;font-size:
|
|
1384
|
-
.dshm-seekrow{display:flex;align-items:center;gap:10px;margin-top:
|
|
1385
|
-
.dshm-time{font-size:
|
|
1464
|
+
.dshm-source-chip{display:inline-flex;align-items:center;gap:5px;align-self:flex-start;font-size:12px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);padding:3px 9px;border-radius:99px;}
|
|
1465
|
+
.dshm-seekrow{display:flex;align-items:center;gap:10px;margin-top:2px;}
|
|
1466
|
+
.dshm-time{font-size:12px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;flex:none;min-width:38px;}
|
|
1386
1467
|
.dshm-time-end{text-align:right;}
|
|
1387
1468
|
.dshm-slider{position:relative;flex:1;height:20px;display:flex;align-items:center;cursor:pointer;touch-action:none;outline:none;min-width:40px;}
|
|
1388
1469
|
.dshm-slider-track{position:relative;width:100%;height:4px;border-radius:2px;background:var(--dsw-alias-bg-layer-3);overflow:visible;}
|
|
@@ -1391,28 +1472,38 @@ window.__ModuleLoader__.load({
|
|
|
1391
1472
|
.dshm-slider:hover .dshm-slider-thumb,.dshm-slider:focus-visible .dshm-slider-thumb,.dshm-slider-drag .dshm-slider-thumb{transform:translate(-50%,-50%) scale(1);}
|
|
1392
1473
|
.dshm-slider:focus-visible .dshm-slider-track{box-shadow:0 0 0 2px var(--dsw-alias-brand-primary);}
|
|
1393
1474
|
.dshm-slider-disabled{opacity:.4;cursor:default;}
|
|
1394
|
-
.dshm-transport{display:flex;align-items:center;gap:
|
|
1395
|
-
.dshm-
|
|
1475
|
+
.dshm-transport{display:flex;align-items:center;gap:6px;margin-top:4px;}
|
|
1476
|
+
.dshm-transport-gap{width:6px;}
|
|
1477
|
+
.dshm-playbtn{width:46px;height:46px;border-radius:50%;border:0;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s,transform .12s;box-shadow:0 4px 14px var(--dsw-alias-bg-mask-2);flex:none;padding:0;}
|
|
1396
1478
|
.dshm-playbtn:hover{background:var(--dsw-alias-button-primary-hover);transform:scale(1.05);}
|
|
1397
1479
|
.dshm-playbtn:active{transform:scale(.96);}
|
|
1398
1480
|
.dshm-playbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1399
1481
|
.dshm-volumerow{display:flex;align-items:center;gap:8px;max-width:240px;}
|
|
1400
1482
|
.dshm-volumerow .dshm-slider{flex:1;}
|
|
1401
|
-
.dshm-volume-pct{font-size:
|
|
1483
|
+
.dshm-volume-pct{font-size:12px;color:var(--dsw-alias-label-tertiary);min-width:32px;font-variant-numeric:tabular-nums;}
|
|
1402
1484
|
.dshm-errorline{display:flex;align-items:center;gap:7px;color:var(--dsw-alias-state-error-primary);font-size:12px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:9px;padding:8px 12px;}
|
|
1403
|
-
.dshm-
|
|
1404
|
-
.dshm-
|
|
1485
|
+
.dshm-now-main{flex:1;min-height:0;display:flex;flex-direction:column;min-width:0;gap:10px;}
|
|
1486
|
+
.dshm-now-tabs{display:inline-flex;align-items:center;gap:4px;align-self:flex-start;padding:3px;border-radius:10px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);flex:none;}
|
|
1487
|
+
.dshm-now-tab{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-secondary);font:inherit;font-size:12.5px;font-weight:500;padding:5px 12px;border-radius:7px;cursor:pointer;display:inline-flex;align-items:center;gap:6px;transition:background .15s,color .15s;}
|
|
1488
|
+
.dshm-now-tab:hover{color:var(--dsw-alias-label-primary);}
|
|
1489
|
+
.dshm-now-tab[aria-selected="true"]{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);font-weight:600;box-shadow:0 1px 3px var(--dsw-alias-bg-mask-2);}
|
|
1490
|
+
.dshm-now-tab .dshm-count{font-size:11px;font-weight:500;}
|
|
1491
|
+
.dshm-queue{flex:1;min-height:0;display:flex;flex-direction:column;}
|
|
1492
|
+
.dshm-queue-head{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--dsw-alias-label-secondary);padding:0 8px 8px;border-bottom:1px solid var(--dsw-alias-border-l1);margin-bottom:6px;flex:none;}
|
|
1405
1493
|
.dshm-queue-head .dshm-count{font-weight:400;}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
.dshm-now-
|
|
1494
|
+
.dshm-queue-list{flex:1;min-height:0;overflow-y:auto;scrollbar-width:thin;}
|
|
1495
|
+
@container (max-width:760px){
|
|
1496
|
+
.dshm-now-stage{grid-template-columns:1fr;gap:14px;}
|
|
1497
|
+
.dshm-now-side{position:static;align-self:auto;}
|
|
1498
|
+
.dshm-now-cover{max-width:200px;}
|
|
1499
|
+
.dshm-now-hero{align-items:center;text-align:center;}
|
|
1409
1500
|
.dshm-now-meta{align-items:center;width:100%;}
|
|
1410
1501
|
.dshm-source-chip{align-self:center;}
|
|
1411
1502
|
.dshm-transport{justify-content:center;}
|
|
1412
1503
|
.dshm-volumerow{margin:0 auto;}
|
|
1413
1504
|
}
|
|
1414
|
-
.dshm-mini{position:fixed;right:16px;bottom:16px;z-index:
|
|
1415
|
-
.dshm-mini-fab{position:fixed;right:16px;bottom:16px;z-index:
|
|
1505
|
+
.dshm-mini{position:fixed;right:16px;bottom:16px;z-index:1100;width:min(440px,calc(100% - 32px));background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:14px;box-shadow:0 10px 30px var(--dsw-alias-bg-mask-2);animation:dshm-mini-in .22s ease-out;}
|
|
1506
|
+
.dshm-mini-fab{position:fixed;right:16px;bottom:16px;z-index:1100;width:48px;height:48px;border-radius:50%;padding:0;overflow:hidden;display:flex;align-items:center;justify-content:center;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);box-shadow:0 10px 30px var(--dsw-alias-bg-mask-2);cursor:grab;touch-action:none;animation:dshm-mini-in .18s ease-out;}
|
|
1416
1507
|
.dshm-mini-fab:hover{box-shadow:0 12px 34px var(--dsw-alias-bg-mask-2);}
|
|
1417
1508
|
.dshm-mini-fab:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1418
1509
|
.dshm-mini-fab-dragging{cursor:grabbing;animation:none;box-shadow:0 16px 40px var(--dsw-alias-bg-mask-2);}
|
|
@@ -1420,53 +1511,65 @@ window.__ModuleLoader__.load({
|
|
|
1420
1511
|
.dshm-mini-dragging{box-shadow:0 16px 40px var(--dsw-alias-bg-mask-2);transition:none;animation:none;}
|
|
1421
1512
|
.dshm-mini{touch-action:none;user-select:none;-webkit-user-select:none;cursor:default;}
|
|
1422
1513
|
@keyframes dshm-mini-in{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
|
|
1423
|
-
.dshm-mini-inner{display:flex;align-items:center;gap:
|
|
1514
|
+
.dshm-mini-inner{display:flex;align-items:center;gap:4px;padding:8px 8px 8px 22px;}
|
|
1424
1515
|
.dshm-mini-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:2px;border-radius:9px;text-align:left;}
|
|
1425
1516
|
.dshm-mini-main:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1426
1517
|
.dshm-mini-main:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1427
1518
|
.dshm-mini-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1;}
|
|
1428
1519
|
.dshm-mini-title{font-size:12.5px;font-weight:600;color:var(--dsw-alias-label-primary);}
|
|
1429
|
-
.dshm-mini-sub{font-size:
|
|
1520
|
+
.dshm-mini-sub{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1430
1521
|
.dshm-mini-sub-error{color:var(--dsw-alias-state-error-primary);}
|
|
1431
|
-
.dshm-mini-grip{position:absolute;left:3px;top:
|
|
1522
|
+
.dshm-mini-grip{position:absolute;left:3px;top:10px;width:14px;height:44px;display:flex;align-items:center;justify-content:center;color:var(--dsw-alias-label-tertiary);cursor:grab;border-radius:6px;touch-action:none;opacity:.6;}
|
|
1432
1523
|
.dshm-mini-grip:hover,.dshm-mini-grip:focus-visible{opacity:1;background:var(--dsw-alias-interactive-bg-hover);outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1433
1524
|
.dshm-mini-grip:active{cursor:grabbing;}
|
|
1434
|
-
.dshm-mini-artist{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:0;background:transparent;padding:0;margin:0;font:inherit;font-size:
|
|
1525
|
+
.dshm-mini-artist{display:inline-flex;align-items:center;gap:4px;max-width:100%;border:0;background:transparent;padding:0;margin:0;font:inherit;font-size:12px;line-height:14px;color:var(--dsw-alias-label-tertiary);cursor:pointer;text-align:left;border-radius:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
1435
1526
|
.dshm-mini-artist:hover{color:var(--dsw-alias-brand-text);text-decoration:underline;}
|
|
1436
1527
|
.dshm-mini-artist:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1437
|
-
.dshm-mini-seek{padding:0 12px 0
|
|
1438
|
-
.dshm-mini-seek .dshm-slider{height:
|
|
1439
|
-
.dshm-mini-lyrics{display:flex;flex-direction:column;gap:1px;padding:2px 14px 8px
|
|
1440
|
-
.dshm-mini-lyric{font-size:
|
|
1528
|
+
.dshm-mini-seek{padding:0 12px 0 22px;}
|
|
1529
|
+
.dshm-mini-seek .dshm-slider{height:20px;}
|
|
1530
|
+
.dshm-mini-lyrics{display:flex;flex-direction:column;gap:1px;padding:2px 14px 8px 22px;overflow:hidden;}
|
|
1531
|
+
.dshm-mini-lyric{font-size:12px;line-height:16px;color:var(--dsw-alias-label-tertiary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.5;transition:opacity .25s ease,color .25s ease;}
|
|
1441
1532
|
.dshm-mini-lyric-on{color:var(--dsw-alias-label-primary);opacity:1;font-weight:600;}
|
|
1442
1533
|
.dshm-mode-cycle{min-width:32px;}
|
|
1443
1534
|
.dshm-chipbtn.dshm-mode-cycle{padding:0 9px;}
|
|
1444
|
-
.dshm-mini-controls{display:flex;align-items:center;gap:
|
|
1445
|
-
.dshm-mini-controls .dshm-iconbtn{width:
|
|
1446
|
-
.dshm-mini-controls .dshm-mini-play{width:
|
|
1447
|
-
.dshm-mini-like{width:
|
|
1448
|
-
.dshm-mini-like:hover{background:
|
|
1449
|
-
.dshm-mini-like-on{
|
|
1450
|
-
.dshm-
|
|
1451
|
-
.dshm-
|
|
1452
|
-
|
|
1453
|
-
.dshm-
|
|
1454
|
-
.dshm-
|
|
1535
|
+
.dshm-mini-controls{display:flex;align-items:center;gap:4px;flex:none;}
|
|
1536
|
+
.dshm-mini-controls .dshm-iconbtn{width:30px;height:30px;}
|
|
1537
|
+
.dshm-mini-controls .dshm-mini-play{width:32px;height:32px;}
|
|
1538
|
+
.dshm-mini-like{width:28px;height:28px;margin:0 1px;}
|
|
1539
|
+
.dshm-mini-like:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1540
|
+
.dshm-mini-like.dshm-like-btn-on{color:var(--dshm-love);}
|
|
1541
|
+
.dshm-mini-titlebtn{appearance:none;border:0;background:transparent;padding:0;margin:0;color:inherit;font:inherit;text-align:left;cursor:pointer;max-width:100%;border-radius:4px;}
|
|
1542
|
+
.dshm-mini-titlebtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1543
|
+
/* ··· 菜单:默认向上展开(贴底停靠不被裁切),拖到视口上半部时自动切为向下 */
|
|
1544
|
+
.dshm-mini-more{position:relative;display:flex;}
|
|
1545
|
+
.dshm-mini-menu{position:absolute;right:0;bottom:calc(100% + 8px);top:auto;min-width:208px;padding:5px;border-radius:11px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);box-shadow:0 12px 32px var(--dsw-alias-bg-mask-2);z-index:1200;display:flex;flex-direction:column;gap:2px;}
|
|
1546
|
+
.dshm-mini-menu-down{top:calc(100% + 8px);bottom:auto;}
|
|
1547
|
+
.dshm-mini-menuitem{display:flex;align-items:center;gap:10px;padding:7px 10px;border:0;border-radius:7px;background:transparent;color:var(--dsw-alias-label-primary);font:inherit;font-size:12.5px;text-align:left;cursor:pointer;white-space:nowrap;}
|
|
1548
|
+
.dshm-mini-menuitem:hover,.dshm-mini-menuitem:focus-visible{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1549
|
+
.dshm-mini-menuitem .dshm-count{margin-left:auto;padding-left:10px;font-size:11px;color:var(--dsw-alias-label-tertiary);}
|
|
1455
1550
|
.dshm-mini-play{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);border-radius:50%;width:34px;height:34px;}
|
|
1456
1551
|
.dshm-mini-play:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover);color:var(--dsw-alias-label-primary-inverted);}
|
|
1552
|
+
.dshm-now-actions{display:inline-flex;align-self:flex-start;align-items:center;gap:2px;padding:0;border:0;background:transparent;box-shadow:none;margin:0;}
|
|
1553
|
+
.dshm-now-like{width:34px;height:34px;border-radius:50%;}
|
|
1554
|
+
.dshm-now-like:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1555
|
+
.dshm-now-like.dshm-like-btn-on{background:transparent;}
|
|
1556
|
+
.dshm-transport>.dshm-now-actions{margin:0 4px 0 auto;}
|
|
1557
|
+
.dshm-transport>.dshm-now-actions .dshm-now-like{width:30px;height:30px;color:var(--dsw-alias-label-tertiary);}
|
|
1558
|
+
.dshm-transport>.dshm-now-actions .dshm-now-like:hover{color:var(--dsw-alias-label-primary);}
|
|
1559
|
+
.dshm-transport>.dshm-now-actions .dshm-now-like.dshm-like-btn-on{color:var(--dshm-love);}
|
|
1457
1560
|
.dshm-reco{max-width:560px;margin:0 auto;}
|
|
1458
1561
|
.dshm-reco-tags{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:6px;}
|
|
1459
|
-
.dshm-reco-tag{font-size:
|
|
1460
|
-
.dshm-reco-page{flex:1;min-height:0;overflow-y:auto;padding:12px 20px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;width:100%;max-width:
|
|
1562
|
+
.dshm-reco-tag{font-size:12px;color:var(--dsw-alias-label-secondary);border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:99px;padding:4px 10px;}
|
|
1563
|
+
.dshm-reco-page{flex:1;min-height:0;overflow-y:auto;padding:12px var(--dshm-pad) 20px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;width:100%;max-width:var(--dshm-axis);margin:0 auto;}
|
|
1461
1564
|
.dshm-reco-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-top:14px;}
|
|
1462
1565
|
.dshm-reco-card{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;transition:border-color .15s,box-shadow .15s;}
|
|
1463
1566
|
.dshm-reco-card:hover{border-color:var(--dsw-alias-border-l3);box-shadow:0 2px 10px var(--dsw-alias-bg-mask-2);}
|
|
1464
1567
|
.dshm-reco-card-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap;}
|
|
1465
|
-
.dshm-cat-chip{font-size:
|
|
1568
|
+
.dshm-cat-chip{font-size:12px;padding:2px 9px;border-radius:99px;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);}
|
|
1466
1569
|
.dshm-cat-explore{color:var(--dsw-alias-brand-text);border-color:var(--dsw-alias-brand-primary);}
|
|
1467
|
-
.dshm-axis-chip{font-size:
|
|
1570
|
+
.dshm-axis-chip{font-size:12px;padding:2px 9px;border-radius:99px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-tertiary);}
|
|
1468
1571
|
.dshm-reco-title{font-size:13.5px;font-weight:600;color:var(--dsw-alias-label-primary);}
|
|
1469
|
-
.dshm-reco-sub{font-size:
|
|
1572
|
+
.dshm-reco-sub{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1470
1573
|
.dshm-reco-reason{font-size:12px;line-height:1.6;color:var(--dsw-alias-label-secondary);}
|
|
1471
1574
|
.dshm-reco-foot{margin-top:auto;display:flex;align-items:center;gap:8px;padding-top:4px;}
|
|
1472
1575
|
.dshm-dl{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:6px;}
|
|
@@ -1474,38 +1577,39 @@ window.__ModuleLoader__.load({
|
|
|
1474
1577
|
.dshm-dl-dot{width:8px;height:8px;border-radius:50%;background:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1475
1578
|
.dshm-dl-ok{background:var(--dsw-alias-state-success-primary);}
|
|
1476
1579
|
.dshm-dl-fail{background:var(--dsw-alias-state-error-primary);}
|
|
1477
|
-
.dshm-dl-status{font-size:
|
|
1580
|
+
.dshm-dl-status{font-size:12px;color:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1478
1581
|
.dshm-dl-bar{height:3px;border-radius:2px;background:var(--dsw-alias-bg-layer-3);overflow:hidden;margin:2px 0 4px;}
|
|
1479
1582
|
.dshm-dl-bar>div{height:100%;background:var(--dsw-alias-brand-primary);transition:width .4s ease;}
|
|
1480
|
-
.dshm-dl-float{position:fixed;right:16px;bottom:16px;z-index:
|
|
1583
|
+
.dshm-dl-float{position:fixed;right:16px;bottom:16px;z-index:1100;width:min(340px,calc(100% - 32px));background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:14px;box-shadow:0 10px 30px var(--dsw-alias-bg-mask-2);padding:10px 12px;display:flex;flex-direction:column;gap:8px;animation:dshm-mini-in .22s ease-out;}
|
|
1481
1584
|
.dshm-dl-head{display:flex;align-items:center;gap:8px;min-width:0;}
|
|
1482
1585
|
.dshm-dl-title{font-size:13px;font-weight:600;}
|
|
1483
1586
|
.dshm-dl-list{display:flex;flex-direction:column;gap:4px;max-height:min(40vh,320px);overflow:auto;padding-right:2px;}
|
|
1484
1587
|
.dshm-dl-wait{background:var(--dsw-alias-brand-primary);opacity:.45;}
|
|
1485
|
-
.dshm-dl-note{font-size:
|
|
1588
|
+
.dshm-dl-note{font-size:12px;color:var(--dsw-alias-label-tertiary);max-width:40%;flex:none;}
|
|
1486
1589
|
.dshm-dl-foot{display:flex;align-items:center;gap:8px;border-top:1px solid var(--dsw-alias-border-l1);padding-top:8px;}
|
|
1487
1590
|
.dshm-dl-sum{font-size:12px;flex:1;min-width:0;}
|
|
1488
1591
|
.dshm-dl-sum-ok{color:var(--dsw-alias-state-success-primary);}
|
|
1489
1592
|
.dshm-dl-sum-warn{color:var(--dsw-alias-state-warn-primary);}
|
|
1490
|
-
.dshm-dl-pill{position:fixed;right:16px;bottom:16px;z-index:
|
|
1593
|
+
.dshm-dl-pill{position:fixed;right:16px;bottom:16px;z-index:1100;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);box-shadow:0 6px 20px var(--dsw-alias-bg-mask-2);font-size:12.5px;color:var(--dsw-alias-label-primary);cursor:pointer;max-width:calc(100% - 32px);}
|
|
1594
|
+
.dshm-dl-pill:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1491
1595
|
.dshm-dl-pill-bar{width:56px;height:3px;border-radius:2px;background:var(--dsw-alias-bg-layer-3);overflow:hidden;flex:none;}
|
|
1492
1596
|
.dshm-dl-pill-bar>span{display:block;height:100%;background:var(--dsw-alias-brand-primary);transition:width .4s ease;}
|
|
1493
|
-
.dshm-sync{margin:12px
|
|
1597
|
+
.dshm-sync{margin:12px 0 0;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l1);border-radius:12px;padding:12px 16px;display:flex;flex-direction:column;gap:10px;}
|
|
1494
1598
|
.dshm-sync-chips{display:flex;gap:8px;flex-wrap:wrap;}
|
|
1495
|
-
.dshm-sync-chip{font-size:
|
|
1496
|
-
.dshm-sync-detail{font-size:
|
|
1599
|
+
.dshm-sync-chip{font-size:12px;border:1px solid var(--dsw-alias-border-l1);border-radius:99px;padding:4px 12px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-2);}
|
|
1600
|
+
.dshm-sync-detail{font-size:12px;color:var(--dsw-alias-label-tertiary);line-height:1.7;}
|
|
1497
1601
|
.dshm-sync-chip-ok{color:var(--dsw-alias-state-success-primary);border-color:currentColor;}
|
|
1498
1602
|
.dshm-sync-chip-warn{color:var(--dsw-alias-state-warn-primary);border-color:currentColor;}
|
|
1499
1603
|
.dshm-imp-result{display:flex;flex-direction:column;gap:8px;}
|
|
1500
1604
|
.dshm-state-actions{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;}
|
|
1501
1605
|
.dshm-chipbtn-plain{background:transparent;}
|
|
1502
1606
|
.dshm-src-chips{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle;}
|
|
1503
|
-
.dshm-src-chip{font-size:
|
|
1607
|
+
.dshm-src-chip{font-size:11px;line-height:1;border:1px solid var(--dsw-alias-border-l1);border-radius:99px;padding:2px 6px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-layer-2);}
|
|
1504
1608
|
.dshm-src-netease{color:var(--dsw-alias-state-error-primary);}
|
|
1505
1609
|
.dshm-src-qq{color:var(--dsw-alias-label-secondary);}
|
|
1506
1610
|
.dshm-imp-account{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:13px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;padding:8px 12px;}
|
|
1507
1611
|
.dshm-imp-nick{font-weight:600;}
|
|
1508
|
-
.dshm-imp-time{font-size:
|
|
1612
|
+
.dshm-imp-time{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1509
1613
|
.dshm-imp-qr{display:flex;gap:16px;align-items:flex-start;}
|
|
1510
1614
|
.dshm-imp-qr-box{flex:none;width:196px;height:196px;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center;color:var(--dsw-alias-label-tertiary);}
|
|
1511
1615
|
.dshm-imp-qr-fallback{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:12px;color:var(--dsw-alias-label-tertiary);text-align:center;padding:12px;}
|
|
@@ -1557,20 +1661,21 @@ window.__ModuleLoader__.load({
|
|
|
1557
1661
|
.dshm-imp-nick{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
|
1558
1662
|
.dshm-linkbtn{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:var(--dsw-alias-brand-primary);font:inherit;font-size:12.5px;cursor:pointer;align-self:flex-start;}
|
|
1559
1663
|
.dshm-linkbtn:hover{text-decoration:underline;}
|
|
1560
|
-
.dshm-
|
|
1664
|
+
.dshm-linkbtn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1665
|
+
.dshm-imp-hint-more{font-size:12px;padding-top:8px;border-top:1px dashed var(--dsw-alias-border-l1);}
|
|
1561
1666
|
.dshm-imp-cookie:focus-visible{border-color:var(--dsw-alias-brand-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--dsw-alias-brand-primary) 18%,transparent);}
|
|
1562
1667
|
.dshm-row-add-ready{width:auto;height:24px;padding:0 9px 0 7px;gap:3px;border-radius:999px;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);}
|
|
1563
1668
|
.dshm-row-add-ready:hover{filter:brightness(1.08);background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);}
|
|
1564
1669
|
.dshm-row-add-text{font-size:11px;font-weight:600;line-height:1;}
|
|
1565
1670
|
.dshm-row-add-none{opacity:.6;border:1px dashed var(--dsw-alias-border-l3);}
|
|
1566
1671
|
.dshm-missing-chip.dshm-scan-chip{display:inline-flex;align-items:center;gap:4px;color:var(--dsw-alias-brand-primary);border-color:color-mix(in srgb,var(--dsw-alias-brand-primary) 35%,transparent);}
|
|
1567
|
-
.dshm-missing-chip{font-size:
|
|
1672
|
+
.dshm-missing-chip{font-size:12px;color:var(--dsw-alias-state-warn-primary);border:1px solid currentColor;border-radius:99px;padding:2px 9px;white-space:nowrap;}
|
|
1568
1673
|
.dshm-settings{position:relative;height:100%;overflow:auto;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-size:13px;animation:dshm-fade-in .28s ease-out;}
|
|
1569
|
-
.dshm-settings-inner{max-width:
|
|
1674
|
+
.dshm-settings-inner{max-width:760px;margin:0 auto;padding:28px 24px 150px;width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:20px;}
|
|
1570
1675
|
.dshm-settings-narrow{max-width:540px;}
|
|
1571
|
-
.dshm-set-hero{margin:
|
|
1572
|
-
.dshm-logo{display:block;width:
|
|
1573
|
-
.dshm-set-first-note{margin:4px 0 0;font-size:12.5px;line-height:1.7;color:var(--dsw-alias-label-tertiary);text-align:
|
|
1676
|
+
.dshm-set-hero{margin:4px 0 4px;text-align:left;}
|
|
1677
|
+
.dshm-logo{display:block;width:56px;height:56px;object-fit:contain;filter:drop-shadow(0 4px 10px var(--dsw-alias-bg-mask-2));user-select:none;margin:0;}
|
|
1678
|
+
.dshm-set-first-note{margin:4px 0 0;font-size:12.5px;line-height:1.7;color:var(--dsw-alias-label-tertiary);text-align:left;}
|
|
1574
1679
|
.dshm-set-top{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding-bottom:12px;border-bottom:1px solid var(--dsw-alias-border-l1);}
|
|
1575
1680
|
.dshm-set-top-title{display:flex;align-items:center;gap:8px;color:var(--dsw-alias-label-primary);}
|
|
1576
1681
|
.dshm-set-top-title h1{margin:0;font-size:18px;}
|
|
@@ -1583,150 +1688,215 @@ window.__ModuleLoader__.load({
|
|
|
1583
1688
|
.dshm-set-head .dshm-wstep-sub{flex-basis:100%;margin:0;max-width:none;padding-left:34px;line-height:1.55;}
|
|
1584
1689
|
.dshm-imp-logged{display:flex;flex-direction:column;gap:10px;min-width:0;}
|
|
1585
1690
|
.dshm-imp-account{max-width:100%;}
|
|
1586
|
-
.dshm-set-foot{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px -24px -
|
|
1587
|
-
.dshm-set-foot-hint{font-size:
|
|
1691
|
+
.dshm-set-foot{position:sticky;bottom:0;z-index:2;display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px -24px -150px;padding:14px 24px 28px;background:var(--dsw-alias-bg-base);border-top:1px solid var(--dsw-alias-border-l1);}
|
|
1692
|
+
.dshm-set-foot-hint{font-size:12px;color:var(--dsw-alias-label-tertiary);margin-left:auto;}
|
|
1588
1693
|
.dshm-set-saved{display:inline-flex;align-items:center;gap:4px;font-size:12px;color:var(--dsw-alias-state-success-primary);}
|
|
1589
1694
|
@media (max-width:520px){.dshm-imp-qr{flex-direction:column;align-items:center;}.dshm-settings-inner{padding:20px 16px 88px;}.dshm-set-foot{margin:4px -16px -88px;padding:10px 16px 18px;}}
|
|
1590
|
-
.dshm-hrow{display:
|
|
1591
|
-
.dshm-hrow-
|
|
1695
|
+
.dshm-hrow{display:flex;align-items:center;gap:12px;padding:7px 10px;border-radius:10px;}
|
|
1696
|
+
.dshm-hrow-play{appearance:none;border:0;background:transparent;padding:0;margin:0;cursor:pointer;flex:none;border-radius:8px;display:inline-flex;}
|
|
1697
|
+
.dshm-hrow-play:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1698
|
+
.dshm-hrow-click{cursor:pointer;outline:none;}
|
|
1592
1699
|
.dshm-hrow-click:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1593
1700
|
.dshm-hrow-click:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1594
|
-
.dshm-row-sub-btn{appearance:none;background:none;border:0;padding:0;margin:0;cursor:pointer;text-align:left;font-family:inherit;font-size:12px;color:var(--dsw-alias-label-tertiary);max-width:100%;overflow:hidden;display:inline-flex;align-items:center;gap:4px;vertical-align:middle;}
|
|
1701
|
+
.dshm-row-sub-btn{appearance:none;background:none;border:0;padding:0;margin:0;cursor:pointer;text-align:left;font-family:inherit;font-size:12px;color:var(--dsw-alias-label-tertiary);max-width:100%;overflow:hidden;display:inline-flex;align-items:center;gap:4px;vertical-align:middle;border-radius:3px;}
|
|
1595
1702
|
.dshm-row-sub-btn:hover{color:var(--dsw-alias-brand-text);text-decoration:underline;text-underline-offset:3px;}
|
|
1703
|
+
.dshm-row-sub-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1596
1704
|
.dshm-hrow:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1597
|
-
.dshm-
|
|
1598
|
-
.dshm-hbar
|
|
1599
|
-
.dshm-
|
|
1600
|
-
.dshm-
|
|
1601
|
-
.dshm-
|
|
1602
|
-
.dshm-
|
|
1603
|
-
.dshm-
|
|
1705
|
+
.dshm-hrow-meta{display:flex;align-items:center;justify-content:flex-end;gap:12px;flex:none;}
|
|
1706
|
+
.dshm-hbar{height:3px;border-radius:2px;background:var(--dsw-alias-bg-layer-3);overflow:hidden;}
|
|
1707
|
+
.dshm-hbar>div{height:100%;background:var(--dsw-alias-label-tertiary);}
|
|
1708
|
+
.dshm-hskip{font-size:11px;color:var(--dsw-alias-label-tertiary);border:1px solid var(--dsw-alias-border-l2);border-radius:99px;padding:1px 7px;line-height:1.4;flex:none;}
|
|
1709
|
+
.dshm-htime{font-size:12px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;width:44px;text-align:right;flex:none;}
|
|
1710
|
+
.dshm-hlist{margin-top:22px;padding:0 0 24px;}
|
|
1711
|
+
.dshm-hlist .dshm-queue-head{padding:0 10px 10px;margin-bottom:4px;}
|
|
1712
|
+
.dshm-hlist .dshm-queue-head .dshm-col-play{margin-left:auto;}
|
|
1713
|
+
.dshm-explore-chip{flex:none;font-size:12px;font-weight:600;padding:1px 6px;border-radius:99px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l1);}
|
|
1714
|
+
.dshm-explore-note{display:flex;align-items:flex-start;gap:7px;margin:10px 0 0;padding:8px 11px;border-radius:9px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);color:var(--dsw-alias-label-secondary);font-size:12px;line-height:1.5;}
|
|
1604
1715
|
.dshm-columns{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;}
|
|
1605
1716
|
.dshm-column{min-height:0;display:flex;flex-direction:column;border-right:1px solid var(--dsw-alias-border-l1);}
|
|
1606
1717
|
.dshm-column:last-child{border-right:0;}
|
|
1607
|
-
.dshm-col-head{flex:none;display:flex;align-items:center;gap:8px;padding:12px
|
|
1718
|
+
.dshm-col-head{flex:none;display:flex;align-items:center;gap:8px;padding:12px 10px 8px;}
|
|
1608
1719
|
.dshm-col-title{font-size:13.5px;font-weight:680;color:var(--dsw-alias-label-primary);display:flex;align-items:center;gap:6px;}
|
|
1609
|
-
.dshm-col-count{font-size:
|
|
1720
|
+
.dshm-col-count{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1610
1721
|
.dshm-col-play{margin-left:0;}
|
|
1611
1722
|
.dshm-col-actions{display:flex;align-items:center;gap:6px;margin-left:auto;}
|
|
1612
1723
|
.dshm-col-refresh{width:26px;height:26px;padding:0;justify-content:center;color:var(--dsw-alias-label-secondary);}
|
|
1613
1724
|
.dshm-col-refresh:hover{color:var(--dsw-alias-label-primary);}
|
|
1614
|
-
.dshm-col-
|
|
1725
|
+
.dshm-col-refresh:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px;}
|
|
1726
|
+
.dshm-col-loading{display:flex;align-items:center;gap:6px;padding:0 10px 6px;font-size:12px;color:var(--dsw-alias-label-secondary);}
|
|
1615
1727
|
.dshm-refresh-note{color:var(--dsw-alias-label-secondary);}
|
|
1616
1728
|
.dshm-playround-busy{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);opacity:.7;}
|
|
1617
1729
|
.dshm-playround .dshm-spin,.dshm-col-refresh .dshm-spin,.dshm-col-loading .dshm-spin,.dshm-row-play .dshm-spin{display:inline-block;width:12px;height:12px;border-radius:50%;border:2px solid currentColor;border-top-color:transparent;box-sizing:border-box;}
|
|
1618
|
-
.dshm-col-list{flex:1;min-height:0;overflow-y:auto;padding:2px
|
|
1619
|
-
.dshm-srow{display:grid;grid-template-columns:
|
|
1730
|
+
.dshm-col-list{flex:1;min-height:0;overflow-y:auto;padding:2px 6px 16px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;}
|
|
1731
|
+
.dshm-srow{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:10px;padding:6px;border-radius:10px;transition:background .12s;}
|
|
1620
1732
|
.dshm-srow:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1621
|
-
.dshm-srow-main{min-width:0;display:flex;flex-direction:column;gap:1px;border:0;background:transparent;font:inherit;color:inherit;text-align:left;padding:0;cursor:pointer;}
|
|
1622
|
-
.dshm-srow-
|
|
1623
|
-
.dshm-srow-
|
|
1733
|
+
.dshm-srow-main{min-width:0;display:flex;flex-direction:column;gap:1px;border:0;background:transparent;font:inherit;color:inherit;text-align:left;padding:0;cursor:pointer;outline:none;}
|
|
1734
|
+
.dshm-srow-main:focus-within .dshm-srow-artist{color:var(--dsw-alias-brand-text);}
|
|
1735
|
+
.dshm-srow-title{font-size:13px;font-weight:560;color:var(--dsw-alias-label-primary);}
|
|
1736
|
+
.dshm-srow-sub{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1624
1737
|
.dshm-srow-artist{appearance:none;background:none;border:0;padding:0;margin:0;font:inherit;color:inherit;cursor:pointer;border-radius:4px;}
|
|
1625
1738
|
.dshm-srow-artist:hover{color:var(--dsw-alias-brand-text);text-decoration:underline;text-underline-offset:3px;}
|
|
1626
1739
|
.dshm-srow-artist:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1627
|
-
.dshm-srow-reason{font-size:
|
|
1740
|
+
.dshm-srow-reason{font-size:12px;color:var(--dsw-alias-label-secondary);line-height:1.45;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
|
1741
|
+
.dshm-srow-tail{display:flex;align-items:center;gap:0;opacity:0;transition:opacity .15s;}
|
|
1742
|
+
.dshm-srow:hover .dshm-srow-tail,.dshm-srow:focus-within .dshm-srow-tail{opacity:1;}
|
|
1743
|
+
.dshm-srow-tail .dshm-like-btn-on{opacity:1;}
|
|
1744
|
+
.dshm-srow:has(.dshm-like-btn-on) .dshm-srow-tail{opacity:1;}
|
|
1745
|
+
.dshm-srow-tail .dshm-like-btn-on{color:var(--dshm-love);}
|
|
1746
|
+
.dshm-srow .dshm-playcover{position:relative;flex:none;width:40px;height:40px;border-radius:8px;overflow:hidden;padding:0;border:0;background:transparent;cursor:pointer;}
|
|
1747
|
+
.dshm-srow .dshm-playcover .dshm-tile{width:40px;height:40px;border-radius:0;border:0;}
|
|
1748
|
+
.dshm-srow .dshm-playcover::after{content:"";position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1);opacity:0;transition:opacity .15s;display:flex;align-items:center;justify-content:center;}
|
|
1749
|
+
.dshm-srow .dshm-playcover-ico{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;opacity:0;transition:opacity .15s;z-index:1;}
|
|
1750
|
+
.dshm-srow .dshm-playcover:hover::after,.dshm-srow .dshm-playcover:focus-visible::after{opacity:.35;}
|
|
1751
|
+
.dshm-srow .dshm-playcover:hover .dshm-playcover-ico,.dshm-srow .dshm-playcover:focus-visible .dshm-playcover-ico,.dshm-srow .dshm-playcover[data-on="true"] .dshm-playcover-ico{opacity:1;}
|
|
1752
|
+
.dshm-srow .dshm-playcover[data-on="true"]::after{opacity:.45;}
|
|
1753
|
+
.dshm-srow .dshm-playcover:focus-visible{outline:2px solid #fff;outline-offset:-2px;border-radius:8px;}
|
|
1628
1754
|
.dshm-like-btn{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);width:30px;height:30px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;flex:none;transition:transform .12s,color .12s;}
|
|
1629
1755
|
.dshm-like-btn:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover);}
|
|
1630
1756
|
.dshm-like-btn:active{transform:scale(1.18);}
|
|
1631
|
-
.dshm-like-btn-
|
|
1757
|
+
.dshm-like-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1758
|
+
.dshm-like-btn-on,.dshm-like-btn-on:hover{color:var(--dshm-love);}
|
|
1632
1759
|
.dshm-row-off{opacity:.55;cursor:not-allowed;}
|
|
1633
1760
|
.dshm-row-off:hover{background:transparent;}
|
|
1634
1761
|
.dshm-dislike-btn-on{color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover);}
|
|
1635
|
-
.dshm-dislikes{margin-top:14px;}
|
|
1762
|
+
.dshm-dislikes{margin-top:16px;padding:14px 12px 10px;border-radius:14px;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);}
|
|
1636
1763
|
.dshm-dislike-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:9px;font-size:12.5px;color:var(--dsw-alias-label-secondary);}
|
|
1637
1764
|
.dshm-dislike-row:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1765
|
+
.dshm-dislike-name{flex:1;min-width:0;color:var(--dsw-alias-label-primary);}
|
|
1766
|
+
.dshm-dislike-date{flex:none;font-variant-numeric:tabular-nums;}
|
|
1638
1767
|
.dshm-dislike-undo{flex:none;}
|
|
1639
1768
|
.dshm-playround{appearance:none;border:0;width:30px;height:30px;border-radius:50%;background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;flex:none;transition:background .13s,transform .1s;}
|
|
1640
1769
|
.dshm-playround:hover{background:var(--dsw-alias-button-primary-hover);transform:scale(1.06);}
|
|
1770
|
+
.dshm-playround:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:2px;}
|
|
1641
1771
|
.dshm-playround:disabled{opacity:.45;cursor:default;transform:none;}
|
|
1772
|
+
.dshm-chipbtn.dshm-col-play{width:26px;height:26px;padding:0;justify-content:center;border-color:transparent;background:transparent;color:var(--dsw-alias-label-secondary);}
|
|
1773
|
+
.dshm-chipbtn.dshm-col-play:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary);}
|
|
1774
|
+
.dshm-chipbtn.dshm-col-play:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px;}
|
|
1642
1775
|
.dshm-tile{border-radius:8px;overflow:hidden;background:linear-gradient(145deg,var(--dsw-alias-bg-layer-2),var(--dsw-alias-bg-layer-3));border:1px solid var(--dsw-alias-border-l1);display:flex;align-items:center;justify-content:center;color:var(--dsw-alias-label-tertiary);flex:none;}
|
|
1643
1776
|
.dshm-tile img{width:100%;height:100%;object-fit:cover;display:block;}
|
|
1644
|
-
.dshm-arow{display:grid;grid-template-columns:44px minmax(0,1fr) 18px;align-items:center;gap:10px;width:100%;padding:6px;border:0;background:transparent;font:inherit;color:inherit;text-align:left;border-radius:10px;cursor:pointer;transition:background .12s;}
|
|
1777
|
+
.dshm-arow{display:grid;grid-template-columns:44px minmax(0,1fr) 18px;align-items:center;gap:10px;width:100%;padding:6px;border:0;background:transparent;font:inherit;color:inherit;text-align:left;border-radius:10px;cursor:pointer;transition:background .12s;outline:none;}
|
|
1645
1778
|
.dshm-arow:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1779
|
+
.dshm-arow:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1646
1780
|
.dshm-arow-text{display:flex;flex-direction:column;gap:1px;min-width:0;}
|
|
1647
1781
|
.dshm-arow-arrow{color:var(--dsw-alias-label-tertiary);font-size:16px;line-height:1;}
|
|
1648
|
-
.dshm-apage
|
|
1649
|
-
.dshm-apage-banner
|
|
1650
|
-
.dshm-apage-banner
|
|
1651
|
-
.dshm-apage-
|
|
1652
|
-
.dshm-apage-
|
|
1782
|
+
.dshm-apage{flex:1;min-height:0;overflow-y:auto;padding:16px var(--dshm-pad) 28px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;width:100%;max-width:var(--dshm-axis);margin:0 auto;}
|
|
1783
|
+
.dshm-apage-banner{position:relative;height:180px;border-radius:16px;overflow:hidden;background:linear-gradient(135deg,var(--dsw-alias-bg-layer-2),var(--dsw-alias-bg-module-platform));margin-bottom:-56px;display:flex;align-items:center;justify-content:flex-end;padding:0 14px;color:var(--dsw-alias-label-tertiary);}
|
|
1784
|
+
.dshm-apage-banner img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:.9;}
|
|
1785
|
+
.dshm-apage-banner-mask{position:absolute;inset:0;background:linear-gradient(180deg,transparent 20%,var(--dsw-alias-bg-base) 96%);}
|
|
1786
|
+
.dshm-apage-hero{position:relative;display:flex;align-items:flex-end;gap:18px;margin-bottom:18px;padding:0 4px;}
|
|
1787
|
+
.dshm-apage-ava-wrap{width:112px;height:112px;border-radius:50%;border:2px solid var(--dsw-alias-bg-base);box-shadow:0 6px 18px var(--dsw-alias-bg-mask-2);overflow:hidden;flex:none;background:var(--dsw-alias-bg-module-platform);}
|
|
1653
1788
|
.dshm-apage-ava-wrap .dshm-tile{width:100%!important;height:100%!important;border:0;border-radius:0;}
|
|
1789
|
+
.dshm-apage-name{font-size:24px;font-weight:700;margin:0;letter-spacing:-.2px;}
|
|
1790
|
+
.dshm-apage-sub{font-size:12.5px;color:var(--dsw-alias-label-secondary);margin:2px 0 0;}
|
|
1791
|
+
.dshm-apage-back{margin-bottom:12px;}
|
|
1654
1792
|
.dshm-agrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;padding:4px 6px;}
|
|
1655
|
-
.dshm-artcard{appearance:none;border:0;background:transparent;font:inherit;color:inherit;display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 6px;border-radius:12px;cursor:pointer;transition:background .13s;}
|
|
1793
|
+
.dshm-artcard{appearance:none;border:0;background:transparent;font:inherit;color:inherit;display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 6px;border-radius:12px;cursor:pointer;transition:background .13s;outline:none;}
|
|
1656
1794
|
.dshm-artcard:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1795
|
+
.dshm-artcard:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1657
1796
|
.dshm-artcard:hover .dshm-artava{box-shadow:0 4px 14px var(--dsw-alias-bg-mask-2);}
|
|
1658
1797
|
.dshm-artava{width:62px;height:62px;border-radius:50%;background:var(--dsw-alias-bg-module-platform);border:1px solid var(--dsw-alias-border-l2);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;color:var(--dsw-alias-label-secondary);transition:box-shadow .15s;}
|
|
1659
1798
|
.dshm-artname{font-size:12px;font-weight:600;text-align:center;max-width:100%;}
|
|
1660
|
-
.dshm-arthint{font-size:
|
|
1799
|
+
.dshm-arthint{font-size:12px;color:var(--dsw-alias-label-tertiary);text-align:center;line-height:1.45;}
|
|
1661
1800
|
.dshm-mode-group{display:inline-flex;align-items:center;gap:2px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:99px;padding:2px;}
|
|
1662
1801
|
.dshm-mode-btn{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);width:30px;height:28px;border-radius:99px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0;}
|
|
1663
1802
|
.dshm-mode-btn:hover{color:var(--dsw-alias-label-primary);}
|
|
1803
|
+
.dshm-mode-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1664
1804
|
.dshm-mode-btn-on{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-inverted);}
|
|
1665
1805
|
.dshm-mode-btn-on:hover{color:var(--dsw-alias-label-primary-inverted);}
|
|
1666
|
-
.dshm-mode-hint{font-size:
|
|
1667
|
-
.dshm-apage{flex:1;min-height:0;overflow-y:auto;padding:16px 20px 28px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;width:100%;max-width:1120px;margin:0 auto;}
|
|
1668
|
-
.dshm-apage-hero{display:flex;align-items:center;gap:16px;margin-bottom:16px;}
|
|
1806
|
+
.dshm-mode-hint{font-size:12px;color:var(--dsw-alias-label-tertiary);margin-top:6px;}
|
|
1669
1807
|
.dshm-apage-ava{width:76px;height:76px;border-radius:50%;background:var(--dsw-alias-bg-module-platform);border:1px solid var(--dsw-alias-border-l2);display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:700;color:var(--dsw-alias-label-secondary);flex:none;}
|
|
1670
|
-
.dshm-apage-name{font-size:20px;font-weight:700;margin:0;}
|
|
1671
1808
|
@media (max-width:980px){
|
|
1672
1809
|
.dshm-columns{grid-template-columns:1fr;}
|
|
1673
|
-
.dshm-toolbar{padding:10px 12px;}
|
|
1674
1810
|
.dshm-header{padding:12px 12px 0;}
|
|
1675
1811
|
.dshm-reco-page{padding:10px 12px;}
|
|
1676
1812
|
.dshm-apage{padding:14px 12px 24px;}
|
|
1677
|
-
.dshm-now{padding:
|
|
1813
|
+
.dshm-now{padding:0 12px;}
|
|
1678
1814
|
.dshm-column{border-right:0;border-bottom:1px solid var(--dsw-alias-border-l1);max-height:46vh;}
|
|
1679
1815
|
}
|
|
1680
|
-
.dshm-history-page{width:100%;max-width:
|
|
1681
|
-
.dshm-
|
|
1682
|
-
.dshm-
|
|
1683
|
-
.dshm-
|
|
1684
|
-
.dshm-
|
|
1685
|
-
.dshm-
|
|
1686
|
-
.dshm-
|
|
1687
|
-
.dshm-
|
|
1688
|
-
.dshm-
|
|
1689
|
-
.dshm-
|
|
1690
|
-
.dshm-
|
|
1691
|
-
.dshm-
|
|
1692
|
-
.dshm-
|
|
1693
|
-
.dshm-
|
|
1816
|
+
.dshm-history-page{width:100%;max-width:var(--dshm-axis);margin:0 auto;padding:16px 0 28px;}
|
|
1817
|
+
.dshm-hist-hero{display:grid;grid-template-columns:minmax(260px,1fr) minmax(300px,420px);gap:20px 32px;align-items:stretch;padding:20px 24px;border-radius:14px;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);}
|
|
1818
|
+
.dshm-hist-hero-solo{grid-template-columns:1fr;}
|
|
1819
|
+
.dshm-hist-overview{display:flex;flex-direction:column;justify-content:space-between;min-width:0;}
|
|
1820
|
+
.dshm-hist-main{display:flex;align-items:flex-end;gap:36px;flex-wrap:wrap;}
|
|
1821
|
+
.dshm-hist-big-item{display:flex;flex-direction:column;gap:5px;}
|
|
1822
|
+
.dshm-hist-big-label{font-size:12px;font-weight:500;letter-spacing:0;color:var(--dsw-alias-label-tertiary);}
|
|
1823
|
+
.dshm-hist-big{font-size:32px;font-weight:700;letter-spacing:-.6px;color:var(--dsw-alias-label-primary);font-variant-numeric:tabular-nums;line-height:1.05;display:inline-flex;align-items:baseline;}
|
|
1824
|
+
.dshm-hist-big-unit{font-size:13.5px;font-weight:500;letter-spacing:0;color:var(--dsw-alias-label-secondary);margin:0 6px 0 3px;}
|
|
1825
|
+
.dshm-hist-big-unit:last-child{margin-right:0;}
|
|
1826
|
+
.dshm-hist-foot{font-size:12.5px;color:var(--dsw-alias-label-secondary);margin:14px 0 0;line-height:1.5;}
|
|
1827
|
+
.dshm-hist-foot b{font-weight:600;color:var(--dsw-alias-label-primary);}
|
|
1828
|
+
.dshm-trend-wrap{display:flex;flex-direction:column;min-width:0;}
|
|
1829
|
+
.dshm-trend-head{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:10px;}
|
|
1830
|
+
.dshm-trend-title{font-size:12px;font-weight:500;color:var(--dsw-alias-label-tertiary);}
|
|
1831
|
+
.dshm-trend-sum{font-size:12px;color:var(--dsw-alias-label-secondary);font-variant-numeric:tabular-nums;}
|
|
1832
|
+
.dshm-trend-bars{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;height:78px;align-items:end;border-bottom:1px solid var(--dsw-alias-border-l2);}
|
|
1833
|
+
.dshm-bar-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;height:100%;min-width:0;}
|
|
1834
|
+
.dshm-bar-val{font-size:11px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;line-height:1;}
|
|
1835
|
+
.dshm-bar-col-today .dshm-bar-val{color:var(--dsw-alias-brand-primary);font-weight:600;}
|
|
1836
|
+
.dshm-bar{width:24px;max-width:100%;border-radius:5px 5px 0 0;background:var(--dsw-alias-label-tertiary);opacity:.42;min-height:3px;transition:opacity .15s;}
|
|
1837
|
+
.dshm-bar-col:hover .dshm-bar{opacity:.72;}
|
|
1838
|
+
.dshm-bar-today,.dshm-bar-col:hover .dshm-bar-today{background:var(--dsw-alias-brand-primary);opacity:1;}
|
|
1839
|
+
.dshm-bar-zero{background:var(--dsw-alias-border-l2);opacity:1;min-height:2px;height:2px!important;}
|
|
1840
|
+
.dshm-trend-axis{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:6px;}
|
|
1841
|
+
.dshm-bar-label{font-size:11px;color:var(--dsw-alias-label-tertiary);text-align:center;font-variant-numeric:tabular-nums;}
|
|
1842
|
+
.dshm-bar-label-today{color:var(--dsw-alias-brand-primary);font-weight:600;}
|
|
1843
|
+
.dshm-tops{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:16px;}
|
|
1844
|
+
.dshm-top-col{display:flex;flex-direction:column;gap:2px;min-width:0;padding:14px 12px 10px;border-radius:14px;background:var(--dsw-alias-bg-base);border:1px solid var(--dsw-alias-border-l1);}
|
|
1845
|
+
.dshm-top-title{height:28px;font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary);padding:0 6px;margin-bottom:6px;display:flex;align-items:center;gap:6px;}
|
|
1846
|
+
.dshm-top-title .dshm-col-play{margin-left:auto;}
|
|
1847
|
+
.dshm-top-row{display:flex;align-items:center;gap:10px;height:44px;padding:0 8px;border-radius:9px;font-size:13px;min-width:0;outline:none;}
|
|
1694
1848
|
.dshm-top-row-click{cursor:pointer;}
|
|
1695
1849
|
.dshm-top-row-click:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1696
1850
|
.dshm-top-row-click:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1697
|
-
.dshm-top-row-artist{appearance:none;border:0;background:transparent;font:inherit;color:inherit;text-align:left;width:100%;cursor:pointer;}
|
|
1851
|
+
.dshm-top-row-artist{appearance:none;border:0;background:transparent;font:inherit;color:inherit;text-align:left;width:100%;cursor:pointer;outline:none;}
|
|
1698
1852
|
.dshm-top-row-artist:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1853
|
+
.dshm-top-row-artist:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1699
1854
|
.dshm-top-row-off{opacity:.55;cursor:not-allowed;}
|
|
1700
1855
|
.dshm-top-row-off:hover{background:transparent;}
|
|
1701
1856
|
.dshm-top-row:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1702
|
-
.dshm-top-rank{width:18px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:
|
|
1703
|
-
.dshm-
|
|
1704
|
-
.dshm-
|
|
1705
|
-
.dshm-
|
|
1706
|
-
.dshm-
|
|
1707
|
-
.dshm-
|
|
1857
|
+
.dshm-top-rank{width:18px;color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;flex:none;text-align:right;}
|
|
1858
|
+
.dshm-top-rank-hi{color:var(--dsw-alias-label-secondary);font-weight:600;}
|
|
1859
|
+
.dshm-top-info{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1px;}
|
|
1860
|
+
.dshm-top-name{color:var(--dsw-alias-label-primary);font-weight:500;line-height:1.25;}
|
|
1861
|
+
.dshm-top-row-artist .dshm-top-name{flex:1;min-width:0;}
|
|
1862
|
+
.dshm-top-sub{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:1.25;}
|
|
1863
|
+
.dshm-top-meter{width:44px;height:4px;border-radius:99px;background:var(--dsw-alias-bg-layer-3);overflow:hidden;flex:none;}
|
|
1864
|
+
.dshm-top-meter>span{display:block;height:100%;border-radius:99px;background:var(--dsw-alias-label-tertiary);opacity:.55;}
|
|
1865
|
+
.dshm-top-row .dshm-count{margin-left:auto;min-width:44px;text-align:right;flex:none;font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary);}
|
|
1866
|
+
.dshm-top-meter+.dshm-count{margin-left:0;}
|
|
1867
|
+
.dshm-hgroup{margin-top:12px;}
|
|
1868
|
+
.dshm-hgroup-label{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:8px;padding:7px 10px;background:var(--dsw-alias-bg-base);border-bottom:1px solid var(--dsw-alias-border-l1);margin-bottom:4px;font-size:12px;font-weight:600;color:var(--dsw-alias-label-secondary);}
|
|
1869
|
+
.dshm-hbadge{font-size:12px;min-width:40px;text-align:right;flex:none;font-variant-numeric:tabular-nums;}
|
|
1870
|
+
.dshm-hbadge-good{color:var(--dsw-alias-label-secondary);}
|
|
1871
|
+
.dshm-hbadge-mid{color:var(--dsw-alias-state-warn-primary);font-weight:500;}
|
|
1708
1872
|
.dshm-hbadge-low{color:var(--dsw-alias-label-tertiary);}
|
|
1873
|
+
.dshm-hrow-info{flex:1;min-width:0;}
|
|
1874
|
+
@media (max-width:860px){
|
|
1875
|
+
.dshm-hist-hero{grid-template-columns:1fr;padding:16px 18px;}
|
|
1876
|
+
.dshm-top-meter{display:none;}
|
|
1877
|
+
}
|
|
1709
1878
|
@media (max-width:680px){
|
|
1710
1879
|
.dshm-tops{grid-template-columns:1fr;}
|
|
1711
|
-
.dshm-hrow
|
|
1712
|
-
.dshm-hskip,.dshm-htime{display:none;}
|
|
1880
|
+
.dshm-hrow .dshm-hskip,.dshm-hrow .dshm-htime{display:none;}
|
|
1713
1881
|
}
|
|
1714
1882
|
.dshm-state-spin{animation:dshm-spin 1.4s linear infinite;}
|
|
1715
1883
|
.dshm-toolbar-flat{margin:0;padding:8px 0;border-bottom:0;}
|
|
1716
1884
|
@media (max-width:560px){
|
|
1717
|
-
.dshm-hrow
|
|
1718
|
-
.dshm-hbar,.dshm-hskip,.dshm-htime{display:none;}
|
|
1885
|
+
.dshm-hrow .dshm-hbar,.dshm-hrow .dshm-hskip,.dshm-hrow .dshm-htime{display:none;}
|
|
1719
1886
|
.dshm-sync{margin:12px 12px 0;}
|
|
1720
1887
|
.dshm-reco-page{padding:16px 12px;}
|
|
1721
1888
|
}
|
|
1722
|
-
.dshm-lyrics{
|
|
1723
|
-
.dshm-lyrics-head{display:flex;align-items:center;gap:8px;font-size:
|
|
1724
|
-
.dshm-lyrics-
|
|
1725
|
-
.dshm-
|
|
1889
|
+
.dshm-lyrics{flex:1;min-height:0;display:flex;flex-direction:column;gap:6px;}
|
|
1890
|
+
.dshm-lyrics-head{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:600;color:var(--dsw-alias-label-secondary);padding:0 8px;}
|
|
1891
|
+
.dshm-lyrics-hint{color:var(--dsw-alias-label-tertiary);font-size:12px;margin-left:auto;font-weight:400;}
|
|
1892
|
+
.dshm-lyrics-scroll{position:relative;flex:1;min-height:120px;overflow-y:auto;padding:8px;display:flex;flex-direction:column;gap:2px;scrollbar-width:thin;scrollbar-color:var(--dsw-alias-scrollbar-bg-l2) transparent;mask-image:linear-gradient(180deg,transparent,#000 28px,#000 calc(100% - 28px),transparent);}
|
|
1893
|
+
.dshm-lyric-line{appearance:none;border:0;background:transparent;font:inherit;text-align:left;width:100%;padding:6px 10px;border-radius:8px;color:var(--dsw-alias-label-tertiary);font-size:14px;line-height:1.6;transition:color .2s,background .2s,transform .2s;cursor:pointer;opacity:.55;}
|
|
1894
|
+
.dshm-lyric-line:hover{background:var(--dsw-alias-interactive-bg-hover);opacity:.85;color:var(--dsw-alias-label-secondary);}
|
|
1895
|
+
.dshm-lyric-line:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1726
1896
|
.dshm-lyric-line-past{color:var(--dsw-alias-label-secondary);}
|
|
1727
|
-
.dshm-lyric-line-active{color:var(--dsw-alias-label-primary);font-weight:600;background:
|
|
1897
|
+
.dshm-lyric-line-active{color:var(--dsw-alias-label-primary);font-weight:600;font-size:17px;background:transparent;opacity:1;transform:translateX(2px);}
|
|
1728
1898
|
.dshm-plain-lyrics{white-space:pre-wrap;color:var(--dsw-alias-label-secondary);line-height:1.8;padding:6px 10px;font-size:13px;}
|
|
1729
|
-
.dshm-lyrics-
|
|
1899
|
+
.dshm-lyrics-tip{color:var(--dsw-alias-label-tertiary);font-size:12px;padding:6px 10px;}
|
|
1730
1900
|
.dshm-drawer-mask{position:absolute;inset:0;background:var(--dsw-alias-bg-mask-1);z-index:5;}
|
|
1731
1901
|
.dshm-drawer{position:absolute;top:0;right:0;bottom:0;width:min(430px,92%);background:var(--dsw-alias-bg-layer-1);border-left:1px solid var(--dsw-alias-border-l2);box-shadow:-12px 0 32px var(--dsw-alias-bg-mask-2);z-index:6;display:flex;flex-direction:column;animation:dshm-drawer-in .2s ease-out;}
|
|
1732
1902
|
@keyframes dshm-drawer-in{from{opacity:0;transform:translateX(16px);}to{opacity:1;transform:translateX(0);}}
|
|
@@ -1737,20 +1907,30 @@ window.__ModuleLoader__.load({
|
|
|
1737
1907
|
.dshm-asec-title{font-size:12px;font-weight:600;color:var(--dsw-alias-label-secondary);display:flex;align-items:center;gap:6px;}
|
|
1738
1908
|
.dshm-acard{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;padding:10px 12px;display:flex;flex-direction:column;gap:6px;}
|
|
1739
1909
|
.dshm-acard-text{font-size:12.5px;line-height:1.7;color:var(--dsw-alias-label-primary);word-break:break-word;}
|
|
1740
|
-
.dshm-acard-meta{font-size:
|
|
1910
|
+
.dshm-acard-meta{font-size:12px;color:var(--dsw-alias-label-tertiary);display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
|
|
1741
1911
|
.dshm-acard-meta a{color:var(--dsw-alias-link);text-decoration:none;}
|
|
1742
1912
|
.dshm-acard-meta a:hover{text-decoration:underline;}
|
|
1743
|
-
.dshm-kind-chip{font-size:
|
|
1913
|
+
.dshm-kind-chip{font-size:11px;padding:1px 8px;border-radius:99px;border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-secondary);}
|
|
1744
1914
|
.dshm-sim{display:flex;flex-direction:column;gap:6px;}
|
|
1745
|
-
.dshm-sim-chip{display:
|
|
1915
|
+
.dshm-sim-chip{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;border:1px solid var(--dsw-alias-border-l1);background:var(--dsw-alias-bg-layer-2);border-radius:10px;padding:8px 12px;color:var(--dsw-alias-label-primary);cursor:pointer;text-align:left;font:inherit;font-size:12.5px;}
|
|
1746
1916
|
.dshm-sim-chip:hover{background:var(--dsw-alias-interactive-bg-hover);}
|
|
1747
|
-
.dshm-sim-chip-
|
|
1748
|
-
.dshm-
|
|
1917
|
+
.dshm-sim-chip:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-2px;}
|
|
1918
|
+
.dshm-sim-chip-reason{font-size:12px;color:var(--dsw-alias-label-tertiary);}
|
|
1919
|
+
.dshm-artist-btn{appearance:none;background:none;border:0;color:inherit;font:inherit;padding:0;cursor:pointer;text-align:left;display:inline-flex;align-items:center;gap:5px;max-width:100%;vertical-align:middle;border-radius:4px;}
|
|
1749
1920
|
.dshm-artist-btn:hover{text-decoration:underline;text-underline-offset:3px;}
|
|
1921
|
+
.dshm-artist-btn:focus-visible{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:1px;}
|
|
1922
|
+
.dshm-modal-mask{position:fixed;inset:0;z-index:1300;background:var(--dsw-alias-bg-mask-2);display:flex;align-items:center;justify-content:center;animation:dshm-fade .15s ease-out;}
|
|
1923
|
+
.dshm-modal{width:min(420px,calc(100% - 32px));background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:14px;box-shadow:0 20px 50px var(--dsw-alias-bg-mask-2);padding:22px 22px 18px;display:flex;flex-direction:column;gap:12px;animation:dshm-pop .18s ease-out;}
|
|
1924
|
+
.dshm-modal-title{margin:0;font-size:15px;font-weight:650;color:var(--dsw-alias-label-primary);}
|
|
1925
|
+
.dshm-modal-body{margin:0;font-size:13px;line-height:1.65;color:var(--dsw-alias-label-secondary);}
|
|
1926
|
+
.dshm-modal-body b{color:var(--dsw-alias-label-primary);font-weight:600;}
|
|
1927
|
+
.dshm-modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:4px;}
|
|
1928
|
+
.dshm-wbtn-danger{background:var(--dsw-alias-state-error-primary);border-color:transparent;color:var(--dsw-alias-label-primary-inverted);}
|
|
1929
|
+
.dshm-wbtn-danger:hover{background:var(--dsw-alias-state-error-primary);filter:brightness(1.08);color:var(--dsw-alias-label-primary-inverted);}
|
|
1750
1930
|
@media (prefers-reduced-motion:reduce){
|
|
1751
|
-
.dshm-eq-on i,.dshm-tab-dot,.dshm-skel-box,.dshm-spin,.dshm-state-spin,.dshm-mini,.dshm-mini-fab,.dshm-drawer,.dshm-welcome-fish,.dshm-settings,.dshm-logo{animation:none;}
|
|
1752
|
-
.dshm-mini{
|
|
1753
|
-
.dshm-
|
|
1931
|
+
.dshm-eq-on i,.dshm-tab-dot,.dshm-skel-box,.dshm-spin,.dshm-state-spin,.dshm-mini,.dshm-mini-fab,.dshm-drawer,.dshm-welcome-fish,.dshm-settings,.dshm-logo,.dshm-toast,.dshm-dl-float,.dshm-dl-pill,.dshm-modal,.dshm-modal-mask{animation:none;}
|
|
1932
|
+
.dshm-row,.dshm-iconbtn,.dshm-chipbtn,.dshm-playbtn,.dshm-slider-thumb,.dshm-mini-progress>div,.dshm-reco-card,.dshm-dl-bar>div,.dshm-dl-pill-bar>span,.dshm-like-btn,.dshm-playround,.dshm-artcard,.dshm-mode-btn,.dshm-prv,.dshm-prv-chev,.dshm-lyric-line,.dshm-row-actions,.dshm-srow-tail,.dshm-playcover::after,.dshm-playcover-ico{transition:none;}
|
|
1933
|
+
.dshm-lyric-line{transform:none;}
|
|
1754
1934
|
}
|
|
1755
1935
|
`;
|
|
1756
1936
|
|
|
@@ -2415,7 +2595,7 @@ window.__ModuleLoader__.load({
|
|
|
2415
2595
|
* ================================================================ */
|
|
2416
2596
|
function createLikedSyncService(api, onChange) {
|
|
2417
2597
|
const store = createStore({
|
|
2418
|
-
open: false, tab:
|
|
2598
|
+
open: false, tab: null, enabled: true, providers: {}, loaded: false, error: null, errorProvider: null,
|
|
2419
2599
|
qr: null, qrPhase: 'idle', qrMessage: '', qqMode: 'qr', qqCookie: '', connecting: false, syncing: null, result: null, notice: null, copied: false,
|
|
2420
2600
|
});
|
|
2421
2601
|
let pollTimer = null;
|
|
@@ -3098,15 +3278,65 @@ window.__ModuleLoader__.load({
|
|
|
3098
3278
|
/* ================================================================
|
|
3099
3279
|
* 8. Shared UI atoms
|
|
3100
3280
|
* ================================================================ */
|
|
3101
|
-
function IconButton({ label, onClick, active, disabled, className, children }) {
|
|
3281
|
+
function IconButton({ label, title, onClick, active, disabled, className, children, ...rest }) {
|
|
3102
3282
|
return h('button', {
|
|
3103
3283
|
type: 'button',
|
|
3104
3284
|
className: cx('dshm-iconbtn', active && 'dshm-iconbtn-active', className),
|
|
3105
|
-
'aria-label': label, title: label, onClick, disabled,
|
|
3285
|
+
'aria-label': label, title: title || label, onClick, disabled,
|
|
3106
3286
|
'aria-pressed': active === undefined ? undefined : !!active,
|
|
3287
|
+
...rest,
|
|
3107
3288
|
}, children);
|
|
3108
3289
|
}
|
|
3109
3290
|
|
|
3291
|
+
/* 行内确认弹窗:替代浏览器原生 window.confirm(它会把 DSH 的暗色主题
|
|
3292
|
+
* 撕开一道灰色系统对话框)。一次说清、一次决定 —— Spotify 曲目把两段
|
|
3293
|
+
* 警告合并成一句,不再连环追问。 */
|
|
3294
|
+
function ConfirmDialog({ t, title, body, confirmLabel, danger, onConfirm, onCancel }) {
|
|
3295
|
+
const cancelRef = useRef(null);
|
|
3296
|
+
useEffect(() => {
|
|
3297
|
+
if (cancelRef.current && cancelRef.current.focus) cancelRef.current.focus();
|
|
3298
|
+
const onKey = (e) => {
|
|
3299
|
+
if (e.key === 'Escape') { e.stopPropagation(); onCancel(); }
|
|
3300
|
+
if (e.key === 'Tab') { /* 焦点锁在弹窗内:只有两个按钮,手动轮转 */ e.preventDefault(); }
|
|
3301
|
+
};
|
|
3302
|
+
window.addEventListener('keydown', onKey, true);
|
|
3303
|
+
return () => window.removeEventListener('keydown', onKey, true);
|
|
3304
|
+
}, [onCancel]);
|
|
3305
|
+
return h('div', {
|
|
3306
|
+
className: 'dshm-modal-mask', role: 'presentation',
|
|
3307
|
+
onClick: (e) => { if (e.target === e.currentTarget) onCancel(); },
|
|
3308
|
+
}, h('div', { className: 'dshm-modal', role: 'alertdialog', 'aria-modal': true, 'aria-label': title },
|
|
3309
|
+
h('h3', { className: 'dshm-modal-title' }, title),
|
|
3310
|
+
h('p', { className: 'dshm-modal-body' }, body),
|
|
3311
|
+
h('div', { className: 'dshm-modal-actions' },
|
|
3312
|
+
h('button', { ref: cancelRef, type: 'button', className: 'dshm-wbtn', onClick: onCancel }, t('cancelBtn')),
|
|
3313
|
+
h('button', {
|
|
3314
|
+
type: 'button', className: cx('dshm-wbtn', danger ? 'dshm-wbtn-danger' : 'dshm-wbtn-primary'),
|
|
3315
|
+
onClick: onConfirm,
|
|
3316
|
+
}, confirmLabel))));
|
|
3317
|
+
}
|
|
3318
|
+
|
|
3319
|
+
/* `const ask = useConfirm(t)` → `ask({...})` 返回 Promise<boolean>;
|
|
3320
|
+
* 组件树里渲染 `{dialog}` 即可。 */
|
|
3321
|
+
function useConfirm(t) {
|
|
3322
|
+
const [req, setReq] = useState(null);
|
|
3323
|
+
const resolveRef = useRef(null);
|
|
3324
|
+
const ask = useCallback((opts) => new Promise((resolve) => {
|
|
3325
|
+
resolveRef.current = resolve;
|
|
3326
|
+
setReq(opts);
|
|
3327
|
+
}), []);
|
|
3328
|
+
const close = useCallback((val) => {
|
|
3329
|
+
setReq(null);
|
|
3330
|
+
if (resolveRef.current) { resolveRef.current(val); resolveRef.current = null; }
|
|
3331
|
+
}, []);
|
|
3332
|
+
const dialog = req ? h(ConfirmDialog, {
|
|
3333
|
+
t, ...req,
|
|
3334
|
+
onCancel: () => close(false),
|
|
3335
|
+
onConfirm: () => close(true),
|
|
3336
|
+
}) : null;
|
|
3337
|
+
return [ask, dialog];
|
|
3338
|
+
}
|
|
3339
|
+
|
|
3110
3340
|
function Cover({ track, size, className }) {
|
|
3111
3341
|
const [failed, setFailed] = useState(false);
|
|
3112
3342
|
const id = track && track.id;
|
|
@@ -3223,12 +3453,16 @@ window.__ModuleLoader__.load({
|
|
|
3223
3453
|
const tasteRef = useRef(null);
|
|
3224
3454
|
const libRef = useRef(null);
|
|
3225
3455
|
|
|
3226
|
-
/*
|
|
3456
|
+
/* 喜欢列表区块挂载期间保持登录态:首启自动展开网易云扫码;老用户仅静默加载状态,默认收起三家卡片、按需点击才取码。 */
|
|
3227
3457
|
useEffect(() => {
|
|
3228
3458
|
if (!likedSync) return undefined;
|
|
3229
|
-
if (
|
|
3459
|
+
if (firstRun) {
|
|
3460
|
+
if (!likedSync.source.getSnapshot().open) likedSync.open('netease');
|
|
3461
|
+
} else if (!likedSync.source.getSnapshot().loaded) {
|
|
3462
|
+
likedSync.load();
|
|
3463
|
+
}
|
|
3230
3464
|
return () => likedSync.close();
|
|
3231
|
-
}, [likedSync]);
|
|
3465
|
+
}, [likedSync, firstRun]);
|
|
3232
3466
|
/* 入口可指定区块(「我喜欢」页的导入按钮 → 直接滚到喜欢列表同步) */
|
|
3233
3467
|
useEffect(() => {
|
|
3234
3468
|
const el = section === 'liked' ? likedRef.current : section === 'taste' ? tasteRef.current : section === 'lib' ? libRef.current : null;
|
|
@@ -3385,14 +3619,17 @@ window.__ModuleLoader__.load({
|
|
|
3385
3619
|
}
|
|
3386
3620
|
|
|
3387
3621
|
const hero = firstRun
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
h('div', { className: 'dshm-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3622
|
+
/* 杂志式左对齐报头:小徽标 + 标题 + 一句不兜售的副文。没有光晕、没有漂浮、没有打勾卖点墙。 */
|
|
3623
|
+
? h('header', { className: 'dshm-welcome-hero dshm-set-hero' },
|
|
3624
|
+
h('div', { className: 'dshm-set-masthead' },
|
|
3625
|
+
h('div', { className: 'dshm-welcome-fish' }, h(PluginLogo, { size: 56 })),
|
|
3626
|
+
h('div', { className: 'dshm-set-masthead-text' },
|
|
3627
|
+
h('h1', { className: 'dshm-welcome-title' }, t('welcomeTitle')),
|
|
3628
|
+
h('p', { className: 'dshm-welcome-sub' }, t('welcomeSub')))),
|
|
3629
|
+
/* 三条要点改成一行安静的脚注(用 · 分隔),不再是一列打勾 */
|
|
3630
|
+
h('p', { className: 'dshm-welcome-points' },
|
|
3394
3631
|
[t('welcomePoint1'), t('welcomePoint2'), t('welcomePoint3')]
|
|
3395
|
-
.map((text, i) => h('
|
|
3632
|
+
.map((text, i) => h('span', { className: 'dshm-wpoint', key: i }, h('span', { className: 'dshm-wpoint-dot', 'aria-hidden': true }), text))),
|
|
3396
3633
|
h('p', { className: 'dshm-set-first-note' }, t('settingsFirstRunNote')))
|
|
3397
3634
|
: null;
|
|
3398
3635
|
|
|
@@ -3525,12 +3762,8 @@ window.__ModuleLoader__.load({
|
|
|
3525
3762
|
function TrackRow({ track, index, isCurrent, playing, onPlay, onDelete, onReveal, onOpenArtist, likes, useLikes, t, muted, pending, onAdd }) {
|
|
3526
3763
|
return h('div', {
|
|
3527
3764
|
className: cx('dshm-row', isCurrent && 'dshm-row-current', muted && 'dshm-row-off'),
|
|
3528
|
-
role: '
|
|
3529
|
-
'aria-label': t('playTrack') + ': ' + track.title,
|
|
3765
|
+
role: 'listitem',
|
|
3530
3766
|
onClick: () => onPlay(track, index),
|
|
3531
|
-
onKeyDown: (e) => {
|
|
3532
|
-
if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onPlay(track, index); }
|
|
3533
|
-
},
|
|
3534
3767
|
},
|
|
3535
3768
|
h(Cover, { track, size: 40 }),
|
|
3536
3769
|
h('div', { className: 'dshm-row-info' },
|
|
@@ -3553,8 +3786,10 @@ window.__ModuleLoader__.load({
|
|
|
3553
3786
|
}))
|
|
3554
3787
|
: null)),
|
|
3555
3788
|
h('span', { className: 'dshm-row-dur' }, formatTime(track.duration)),
|
|
3789
|
+
h('span', { className: 'dshm-row-tail' },
|
|
3556
3790
|
likes ? h(LikeButton, { t, item: track, likes, useLikes }) : null,
|
|
3557
|
-
|
|
3791
|
+
/* 「不喜欢」只属于推荐 / 正在播放 —— 曲库里想移除一首歌,取消 ♥ 或删除文件即可。 */
|
|
3792
|
+
(likes && !onDelete) ? h(DislikeButton, { t, item: track, likes, useLikes }) : null,
|
|
3558
3793
|
/* 十三期:后台扫描结果决定样式——found → 实心「可入库」药丸;none → 虚线淡色(点了会再找一次);未扫描 → 普通图标 */
|
|
3559
3794
|
onAdd && track.inLibrary === false
|
|
3560
3795
|
? (() => {
|
|
@@ -3568,10 +3803,16 @@ window.__ModuleLoader__.load({
|
|
|
3568
3803
|
})()
|
|
3569
3804
|
: null,
|
|
3570
3805
|
onDelete ? h('span', { className: 'dshm-row-actions', onClick: (e) => e.stopPropagation() },
|
|
3571
|
-
h(IconButton, { label: t('revealTrack'), onClick: (e) => { e.stopPropagation(); onReveal(track); } }, h(
|
|
3572
|
-
h(IconButton, { label: t('deleteTrack'), onClick: (e) => { e.stopPropagation(); onDelete(track); } }, h(
|
|
3573
|
-
h('
|
|
3574
|
-
|
|
3806
|
+
h(IconButton, { label: t('revealTrack'), onClick: (e) => { e.stopPropagation(); onReveal(track); } }, h(IconFolder, { size: 15 })),
|
|
3807
|
+
h(IconButton, { label: t('deleteTrack'), className: 'dshm-iconbtn-danger', onClick: (e) => { e.stopPropagation(); onDelete(track); } }, h(IconTrash, { size: 15 }))) : null,
|
|
3808
|
+
h('button', {
|
|
3809
|
+
type: 'button', className: cx('dshm-row-play', pending && 'dshm-playround-busy'),
|
|
3810
|
+
'aria-label': t('playTrack') + ': ' + (track.title || t('untitled')),
|
|
3811
|
+
title: t('playTrack'),
|
|
3812
|
+
onClick: (e) => { e.stopPropagation(); onPlay(track, index); },
|
|
3813
|
+
},
|
|
3814
|
+
pending ? h('span', { className: 'dshm-spin' }) : h(IconPlay, { size: 15 }))),
|
|
3815
|
+
);
|
|
3575
3816
|
}
|
|
3576
3817
|
|
|
3577
3818
|
/* ================================================================
|
|
@@ -3596,6 +3837,13 @@ window.__ModuleLoader__.load({
|
|
|
3596
3837
|
const [rowError, setRowError] = useState('');
|
|
3597
3838
|
const [playNotice, setPlayNotice] = useState('');
|
|
3598
3839
|
const searchRef = useRef(null);
|
|
3840
|
+
useEffect(() => {
|
|
3841
|
+
if (typeof window === 'undefined') return undefined;
|
|
3842
|
+
const onClear = () => setQuery('');
|
|
3843
|
+
window.addEventListener('dshm:clear-search', onClear);
|
|
3844
|
+
return () => window.removeEventListener('dshm:clear-search', onClear);
|
|
3845
|
+
}, []);
|
|
3846
|
+
const [askConfirm, confirmDialog] = useConfirm(t);
|
|
3599
3847
|
const shuffle = usePlayer((s) => s.shuffle);
|
|
3600
3848
|
const repeat = usePlayer((s) => s.repeat);
|
|
3601
3849
|
const mode = modeMeta(t, shuffle, repeat);
|
|
@@ -3696,10 +3944,13 @@ window.__ModuleLoader__.load({
|
|
|
3696
3944
|
|
|
3697
3945
|
async function onDelete(track) {
|
|
3698
3946
|
const liked = track.source === 'spotify-liked';
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3947
|
+
const ok = await askConfirm({
|
|
3948
|
+
title: t('confirmDeleteTitle'),
|
|
3949
|
+
body: liked ? t('deleteLikedConfirm') : fmt(t('deleteConfirm'), { title: track.title || t('untitled') }),
|
|
3950
|
+
confirmLabel: t('confirmDeleteBtn'),
|
|
3951
|
+
danger: true,
|
|
3952
|
+
});
|
|
3953
|
+
if (!ok) return;
|
|
3703
3954
|
try {
|
|
3704
3955
|
setRowError('');
|
|
3705
3956
|
await library.remove(track.id, true);
|
|
@@ -3822,17 +4073,16 @@ window.__ModuleLoader__.load({
|
|
|
3822
4073
|
function RemoteRow(item, i) {
|
|
3823
4074
|
const isArtist = item.kind === 'artist';
|
|
3824
4075
|
const name = isArtist ? (item.name || item.artist || '') : (item.title || '');
|
|
4076
|
+
/* 歌手结果:整行就是入口(右侧只留一枚安静的 ›),不再每行一颗「查看歌手」按钮,也不再重复「歌手 · 歌手」 */
|
|
3825
4077
|
const sub = isArtist
|
|
3826
|
-
? t('searchTypeArtist')
|
|
4078
|
+
? (item.profile || t('searchTypeArtist'))
|
|
3827
4079
|
: (item.artist || '') + (item.album ? ' · ' + item.album : '');
|
|
3828
|
-
|
|
4080
|
+
const body = h(React.Fragment, null,
|
|
3829
4081
|
isArtist
|
|
3830
4082
|
? h(ArtistAvatar, { name, size: 40, service: artistImages, useArtistImages })
|
|
3831
4083
|
: h('div', { className: 'dshm-tile', style: { width: 40, height: 40 } }, h(IconNote, { size: 15 })),
|
|
3832
4084
|
h('div', { className: 'dshm-row-info' },
|
|
3833
|
-
h('div', { className: 'dshm-row-title' },
|
|
3834
|
-
isArtist ? h('span', { className: 'dshm-cat-chip' }, t('searchTypeArtist')) : null,
|
|
3835
|
-
h('span', { className: 'dshm-ellipsis' }, name)),
|
|
4085
|
+
h('div', { className: 'dshm-row-title dshm-ellipsis' }, name),
|
|
3836
4086
|
h('div', { className: 'dshm-row-sub dshm-ellipsis' },
|
|
3837
4087
|
isArtist || !item.artist
|
|
3838
4088
|
? sub
|
|
@@ -3840,19 +4090,24 @@ window.__ModuleLoader__.load({
|
|
|
3840
4090
|
h('button', {
|
|
3841
4091
|
type: 'button', className: 'dshm-row-sub-btn',
|
|
3842
4092
|
title: t('artistOpen'), 'aria-label': t('artistOpen'),
|
|
3843
|
-
onClick: () => openArtistPage(item.artist),
|
|
4093
|
+
onClick: (e) => { e.stopPropagation(); openArtistPage(item.artist); },
|
|
3844
4094
|
}, item.artist),
|
|
3845
4095
|
item.album ? ' · ' + item.album : ''))),
|
|
3846
4096
|
isArtist
|
|
3847
|
-
? h('
|
|
3848
|
-
type: 'button', className: 'dshm-chipbtn',
|
|
3849
|
-
onClick: () => openArtistPage(name),
|
|
3850
|
-
}, h(IconNote, { size: 13 }), t('artistOpen'))
|
|
4097
|
+
? h('span', { className: 'dshm-row-tail dshm-row-chev', 'aria-hidden': true }, h(IconChevronUp, { size: 14, style: { transform: 'rotate(90deg)' } }))
|
|
3851
4098
|
: h('button', {
|
|
3852
|
-
type: 'button', className: 'dshm-chipbtn',
|
|
4099
|
+
type: 'button', className: 'dshm-chipbtn dshm-chipbtn-ghost',
|
|
3853
4100
|
onClick: () => playRemote(item),
|
|
3854
|
-
title: t('previewLabel'),
|
|
3855
|
-
}, h(IconPlay, { size: 13 })
|
|
4101
|
+
title: t('previewLabel'), 'aria-label': t('previewLabel'),
|
|
4102
|
+
}, h(IconPlay, { size: 13 })));
|
|
4103
|
+
return isArtist
|
|
4104
|
+
? h('div', {
|
|
4105
|
+
className: 'dshm-row dshm-row-click', key: 'r' + i, role: 'button', tabIndex: 0,
|
|
4106
|
+
title: t('artistOpen'),
|
|
4107
|
+
onClick: () => openArtistPage(name),
|
|
4108
|
+
onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); openArtistPage(name); } },
|
|
4109
|
+
}, body)
|
|
4110
|
+
: h('div', { className: 'dshm-row', key: 'r' + i, role: 'listitem' }, body);
|
|
3856
4111
|
}
|
|
3857
4112
|
|
|
3858
4113
|
let content;
|
|
@@ -3983,7 +4238,7 @@ window.__ModuleLoader__.load({
|
|
|
3983
4238
|
}, h(IconGear, { size: 13 }), t('setLikedTitle')) : null)
|
|
3984
4239
|
: h('div', { className: 'dshm-favs' },
|
|
3985
4240
|
h('div', { className: 'dshm-favs-head' },
|
|
3986
|
-
h(IconHeart, { size: 14, style: { color: 'var(--
|
|
4241
|
+
h(IconHeart, { size: 14, style: { color: 'var(--dshm-love)' } }),
|
|
3987
4242
|
h('span', { className: 'dshm-favs-title' }, t('favsTitle')),
|
|
3988
4243
|
likeItems.length ? h('span', { className: 'dshm-count' }, likeItems.length + ' ' + t('tracksUnit')) : null,
|
|
3989
4244
|
likeItems.length
|
|
@@ -4002,17 +4257,20 @@ window.__ModuleLoader__.load({
|
|
|
4002
4257
|
onClick: () => playLiked(tr),
|
|
4003
4258
|
},
|
|
4004
4259
|
h('span', { className: 'dshm-favcard-cover' },
|
|
4005
|
-
h(Thumb, { src: tr.coverUrl, size:
|
|
4260
|
+
h(Thumb, { src: tr.coverUrl, size: 104 }),
|
|
4006
4261
|
h('span', { className: 'dshm-favcard-heart' }, h(IconHeart, { size: 11, style: { fill: 'currentColor' } }))),
|
|
4007
4262
|
h('span', { className: 'dshm-favcard-title dshm-ellipsis' }, tr.title || t('untitled')),
|
|
4008
4263
|
h('span', { className: 'dshm-favcard-sub dshm-ellipsis' }, tr.artist || t('unknownArtist')))),
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4264
|
+
/* 末尾「查看全部」卡只在真的有折叠(>12)时出现;否则顶部「查看全部 ›」已足够 */
|
|
4265
|
+
likeItems.length > 12
|
|
4266
|
+
? h('button', {
|
|
4267
|
+
type: 'button', className: 'dshm-favcard dshm-favcard-more',
|
|
4268
|
+
onClick: () => setLibTab('likes'),
|
|
4269
|
+
},
|
|
4270
|
+
h(IconQueue, { size: 18 }),
|
|
4271
|
+
h('span', { className: 'dshm-favcard-more-label' }, t('favsViewAll')),
|
|
4272
|
+
h('span', { className: 'dshm-count' }, likeItems.length))
|
|
4273
|
+
: null)),
|
|
4016
4274
|
h('div', { className: 'dshm-toolbar' },
|
|
4017
4275
|
h('label', { className: 'dshm-search' },
|
|
4018
4276
|
h(IconSearch, { size: 15 }),
|
|
@@ -4020,15 +4278,18 @@ window.__ModuleLoader__.load({
|
|
|
4020
4278
|
type: 'search', value: query, placeholder: t('searchPlaceholder'), ref: searchRef,
|
|
4021
4279
|
'aria-label': t('searchPlaceholder'),
|
|
4022
4280
|
onChange: (e) => setQuery(e.target.value),
|
|
4281
|
+
onKeyDown: (e) => { if (e.key === 'Escape' && query) { e.preventDefault(); setQuery(''); } },
|
|
4023
4282
|
})),
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
|
|
4027
|
-
|
|
4028
|
-
|
|
4283
|
+
/* 「我喜欢」页没有分组概念:整个下拉都不渲染,而不是渲染一个空壳 */
|
|
4284
|
+
libTab === 'library'
|
|
4285
|
+
? h('select', {
|
|
4286
|
+
className: 'dshm-select', value: groupBy, 'aria-label': t('groupLabel'),
|
|
4287
|
+
onChange: (e) => setGroupBy(e.target.value),
|
|
4288
|
+
},
|
|
4029
4289
|
h('option', { value: 'none' }, t('groupNone')),
|
|
4030
4290
|
h('option', { value: 'artist' }, t('groupArtist')),
|
|
4031
|
-
h('option', { value: 'album' }, t('groupAlbum')))
|
|
4291
|
+
h('option', { value: 'album' }, t('groupAlbum')))
|
|
4292
|
+
: null,
|
|
4032
4293
|
h('button', {
|
|
4033
4294
|
type: 'button', className: 'dshm-chipbtn dshm-chipbtn-primary',
|
|
4034
4295
|
disabled: busy || (libTab === 'likes' ? likedPlayable.length === 0 : shownList.length === 0),
|
|
@@ -4046,13 +4307,18 @@ window.__ModuleLoader__.load({
|
|
|
4046
4307
|
onClick: () => openSettings('liked'),
|
|
4047
4308
|
}, h(IconRefresh, { size: 13, className: 'dshm-spin' }), t('syncing'))
|
|
4048
4309
|
: null,
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4310
|
+
(query || (busy && tracks.length === 0) || libTab === 'likes')
|
|
4311
|
+
? h('span', { className: 'dshm-count', style: { marginLeft: 'auto' } },
|
|
4312
|
+
busy && tracks.length === 0 ? t('rescanning')
|
|
4313
|
+
: query
|
|
4314
|
+
? fmt(t('searchMatchedCount'), { shown: (libTab === 'likes' ? likedFiltered.length : shownList.length), total: (libTab === 'likes' ? likeItems.length : tracks.length) })
|
|
4315
|
+
: likedFiltered.length + ' ' + t('tracksUnit'))
|
|
4316
|
+
: null),
|
|
4052
4317
|
playNotice
|
|
4053
4318
|
? h('div', { className: 'dshm-mode-hint', style: { margin: '0 20px 6px', textAlign: 'right' }, role: 'status' }, playNotice)
|
|
4054
4319
|
: null,
|
|
4055
|
-
content
|
|
4320
|
+
content,
|
|
4321
|
+
confirmDialog);
|
|
4056
4322
|
}
|
|
4057
4323
|
|
|
4058
4324
|
/* ================================================================
|
|
@@ -4071,6 +4337,11 @@ window.__ModuleLoader__.load({
|
|
|
4071
4337
|
const error = usePlayer((s) => s.error);
|
|
4072
4338
|
const queue = usePlayer((s) => s.queue);
|
|
4073
4339
|
const queueIndex = usePlayer((s) => s.queueIndex);
|
|
4340
|
+
const trackId = track ? track.id : null;
|
|
4341
|
+
const lyrSnap = useLyrics((s) => (trackId && s.trackId === trackId ? s : null));
|
|
4342
|
+
const [rightTab, setRightTab] = useState(null);
|
|
4343
|
+
useEffect(() => { setRightTab(null); }, [trackId]);
|
|
4344
|
+
useEffect(() => { if (trackId) lyrics.load(trackId); }, [trackId, lyrics]);
|
|
4074
4345
|
|
|
4075
4346
|
if (!track) {
|
|
4076
4347
|
return h(EmptyState, {
|
|
@@ -4082,64 +4353,88 @@ window.__ModuleLoader__.load({
|
|
|
4082
4353
|
const frac = duration > 0 ? position / duration : 0;
|
|
4083
4354
|
const RepeatIcon = repeat === 'one' ? IconRepeatOne : IconRepeat;
|
|
4084
4355
|
const repeatLabel = repeat === 'one' ? t('repeatOne') : repeat === 'all' ? t('repeatAll') : t('repeatOff');
|
|
4356
|
+
const lyricsEmpty = !!(lyrSnap && lyrSnap.status === 'ready' && lyrSnap.data && (lyrSnap.data.source === 'none' || (!lyrSnap.data.synced && !lyrSnap.data.plain)));
|
|
4357
|
+
const activeRightTab = rightTab || (lyricsEmpty ? 'queue' : 'lyrics');
|
|
4085
4358
|
|
|
4359
|
+
const sourceName = sourceLabel(track.source, t);
|
|
4086
4360
|
return h('div', { className: 'dshm-now' },
|
|
4087
|
-
h('div', {
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4361
|
+
track.coverUrl ? h('div', {
|
|
4362
|
+
className: 'dshm-now-glow', 'aria-hidden': true,
|
|
4363
|
+
style: { backgroundImage: 'url("' + imgUrl(track.coverUrl) + '")' },
|
|
4364
|
+
}) : null,
|
|
4365
|
+
h('div', { className: 'dshm-now-stage' },
|
|
4366
|
+
/* 左栏:封面 + 标题 + 控台。粘滞垂直居中,宽屏下像一台独立的唱机。 */
|
|
4367
|
+
h('div', { className: 'dshm-now-side' },
|
|
4368
|
+
h('div', { className: 'dshm-now-hero' },
|
|
4369
|
+
h(Cover, { track, className: 'dshm-now-cover' }),
|
|
4370
|
+
h('div', { className: 'dshm-now-meta' },
|
|
4371
|
+
sourceName
|
|
4372
|
+
? h('span', { className: 'dshm-source-chip' }, h(IconDisc, { size: 12 }), sourceName)
|
|
4373
|
+
: null,
|
|
4374
|
+
h('h2', { className: 'dshm-now-title' }, track.title || t('untitled')),
|
|
4375
|
+
h('p', { className: 'dshm-now-sub dshm-ellipsis' },
|
|
4376
|
+
h('button', {
|
|
4377
|
+
type: 'button', className: 'dshm-artist-btn',
|
|
4378
|
+
title: t('artistOpen'), 'aria-label': t('artistOpen'),
|
|
4379
|
+
onClick: () => openArtistPage(track.artist || ''),
|
|
4380
|
+
},
|
|
4381
|
+
h(ArtistAvatar, { name: track.artist || '', size: 18, service: artistImages, useArtistImages }),
|
|
4382
|
+
h('span', null, track.artist || t('unknownArtist'))),
|
|
4383
|
+
track.album ? ' · ' + track.album : ''),
|
|
4384
|
+
error ? h('div', { className: 'dshm-errorline', role: 'alert' }, h(IconAlert, { size: 15 }), error) : null,
|
|
4385
|
+
h('div', { className: 'dshm-seekrow' },
|
|
4386
|
+
h('span', { className: 'dshm-time' }, formatTime(position)),
|
|
4387
|
+
h(Slider, {
|
|
4388
|
+
value: frac, label: t('seekLabel'), disabled: !(duration > 0),
|
|
4389
|
+
onChange: (f) => player.seek(f * duration),
|
|
4390
|
+
}),
|
|
4391
|
+
h('span', { className: 'dshm-time dshm-time-end' }, formatTime(duration))),
|
|
4392
|
+
/* ♥ / 👎 收进控制条右端:与播放键同属「对这首歌的态度」,不再单独悬一枚白药丸 */
|
|
4393
|
+
h('div', { className: 'dshm-transport' },
|
|
4394
|
+
h(IconButton, {
|
|
4395
|
+
label: mode.label, title: mode.hint + ' · ' + t('modeCycleHint'),
|
|
4396
|
+
className: cx((shuffle || repeat === 'one') && 'dshm-iconbtn-active'),
|
|
4397
|
+
onClick: () => player.cycleMode(),
|
|
4398
|
+
}, h(mode.icon, { size: 17 })),
|
|
4399
|
+
h(IconButton, { label: t('prev'), onClick: () => player.prev() }, h(IconPrev, { size: 20 })),
|
|
4400
|
+
h('button', {
|
|
4401
|
+
type: 'button', className: 'dshm-playbtn',
|
|
4402
|
+
'aria-label': playing ? t('pause') : t('play'),
|
|
4403
|
+
onClick: () => player.toggle(),
|
|
4404
|
+
}, h(playing ? IconPause : IconPlay, { size: 22 })),
|
|
4405
|
+
h(IconButton, { label: t('next'), onClick: () => player.next() }, h(IconNext, { size: 20 })),
|
|
4406
|
+
likes ? h('div', { className: 'dshm-now-actions', role: 'group', 'aria-label': t('nowLikesLabel') },
|
|
4407
|
+
h(LikeButton, { t, item: track, likes, useLikes, size: 17, className: 'dshm-now-like' }),
|
|
4408
|
+
h(DislikeButton, { t, item: track, likes, useLikes, size: 17, className: 'dshm-now-like' })) : null),
|
|
4409
|
+
h('div', { className: 'dshm-volumerow' },
|
|
4410
|
+
h(IconButton, { label: muted ? t('unmute') : t('mute'), onClick: () => player.toggleMute() },
|
|
4411
|
+
h(muted || volume === 0 ? IconMute : IconVolume, { size: 17 })),
|
|
4412
|
+
h(Slider, { value: muted ? 0 : volume, label: t('volume'), onChange: (f) => player.setVolume(f) }),
|
|
4413
|
+
h('span', { className: 'dshm-volume-pct' }, Math.round((muted ? 0 : volume) * 100) + '%'))))),
|
|
4414
|
+
/* 右栏:轻量切换「歌词 / 接下来播放」,让歌词独占全高呼吸;无歌词时自动切到队列 */
|
|
4415
|
+
h('div', { className: 'dshm-now-main' },
|
|
4416
|
+
h('div', { className: 'dshm-now-tabs', role: 'tablist', 'aria-label': t('tabNow') },
|
|
4093
4417
|
h('button', {
|
|
4094
|
-
type: 'button', className: 'dshm-
|
|
4095
|
-
|
|
4096
|
-
onClick: () =>
|
|
4097
|
-
},
|
|
4098
|
-
h(ArtistAvatar, { name: track.artist || '', size: 18, service: artistImages, useArtistImages }),
|
|
4099
|
-
h('span', null, track.artist || t('unknownArtist'))),
|
|
4100
|
-
track.album ? ' · ' + track.album : ''),
|
|
4101
|
-
/* ♥ / 👎:和迷你条、曲库行同一套语义;放大一号,放在歌手行下面 */
|
|
4102
|
-
likes ? h('div', { className: 'dshm-now-actions', role: 'group', 'aria-label': t('nowLikesLabel') },
|
|
4103
|
-
h(LikeButton, { t, item: track, likes, useLikes, size: 18, className: 'dshm-now-like' }),
|
|
4104
|
-
h(DislikeButton, { t, item: track, likes, useLikes, size: 18, className: 'dshm-now-like' })) : null,
|
|
4105
|
-
error ? h('div', { className: 'dshm-errorline', role: 'alert' }, h(IconAlert, { size: 15 }), error) : null,
|
|
4106
|
-
h('div', { className: 'dshm-seekrow' },
|
|
4107
|
-
h('span', { className: 'dshm-time' }, formatTime(position)),
|
|
4108
|
-
h(Slider, {
|
|
4109
|
-
value: frac, label: t('seekLabel'), disabled: !(duration > 0),
|
|
4110
|
-
onChange: (f) => player.seek(f * duration),
|
|
4111
|
-
}),
|
|
4112
|
-
h('span', { className: 'dshm-time dshm-time-end' }, formatTime(duration))),
|
|
4113
|
-
h('div', { className: 'dshm-transport' },
|
|
4114
|
-
h(IconButton, {
|
|
4115
|
-
label: mode.label, title: mode.hint + ' · ' + t('modeCycleHint'),
|
|
4116
|
-
className: cx((shuffle || repeat === 'one') && 'dshm-iconbtn-active'),
|
|
4117
|
-
onClick: () => player.cycleMode(),
|
|
4118
|
-
}, h(mode.icon, { size: 17 })),
|
|
4119
|
-
h(IconButton, { label: t('prev'), onClick: () => player.prev() }, h(IconPrev, { size: 20 })),
|
|
4418
|
+
type: 'button', role: 'tab', className: 'dshm-now-tab',
|
|
4419
|
+
'aria-selected': activeRightTab === 'lyrics',
|
|
4420
|
+
onClick: () => setRightTab('lyrics'),
|
|
4421
|
+
}, h(IconNote, { size: 13 }), t('lyricsTitle')),
|
|
4120
4422
|
h('button', {
|
|
4121
|
-
type: 'button', className: 'dshm-
|
|
4122
|
-
'aria-
|
|
4123
|
-
onClick: () =>
|
|
4124
|
-
}, h(
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
h(
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
queue.length === 0
|
|
4137
|
-
? h('div', { className: 'dshm-state-body', style: { padding: '12px 8px' } }, t('queueEmpty'))
|
|
4138
|
-
: queue.map((tr, i) => h(TrackRow, {
|
|
4139
|
-
key: (tr.id || '') + ':' + i, track: tr, index: i,
|
|
4140
|
-
isCurrent: i === queueIndex, playing: playing && i === queueIndex,
|
|
4141
|
-
onPlay: (_tr, idx) => player.jumpTo(idx), onOpenArtist: openArtistPage, t,
|
|
4142
|
-
}))));
|
|
4423
|
+
type: 'button', role: 'tab', className: 'dshm-now-tab',
|
|
4424
|
+
'aria-selected': activeRightTab === 'queue',
|
|
4425
|
+
onClick: () => setRightTab('queue'),
|
|
4426
|
+
}, h(IconQueue, { size: 13 }), t('tabNowQueue'), h('span', { className: 'dshm-count' }, String(queue.length)))),
|
|
4427
|
+
activeRightTab === 'lyrics'
|
|
4428
|
+
? h(LyricsPanel, { t, lyrics, player, useLyrics, usePlayer })
|
|
4429
|
+
: h('div', { className: 'dshm-queue' },
|
|
4430
|
+
queue.length === 0
|
|
4431
|
+
? h('div', { className: 'dshm-state-body', style: { padding: '12px 8px' } }, t('queueEmpty'))
|
|
4432
|
+
: h('div', { className: 'dshm-queue-list' },
|
|
4433
|
+
queue.map((tr, i) => h(TrackRow, {
|
|
4434
|
+
key: (tr.id || '') + ':' + i, track: tr, index: i,
|
|
4435
|
+
isCurrent: i === queueIndex, playing: playing && i === queueIndex,
|
|
4436
|
+
onPlay: (_tr, idx) => player.jumpTo(idx), onOpenArtist: openArtistPage, t,
|
|
4437
|
+
})))))));
|
|
4143
4438
|
}
|
|
4144
4439
|
|
|
4145
4440
|
/* ================================================================
|
|
@@ -4217,13 +4512,26 @@ window.__ModuleLoader__.load({
|
|
|
4217
4512
|
const liked = useLikes((st) => !!st.keys[likeKey(item)]);
|
|
4218
4513
|
/* 十期②:该行的缓存转圈态由 warm store 驱动(整栏播放时整栏一起转)。 */
|
|
4219
4514
|
const pending = warm && useWarm ? !!useWarm((st) => !!(st.pending && st.pending[likeKey(item)])) : false;
|
|
4515
|
+
const playLabel = pending ? t('previewLoading') : (isCurrent && playing ? t('pause') : t('previewLabel'));
|
|
4516
|
+
/* 播放键隐入封面:整行不再以实心黑圆结尾,封面 hover / 当前播放时才浮出播放标。 */
|
|
4220
4517
|
return h('div', { className: cx('dshm-srow', isCurrent && 'dshm-row-current') },
|
|
4221
|
-
h(
|
|
4518
|
+
h('button', {
|
|
4519
|
+
type: 'button', className: cx('dshm-playcover', pending && 'dshm-playround-busy'),
|
|
4520
|
+
'data-on': isCurrent && playing ? 'true' : undefined,
|
|
4521
|
+
'aria-label': pending ? t('previewLoading') : (isCurrent && playing ? t('pause') : t('play')),
|
|
4522
|
+
'aria-busy': pending ? 'true' : undefined,
|
|
4523
|
+
disabled: !!pending,
|
|
4524
|
+
title: playLabel,
|
|
4525
|
+
onClick: () => onPlay(item),
|
|
4526
|
+
},
|
|
4527
|
+
h(Thumb, { src: item.coverUrl, size: 40 }),
|
|
4528
|
+
pending
|
|
4529
|
+
? h('span', { className: 'dshm-spin', 'aria-hidden': true })
|
|
4530
|
+
: h('span', { className: 'dshm-playcover-ico', 'aria-hidden': true }, h(isCurrent && playing ? IconPause : IconPlay, { size: 16 }))),
|
|
4222
4531
|
h('div', {
|
|
4223
|
-
className: 'dshm-srow-main', role: '
|
|
4224
|
-
'aria-label': t('
|
|
4532
|
+
className: 'dshm-srow-main', role: 'group',
|
|
4533
|
+
'aria-label': (item.title || t('untitled')) + (item.artist ? ' · ' + item.artist : ''),
|
|
4225
4534
|
onClick: () => onPlay(item),
|
|
4226
|
-
onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); onPlay(item); } },
|
|
4227
4535
|
},
|
|
4228
4536
|
h('span', { className: 'dshm-srow-title dshm-ellipsis' }, item.title || t('untitled')),
|
|
4229
4537
|
h('span', { className: 'dshm-srow-sub dshm-ellipsis' },
|
|
@@ -4236,25 +4544,16 @@ window.__ModuleLoader__.load({
|
|
|
4236
4544
|
: (item.artist || t('unknownArtist')),
|
|
4237
4545
|
item.album ? ' · ' + item.album : ''),
|
|
4238
4546
|
showReason && item.reason ? h('span', { className: 'dshm-srow-reason' }, item.reason) : null),
|
|
4239
|
-
h('
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4245
|
-
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4249
|
-
type: 'button', className: cx('dshm-playround', pending && 'dshm-playround-busy'),
|
|
4250
|
-
'aria-label': pending ? t('previewLoading') : (isCurrent && playing ? t('pause') : t('play')),
|
|
4251
|
-
'aria-busy': pending ? 'true' : undefined,
|
|
4252
|
-
disabled: !!pending,
|
|
4253
|
-
title: pending ? t('previewLoading') : (isCurrent && playing ? t('pause') : t('previewLabel')),
|
|
4254
|
-
onClick: () => onPlay(item),
|
|
4255
|
-
}, pending
|
|
4256
|
-
? h('span', { className: 'dshm-spin', 'aria-hidden': true })
|
|
4257
|
-
: h(isCurrent && playing ? IconPause : IconPlay, { size: 13 })));
|
|
4547
|
+
h('span', { className: 'dshm-srow-tail' },
|
|
4548
|
+
h('button', {
|
|
4549
|
+
type: 'button',
|
|
4550
|
+
className: cx('dshm-like-btn', liked && 'dshm-like-btn-on'),
|
|
4551
|
+
'aria-label': liked ? t('unlikeBtn') : t('likeBtn'),
|
|
4552
|
+
'aria-pressed': !!liked,
|
|
4553
|
+
title: liked ? t('likedBtn') : t('likeBtn'),
|
|
4554
|
+
onClick: () => likes.toggle(item, !liked),
|
|
4555
|
+
}, h(IconHeart, { size: 15, style: liked ? { fill: 'currentColor' } : undefined })),
|
|
4556
|
+
likes ? h(DislikeButton, { t, item, likes, useLikes }) : null));
|
|
4258
4557
|
}
|
|
4259
4558
|
|
|
4260
4559
|
/* Artist column row: real artist/band image + name + genre hint + chevron. */
|
|
@@ -4465,9 +4764,9 @@ window.__ModuleLoader__.load({
|
|
|
4465
4764
|
column('colToday', IconSparkles, sections.today || [],
|
|
4466
4765
|
h('button', {
|
|
4467
4766
|
type: 'button', className: 'dshm-chipbtn dshm-col-play',
|
|
4468
|
-
disabled: !(sections.today || []).length,
|
|
4767
|
+
disabled: !(sections.today || []).length, title: t('playColumn'), 'aria-label': t('playColumn'),
|
|
4469
4768
|
onClick: () => playColumn(sections.today || []),
|
|
4470
|
-
}, h(IconPlay, { size:
|
|
4769
|
+
}, h(IconPlay, { size: 13 })), 'today'),
|
|
4471
4770
|
h('section', { className: 'dshm-column', key: 'colArtist' },
|
|
4472
4771
|
h('div', { className: 'dshm-col-head' },
|
|
4473
4772
|
h('div', { className: 'dshm-col-title' }, h(IconNote, { size: 14 }), t('colArtist')),
|
|
@@ -4481,9 +4780,9 @@ window.__ModuleLoader__.load({
|
|
|
4481
4780
|
column('colNew', IconDisc, sections.new || [],
|
|
4482
4781
|
h('button', {
|
|
4483
4782
|
type: 'button', className: 'dshm-chipbtn dshm-col-play',
|
|
4484
|
-
disabled: !(sections.new || []).length,
|
|
4783
|
+
disabled: !(sections.new || []).length, title: t('playColumn'), 'aria-label': t('playColumn'),
|
|
4485
4784
|
onClick: () => playColumn(sections.new || []),
|
|
4486
|
-
}, h(IconPlay, { size:
|
|
4785
|
+
}, h(IconPlay, { size: 13 })), 'new')));
|
|
4487
4786
|
}
|
|
4488
4787
|
|
|
4489
4788
|
/* Shared artist profile block (intro / news / trivia / similar), reused by
|
|
@@ -4540,7 +4839,7 @@ window.__ModuleLoader__.load({
|
|
|
4540
4839
|
/* ================================================================
|
|
4541
4840
|
* 11a2. Artist page (V3): profile + songs, play/preview + like
|
|
4542
4841
|
* ================================================================ */
|
|
4543
|
-
function ArtistPageView({ t, reco, player, likes, preview, library, openView, openArtistPage, artistImages, artistPage, useUi, useLikes, useLibrary, usePlayer, useArtistImages, useArtistPage }) {
|
|
4842
|
+
function ArtistPageView({ t, reco, player, likes, preview, library, openView, openArtistPage, goBack, backLabel, artistImages, artistPage, useUi, useLikes, useLibrary, usePlayer, useArtistImages, useArtistPage }) {
|
|
4544
4843
|
const name = useUi((s) => s.artistName);
|
|
4545
4844
|
const tracks = useLibrary((st) => st.tracks);
|
|
4546
4845
|
const currentId = usePlayer((st) => (st.track ? st.track.id : null));
|
|
@@ -4593,7 +4892,7 @@ window.__ModuleLoader__.load({
|
|
|
4593
4892
|
}
|
|
4594
4893
|
return h('div', { className: 'dshm-apage' },
|
|
4595
4894
|
h('div', { className: 'dshm-toolbar dshm-toolbar-flat' },
|
|
4596
|
-
h('button', { type: 'button', className: 'dshm-chipbtn', onClick: () => openView('reco') },
|
|
4895
|
+
h('button', { type: 'button', className: 'dshm-chipbtn dshm-apage-back', onClick: () => (goBack ? goBack() : openView('reco')) }, h(IconChevronUp, { size: 14, style: { transform: 'rotate(-90deg)' } }), backLabel ? backLabel(t) : t('artistPageBack')),
|
|
4597
4896
|
notice ? h('span', { className: 'dshm-mode-hint', style: { marginLeft: '8px' } }, notice) : null,
|
|
4598
4897
|
library && ready ? h('button', {
|
|
4599
4898
|
type: 'button', className: 'dshm-chipbtn', disabled: !songs.length,
|
|
@@ -4845,7 +5144,8 @@ window.__ModuleLoader__.load({
|
|
|
4845
5144
|
const qrProvider = tab === 'netease' ? 'netease' : (tab === 'qq' && qqQr ? 'qq' : null);
|
|
4846
5145
|
const qrOn = qrProvider ? (qrProvider === 'netease' ? neOn : qqOn) : true;
|
|
4847
5146
|
useEffect(() => {
|
|
4848
|
-
|
|
5147
|
+
/* 只有面板真的展开(open)且未登录才自动取码;折叠状态下 tab 仍可能是 netease,不能因此在后台拉码轮询 */
|
|
5148
|
+
if (!s.open || !enabled || !qrProvider || qrOn || s.qrPhase !== 'idle') return undefined;
|
|
4849
5149
|
likedSync.startQr(qrProvider);
|
|
4850
5150
|
return undefined;
|
|
4851
5151
|
}, [enabled, qrProvider, qrOn, s.qrPhase]);
|
|
@@ -4975,16 +5275,35 @@ window.__ModuleLoader__.load({
|
|
|
4975
5275
|
/* ================================================================
|
|
4976
5276
|
* 11c. History view (S3): plays, completion, skips
|
|
4977
5277
|
* ================================================================ */
|
|
4978
|
-
function fmtDuration(sec) {
|
|
5278
|
+
function fmtDuration(sec, t) {
|
|
4979
5279
|
const v = Math.max(0, Math.round(sec || 0));
|
|
4980
5280
|
const hh = Math.floor(v / 3600), mm = Math.floor((v % 3600) / 60);
|
|
4981
|
-
return hh > 0 ?
|
|
5281
|
+
if (t) return hh > 0 ? fmt(t('durationHours'), { h: hh, m: mm }) : fmt(t('durationMins'), { m: mm });
|
|
5282
|
+
return hh > 0 ? hh + 'h ' + mm + 'm' : mm + 'm';
|
|
4982
5283
|
}
|
|
4983
5284
|
|
|
5285
|
+
/* 本地日期键 + 人话标签:今天 / 昨天 / 4月17日(不再是 2026-4-17) */
|
|
4984
5286
|
function dayKeyOf(ts) {
|
|
4985
|
-
const d = new Date(ts
|
|
5287
|
+
const d = ts ? new Date(ts) : new Date();
|
|
4986
5288
|
return d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate();
|
|
4987
5289
|
}
|
|
5290
|
+
function fmtDay(ts) {
|
|
5291
|
+
const d = ts ? new Date(ts) : new Date();
|
|
5292
|
+
return d.getFullYear() + '-' + String(d.getMonth() + 1).padStart(2, '0') + '-' + String(d.getDate()).padStart(2, '0');
|
|
5293
|
+
}
|
|
5294
|
+
function dayLabel(ts, t) {
|
|
5295
|
+
const d = ts ? new Date(ts) : new Date();
|
|
5296
|
+
if (t) {
|
|
5297
|
+
if (dayKeyOf(d.getTime()) === dayKeyOf(Date.now())) return t('dayToday');
|
|
5298
|
+
const y = new Date(); y.setDate(y.getDate() - 1);
|
|
5299
|
+
if (dayKeyOf(d.getTime()) === dayKeyOf(y.getTime())) return t('dayYesterday');
|
|
5300
|
+
}
|
|
5301
|
+
const now = new Date();
|
|
5302
|
+
/* 中日文用「4月17日」;其他语言用 4/17 —— 只看当前文案是不是中文,而不是硬编码 */
|
|
5303
|
+
const zh = t && /[\u4e00-\u9fff]/.test(String(t('dayToday') || ''));
|
|
5304
|
+
const md = zh ? (d.getMonth() + 1) + '月' + d.getDate() + '日' : (d.getMonth() + 1) + '/' + d.getDate();
|
|
5305
|
+
return d.getFullYear() === now.getFullYear() ? md : (zh ? d.getFullYear() + '年' + md : d.getFullYear() + '/' + md);
|
|
5306
|
+
}
|
|
4988
5307
|
|
|
4989
5308
|
function HistoryView({ t, history, player, openArtistPage, artistImages, likes, useHistory, useLibrary, useArtistImages, useLikes }) {
|
|
4990
5309
|
const s = useHistory((st) => st);
|
|
@@ -4996,9 +5315,6 @@ window.__ModuleLoader__.load({
|
|
|
4996
5315
|
const tr = ev.trackId && tracks.find((x) => x.id === ev.trackId);
|
|
4997
5316
|
return tr && tr.coverUrl ? tr.coverUrl : null;
|
|
4998
5317
|
};
|
|
4999
|
-
const statCard = (label, value) => h('div', { className: 'dshm-stat', key: label },
|
|
5000
|
-
h('div', { className: 'dshm-stat-value dshm-ellipsis' }, value),
|
|
5001
|
-
h('div', { className: 'dshm-stat-label' }, label));
|
|
5002
5318
|
const trackForTop = (it) => (it && ((it.trackId && tracks.find((x) => x.id === it.trackId)) || (it.id && tracks.find((x) => x.id === it.id)))) || null;
|
|
5003
5319
|
const topTracks = [];
|
|
5004
5320
|
for (const it of (stats && stats.topSongs) || []) {
|
|
@@ -5012,97 +5328,143 @@ window.__ModuleLoader__.load({
|
|
|
5012
5328
|
player.playTracks(topTracks, idx >= 0 ? idx : 0);
|
|
5013
5329
|
};
|
|
5014
5330
|
const daily = (stats && stats.daily) || [];
|
|
5015
|
-
const
|
|
5016
|
-
const
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
(
|
|
5060
|
-
?
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5331
|
+
const maxDaily = Math.max(1, ...daily.map((d) => d.plays || 0));
|
|
5332
|
+
const dailySum = daily.reduce((acc, d) => acc + (d.plays || 0), 0);
|
|
5333
|
+
/* 宿主 /history/stats 的真实字段 */
|
|
5334
|
+
const plays = (stats && stats.totalPlays) || 0;
|
|
5335
|
+
const totalSeconds = (stats && stats.totalSeconds) || 0;
|
|
5336
|
+
const songs = (stats && stats.uniqueSongs) || 0;
|
|
5337
|
+
const artists = (stats && stats.uniqueArtists) || 0;
|
|
5338
|
+
const skipped = (stats && stats.skippedCount) || 0;
|
|
5339
|
+
const completion = Math.round(((stats && stats.avgCompletion) || 0) * 100);
|
|
5340
|
+
const dislikes = (stats && stats.dislikes && stats.dislikes.songs) || [];
|
|
5341
|
+
const maxTopSong = Math.max(1, ...((stats && stats.topSongs) || []).map((x) => x.plays || 0));
|
|
5342
|
+
const maxTopArtist = Math.max(1, ...((stats && stats.topArtists) || []).map((x) => x.plays || 0));
|
|
5343
|
+
const showPlaysUnit = t('playsUnit') && t('playsUnit').toLowerCase() !== String(t('statPlays') || '').toLowerCase();
|
|
5344
|
+
const renderDuration = (sec) => fmtDuration(sec, t).split(/(\d+)/).map((part, idx) => {
|
|
5345
|
+
if (!part) return null;
|
|
5346
|
+
if (/^\d+$/.test(part)) return part;
|
|
5347
|
+
const unit = part.trim();
|
|
5348
|
+
return unit ? h('span', { key: idx, className: 'dshm-hist-big-unit' }, unit) : null;
|
|
5349
|
+
});
|
|
5350
|
+
const todayKey = fmtDay(Date.now());
|
|
5351
|
+
|
|
5352
|
+
/* 三幕结构:顶部浅底总览带(左主角数字 + 右 7 天趋势)→ 等高双卡排行 → 账本式对齐时间线 */
|
|
5353
|
+
const statsBlock = stats ? h(React.Fragment, null,
|
|
5354
|
+
h('section', { className: cx('dshm-hist-hero', !daily.length && 'dshm-hist-hero-solo') },
|
|
5355
|
+
h('div', { className: 'dshm-hist-overview' },
|
|
5356
|
+
h('div', { className: 'dshm-hist-main' },
|
|
5357
|
+
h('div', { className: 'dshm-hist-big-item' },
|
|
5358
|
+
h('span', { className: 'dshm-hist-big-label' }, t('statPlays')),
|
|
5359
|
+
h('span', { className: 'dshm-hist-big' }, String(plays), showPlaysUnit ? h('span', { className: 'dshm-hist-big-unit' }, t('playsUnit')) : null)),
|
|
5360
|
+
h('div', { className: 'dshm-hist-big-item' },
|
|
5361
|
+
h('span', { className: 'dshm-hist-big-label' }, t('statSeconds')),
|
|
5362
|
+
h('span', { className: 'dshm-hist-big' }, renderDuration(totalSeconds)))),
|
|
5363
|
+
h('p', { className: 'dshm-hist-foot' },
|
|
5364
|
+
fmt(t('histSummaryFoot'), { songs, artists, pct: completion }),
|
|
5365
|
+
skipped ? ' · ' + fmt(t('histSummarySkip'), { n: skipped }) : '',
|
|
5366
|
+
dislikes.length ? ' · ' + fmt(t('histSummaryDislike'), { n: dislikes.length }) : '')),
|
|
5367
|
+
daily.length ? h('div', { className: 'dshm-trend-wrap', role: 'img', 'aria-label': t('statDaily') || '7 days' },
|
|
5368
|
+
h('div', { className: 'dshm-trend-head' },
|
|
5369
|
+
h('span', { className: 'dshm-trend-title' }, t('statDaily')),
|
|
5370
|
+
h('span', { className: 'dshm-trend-sum' }, dailySum + ' ' + t('playsUnit'))),
|
|
5371
|
+
h('div', { className: 'dshm-trend-bars' },
|
|
5372
|
+
daily.map((d) => {
|
|
5373
|
+
const n = d.plays || 0;
|
|
5374
|
+
const isToday = d.date === todayKey;
|
|
5375
|
+
return h('div', { key: d.date, className: cx('dshm-bar-col', isToday && 'dshm-bar-col-today'), title: d.date + ' · ' + n },
|
|
5376
|
+
h('span', { className: 'dshm-bar-val' }, n ? String(n) : '–'),
|
|
5377
|
+
h('div', { className: cx('dshm-bar', isToday && 'dshm-bar-today', !n && 'dshm-bar-zero'), style: n ? { height: Math.max(4, Math.round((n / maxDaily) * 58)) + 'px' } : undefined }));
|
|
5378
|
+
})),
|
|
5379
|
+
h('div', { className: 'dshm-trend-axis' },
|
|
5380
|
+
daily.map((d) => {
|
|
5381
|
+
const isToday = d.date === todayKey;
|
|
5382
|
+
return h('span', { key: d.date, className: cx('dshm-bar-label', isToday && 'dshm-bar-label-today') }, d.date.slice(5));
|
|
5383
|
+
}))) : null),
|
|
5384
|
+
h('div', { className: 'dshm-tops' },
|
|
5385
|
+
h('div', { className: 'dshm-top-col' },
|
|
5386
|
+
h('div', { className: 'dshm-top-title' }, t('topSongs'),
|
|
5387
|
+
h('button', {
|
|
5388
|
+
type: 'button', className: 'dshm-chipbtn dshm-col-play',
|
|
5389
|
+
disabled: topTracks.length === 0, title: t('playList'), 'aria-label': t('playList'),
|
|
5390
|
+
onClick: () => player.playTracks(topTracks, 0),
|
|
5391
|
+
}, h(IconPlay, { size: 13 }))),
|
|
5392
|
+
((stats.topSongs || []).length
|
|
5393
|
+
? stats.topSongs.map((it, i) => {
|
|
5394
|
+
const tr = trackForTop(it);
|
|
5395
|
+
const play = () => { setNotice(''); playTopSong(it); };
|
|
5396
|
+
const explain = () => setNotice(t('topUnplayable'));
|
|
5397
|
+
const ratio = Math.max(6, Math.round(((it.plays || 0) / maxTopSong) * 100));
|
|
5398
|
+
return h('div', {
|
|
5399
|
+
className: cx('dshm-top-row', tr ? 'dshm-top-row-click' : 'dshm-top-row-off'), key: i,
|
|
5400
|
+
role: 'button', tabIndex: 0,
|
|
5401
|
+
'aria-disabled': tr ? undefined : true,
|
|
5402
|
+
title: tr ? t('playTrack') : t('topUnplayable'),
|
|
5403
|
+
onClick: tr ? play : explain,
|
|
5404
|
+
onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); if (tr) play(); else explain(); } },
|
|
5405
|
+
},
|
|
5406
|
+
h('span', { className: cx('dshm-top-rank', i < 3 && 'dshm-top-rank-hi') }, String(i + 1)),
|
|
5407
|
+
h(Thumb, { src: tr && tr.coverUrl ? tr.coverUrl : null, size: 28 }),
|
|
5408
|
+
h('div', { className: 'dshm-top-info' },
|
|
5409
|
+
h('span', { className: 'dshm-top-name dshm-ellipsis' }, it.title || t('untitled')),
|
|
5410
|
+
it.artist ? h('span', { className: 'dshm-top-sub dshm-ellipsis' }, it.artist) : null),
|
|
5411
|
+
h('span', { className: 'dshm-top-meter', 'aria-hidden': true }, h('span', { style: { width: ratio + '%' } })),
|
|
5412
|
+
h('span', { className: 'dshm-count' }, (it.plays || 0) + ' ' + t('playsUnit')));
|
|
5413
|
+
})
|
|
5414
|
+
: h('div', { className: 'dshm-lyrics-hint' }, t('noSection')))),
|
|
5415
|
+
h('div', { className: 'dshm-top-col' },
|
|
5416
|
+
h('div', { className: 'dshm-top-title' }, t('topArtists')),
|
|
5417
|
+
((stats.topArtists || []).length
|
|
5418
|
+
? stats.topArtists.map((it, i) => {
|
|
5419
|
+
const ratio = Math.max(6, Math.round(((it.plays || 0) / maxTopArtist) * 100));
|
|
5420
|
+
return h('button', {
|
|
5421
|
+
key: i, type: 'button', className: 'dshm-top-row dshm-top-row-artist',
|
|
5422
|
+
title: t('artistOpen'), onClick: () => openArtistPage(it.name || ''),
|
|
5423
|
+
},
|
|
5424
|
+
h('span', { className: cx('dshm-top-rank', i < 3 && 'dshm-top-rank-hi') }, String(i + 1)),
|
|
5425
|
+
h(ArtistAvatar, { name: it.name || '', size: 28, service: artistImages, useArtistImages }),
|
|
5426
|
+
h('span', { className: 'dshm-top-name dshm-ellipsis' }, it.name || ''),
|
|
5427
|
+
h('span', { className: 'dshm-top-meter', 'aria-hidden': true }, h('span', { style: { width: ratio + '%' } })),
|
|
5428
|
+
h('span', { className: 'dshm-count' }, (it.plays || 0) + ' ' + t('playsUnit')));
|
|
5429
|
+
})
|
|
5430
|
+
: h('div', { className: 'dshm-lyrics-hint' }, t('noSection'))))),
|
|
5431
|
+
dislikes.length ? h('div', { className: 'dshm-dislikes' },
|
|
5432
|
+
h('div', { className: 'dshm-top-title' }, t('dislikesTitle')),
|
|
5433
|
+
dislikes.map((it, i) => h('div', { className: 'dshm-dislike-row', key: i },
|
|
5434
|
+
h('span', { className: 'dshm-ellipsis dshm-dislike-name' },
|
|
5435
|
+
(it.title || '') + (it.artist ? ' · ' + it.artist : '')),
|
|
5436
|
+
h('span', { className: 'dshm-count dshm-dislike-date' }, it.dislikedAt ? fmtDay(it.dislikedAt) : ''),
|
|
5437
|
+
likes ? h('button', {
|
|
5438
|
+
type: 'button', className: 'dshm-chipbtn dshm-dislike-undo',
|
|
5439
|
+
title: t('undislikeBtn'),
|
|
5440
|
+
onClick: () => likes.setDislike({ artist: it.artist, title: it.title }, false),
|
|
5441
|
+
}, t('undislikeBtn')) : null))) : null)
|
|
5081
5442
|
: null;
|
|
5082
5443
|
|
|
5083
5444
|
let list;
|
|
5084
|
-
|
|
5445
|
+
const events = s.events || [];
|
|
5446
|
+
if (s.status === 'loading' && events.length === 0) {
|
|
5085
5447
|
list = h(React.Fragment, null,
|
|
5086
5448
|
h('div', { className: 'dshm-lyrics-hint' }, t('historyLoading')),
|
|
5087
|
-
h(SkeletonRows));
|
|
5088
|
-
} else if (s.status === 'error' &&
|
|
5449
|
+
h(SkeletonRows, { t }));
|
|
5450
|
+
} else if (s.status === 'error' && events.length === 0) {
|
|
5089
5451
|
list = h(EmptyState, {
|
|
5090
5452
|
icon: h(IconAlert, { size: 30 }), tone: 'error',
|
|
5091
5453
|
title: t('historyError'), body: s.error || '',
|
|
5092
5454
|
}, h('button', { type: 'button', className: 'dshm-chipbtn', onClick: () => history.load(50) }, t('lyricsRetry')));
|
|
5093
|
-
} else if (
|
|
5455
|
+
} else if (events.length === 0) {
|
|
5094
5456
|
list = h(EmptyState, { icon: h(IconQueue, { size: 30 }), title: t('historyEmpty') });
|
|
5095
5457
|
} else {
|
|
5096
5458
|
const groups = [];
|
|
5097
5459
|
let last = null;
|
|
5098
|
-
for (const ev of
|
|
5460
|
+
for (const ev of events) {
|
|
5099
5461
|
const k = dayKeyOf(ev.timestamp || Date.now());
|
|
5100
|
-
if (k !== last) { groups.push({ key: k,
|
|
5462
|
+
if (k !== last) { groups.push({ key: k, items: [] }); last = k; }
|
|
5101
5463
|
groups[groups.length - 1].items.push(ev);
|
|
5102
5464
|
}
|
|
5103
5465
|
const trackById = (ev) => (ev && ev.trackId ? tracks.find((x) => x.id === ev.trackId) : null);
|
|
5104
5466
|
const queue = [];
|
|
5105
|
-
for (const ev of
|
|
5467
|
+
for (const ev of events) {
|
|
5106
5468
|
const tr = trackById(ev);
|
|
5107
5469
|
if (tr && !queue.some((x) => x.id === tr.id)) queue.push(tr);
|
|
5108
5470
|
}
|
|
@@ -5113,17 +5475,18 @@ window.__ModuleLoader__.load({
|
|
|
5113
5475
|
player.playTracks(queue, idx >= 0 ? idx : 0);
|
|
5114
5476
|
};
|
|
5115
5477
|
list = h('div', { className: 'dshm-hlist' },
|
|
5116
|
-
h('div', { className: 'dshm-queue-head' },
|
|
5117
|
-
h('span', { className: 'dshm-
|
|
5478
|
+
h('div', { className: 'dshm-queue-head' },
|
|
5479
|
+
h('span', { className: 'dshm-queue-title' }, t('historyTitle')),
|
|
5480
|
+
h('span', { className: 'dshm-count' }, s.total + ' ' + t('playsUnit')),
|
|
5118
5481
|
h('button', {
|
|
5119
|
-
type: 'button', className: 'dshm-chipbtn dshm-col-play',
|
|
5482
|
+
type: 'button', className: 'dshm-chipbtn dshm-col-play',
|
|
5120
5483
|
disabled: queue.length === 0,
|
|
5121
|
-
title: t('playList'),
|
|
5484
|
+
title: t('playList'), 'aria-label': t('playList'),
|
|
5122
5485
|
onClick: () => player.playTracks(queue, 0),
|
|
5123
|
-
}, h(IconPlay, { size:
|
|
5486
|
+
}, h(IconPlay, { size: 13 }))),
|
|
5124
5487
|
groups.map((g) => h('section', { className: 'dshm-hgroup', key: g.key },
|
|
5125
5488
|
h('div', { className: 'dshm-hgroup-label' },
|
|
5126
|
-
g.
|
|
5489
|
+
dayLabel(g.items[0].timestamp, t),
|
|
5127
5490
|
h('span', { className: 'dshm-count' }, g.items.length + ' ' + t('playsUnit'))),
|
|
5128
5491
|
g.items.map((ev, i) => {
|
|
5129
5492
|
const pct = Math.round((ev.completion || 0) * 100);
|
|
@@ -5131,12 +5494,17 @@ window.__ModuleLoader__.load({
|
|
|
5131
5494
|
const tr = trackById(ev);
|
|
5132
5495
|
return h('div', {
|
|
5133
5496
|
className: cx('dshm-hrow', tr && 'dshm-hrow-click'), key: i,
|
|
5134
|
-
role:
|
|
5135
|
-
title: tr ? t('playTrack') : undefined,
|
|
5497
|
+
role: 'listitem',
|
|
5136
5498
|
onClick: tr ? () => playHistory(ev) : undefined,
|
|
5137
|
-
onKeyDown: tr ? (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); playHistory(ev); } } : undefined,
|
|
5138
5499
|
},
|
|
5139
|
-
|
|
5500
|
+
tr
|
|
5501
|
+
? h('button', {
|
|
5502
|
+
type: 'button', className: 'dshm-hrow-play',
|
|
5503
|
+
'aria-label': t('playTrack') + ': ' + (ev.title || t('untitled')),
|
|
5504
|
+
title: t('playTrack'),
|
|
5505
|
+
onClick: (e) => { e.stopPropagation(); playHistory(ev); },
|
|
5506
|
+
}, h(Thumb, { src: coverOf(ev), size: 40 }))
|
|
5507
|
+
: h(Thumb, { src: coverOf(ev), size: 40 }),
|
|
5140
5508
|
h('div', { className: 'dshm-row-info' },
|
|
5141
5509
|
h('div', { className: 'dshm-row-title dshm-ellipsis' }, ev.title || ev.trackId || ''),
|
|
5142
5510
|
ev.artist
|
|
@@ -5147,12 +5515,14 @@ window.__ModuleLoader__.load({
|
|
|
5147
5515
|
h(ArtistAvatar, { name: ev.artist, size: 16, service: artistImages, useArtistImages }),
|
|
5148
5516
|
h('span', { className: 'dshm-ellipsis' }, ev.artist))
|
|
5149
5517
|
: h('div', { className: 'dshm-row-sub dshm-ellipsis' }, '')),
|
|
5150
|
-
h('
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5518
|
+
h('div', { className: 'dshm-hrow-meta' },
|
|
5519
|
+
ev.skipped ? h('span', { className: 'dshm-hskip' }, t('historySkipped')) : null,
|
|
5520
|
+
h('span', { className: 'dshm-hbadge dshm-hbadge-' + tone, title: t('historyComplete') }, pct + '%'),
|
|
5521
|
+
h('span', { className: 'dshm-htime' },
|
|
5522
|
+
ev.timestamp ? new Date(ev.timestamp).toLocaleString(undefined, { hour: '2-digit', minute: '2-digit' }) : '')));
|
|
5154
5523
|
}))));
|
|
5155
5524
|
}
|
|
5525
|
+
|
|
5156
5526
|
return h('div', { className: 'dshm-history-page' },
|
|
5157
5527
|
notice ? h('div', { className: 'dshm-mode-hint', role: 'status', style: { margin: '6px 8px 0' } }, notice) : null,
|
|
5158
5528
|
statsBlock, list);
|
|
@@ -5168,9 +5538,10 @@ window.__ModuleLoader__.load({
|
|
|
5168
5538
|
return source || '';
|
|
5169
5539
|
}
|
|
5170
5540
|
|
|
5171
|
-
function LyricsPanel({ t, lyrics, useLyrics, usePlayer }) {
|
|
5541
|
+
function LyricsPanel({ t, lyrics, player, useLyrics, usePlayer }) {
|
|
5172
5542
|
const track = usePlayer((s) => s.track);
|
|
5173
5543
|
const position = usePlayer((s) => s.position);
|
|
5544
|
+
const duration = usePlayer((s) => s.duration);
|
|
5174
5545
|
const trackId = track ? track.id : null;
|
|
5175
5546
|
const snap = useLyrics((s) => (s.trackId === trackId ? s : null));
|
|
5176
5547
|
|
|
@@ -5178,6 +5549,8 @@ window.__ModuleLoader__.load({
|
|
|
5178
5549
|
|
|
5179
5550
|
const scrollRef = useRef(null);
|
|
5180
5551
|
const activeRef = useRef(null);
|
|
5552
|
+
/* 用户刚点了某一句:短暂忽略自动滚动,免得歌词框在 seek 后「抢」回位置 */
|
|
5553
|
+
const seekHoldRef = useRef(0);
|
|
5181
5554
|
const lines = snap && snap.data && snap.data.synced ? snap.data.lines : null;
|
|
5182
5555
|
let activeIdx = -1;
|
|
5183
5556
|
if (lines && lines.length) {
|
|
@@ -5189,6 +5562,7 @@ window.__ModuleLoader__.load({
|
|
|
5189
5562
|
}
|
|
5190
5563
|
}
|
|
5191
5564
|
useEffect(() => {
|
|
5565
|
+
if (Date.now() < seekHoldRef.current) return;
|
|
5192
5566
|
const el = activeRef.current, box = scrollRef.current;
|
|
5193
5567
|
if (el && box) {
|
|
5194
5568
|
box.scrollTo({
|
|
@@ -5200,6 +5574,14 @@ window.__ModuleLoader__.load({
|
|
|
5200
5574
|
|
|
5201
5575
|
if (!track || !snap) return null;
|
|
5202
5576
|
|
|
5577
|
+
/* 点击任意一句 → 跳到那句的时间。这是所有歌词界面的第一直觉。 */
|
|
5578
|
+
const playerApi = player || (usePlayer && usePlayer.getSnapshot ? usePlayer.getSnapshot() : null);
|
|
5579
|
+
function seekTo(line) {
|
|
5580
|
+
if (line.time == null || !playerApi || typeof playerApi.seek !== 'function') return;
|
|
5581
|
+
seekHoldRef.current = Date.now() + 900;
|
|
5582
|
+
playerApi.seek(line.time);
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5203
5585
|
let body;
|
|
5204
5586
|
if (snap.status === 'loading') {
|
|
5205
5587
|
body = h('div', { className: 'dshm-lyrics-hint' }, t('lyricsLoading'));
|
|
@@ -5210,13 +5592,18 @@ window.__ModuleLoader__.load({
|
|
|
5210
5592
|
} else if (snap.data && snap.data.source === 'none') {
|
|
5211
5593
|
body = h('div', { className: 'dshm-lyrics-hint' }, (snap.data.message || t('lyricsNone')));
|
|
5212
5594
|
} else if (lines && lines.length) {
|
|
5213
|
-
body = h('div', { className: 'dshm-lyrics-scroll', ref: scrollRef },
|
|
5214
|
-
lines.map((line, i) => h('
|
|
5595
|
+
body = h('div', { className: 'dshm-lyrics-scroll', ref: scrollRef, role: 'list' },
|
|
5596
|
+
lines.map((line, i) => h('button', {
|
|
5215
5597
|
key: i,
|
|
5598
|
+
type: 'button',
|
|
5216
5599
|
ref: i === activeIdx ? activeRef : null,
|
|
5600
|
+
role: 'listitem',
|
|
5217
5601
|
className: cx('dshm-lyric-line',
|
|
5218
5602
|
i === activeIdx && 'dshm-lyric-line-active',
|
|
5219
5603
|
i < activeIdx && 'dshm-lyric-line-past'),
|
|
5604
|
+
'aria-current': i === activeIdx ? 'true' : undefined,
|
|
5605
|
+
disabled: line.time == null,
|
|
5606
|
+
onClick: () => seekTo(line),
|
|
5220
5607
|
}, line.text || '♪')));
|
|
5221
5608
|
} else if (snap.data && snap.data.plain) {
|
|
5222
5609
|
body = h('div', { className: 'dshm-plain-lyrics' }, snap.data.plain);
|
|
@@ -5224,13 +5611,15 @@ window.__ModuleLoader__.load({
|
|
|
5224
5611
|
body = h('div', { className: 'dshm-lyrics-hint' }, t('lyricsNone'));
|
|
5225
5612
|
}
|
|
5226
5613
|
|
|
5614
|
+
const synced = !!(lines && lines.length && snap.status !== 'loading');
|
|
5227
5615
|
return h('section', { className: 'dshm-lyrics', 'aria-label': t('lyricsTitle') },
|
|
5228
5616
|
h('div', { className: 'dshm-lyrics-head' },
|
|
5229
5617
|
h(IconNote, { size: 14 }),
|
|
5230
5618
|
t('lyricsTitle'),
|
|
5231
5619
|
snap.data && snap.data.source && snap.data.source !== 'none'
|
|
5232
5620
|
? h('span', { className: 'dshm-source-chip' }, t('lyricsSource') + ' · ' + lyricsSourceLabel(snap.data.source, t))
|
|
5233
|
-
: null
|
|
5621
|
+
: null,
|
|
5622
|
+
synced ? h('span', { className: 'dshm-lyrics-hint' }, t('lyricsClickHint')) : null),
|
|
5234
5623
|
body);
|
|
5235
5624
|
}
|
|
5236
5625
|
|
|
@@ -5247,7 +5636,7 @@ window.__ModuleLoader__.load({
|
|
|
5247
5636
|
/* ================================================================
|
|
5248
5637
|
* 12. Music panel (main slot): header + tabs + per-view body
|
|
5249
5638
|
* ================================================================ */
|
|
5250
|
-
function MusicPanel({ t, player, library, lyrics, reco, download, sync, history, likes, preview, warm, openView, openArtistPage, setMiniHidden, ui, artistImages, artistPage, onboarding, likedSync, useUi, useLibrary, usePlayer, useLyrics, useReco, useDownload, useSync, useHistory, useLikes, usePreview, useWarm, useArtistImages, useArtistPage, useOnboarding, useLikedSync }) {
|
|
5639
|
+
function MusicPanel({ t, player, library, lyrics, reco, download, sync, history, likes, preview, warm, openView, openArtistPage, goBack, backLabel, setMiniHidden, ui, artistImages, artistPage, onboarding, likedSync, useUi, useLibrary, usePlayer, useLyrics, useReco, useDownload, useSync, useHistory, useLikes, usePreview, useWarm, useArtistImages, useArtistPage, useOnboarding, useLikedSync }) {
|
|
5251
5640
|
const view = useUi((s) => s.view);
|
|
5252
5641
|
const settingsSection = useUi((s) => s.settingsSection);
|
|
5253
5642
|
const libTabWish = useUi((s) => s.libTabWish);
|
|
@@ -5278,21 +5667,84 @@ window.__ModuleLoader__.load({
|
|
|
5278
5667
|
|
|
5279
5668
|
/* 设置页:首启(onboarding 未完成)自动进入;老用户从右上角「设置」进入。
|
|
5280
5669
|
* section 让「我喜欢」页的入口直接滚到「喜欢列表同步」。 */
|
|
5281
|
-
const openSettings = (section) =>
|
|
5670
|
+
const openSettings = (section) => {
|
|
5671
|
+
const cur = ui.getSnapshot();
|
|
5672
|
+
/* 进入设置也压栈:退出时回到进来前的那一页 */
|
|
5673
|
+
const stack = cur.view !== 'settings' ? [...(cur.navStack || []), { view: cur.view, artistName: cur.artistName || null }].slice(-20) : (cur.navStack || []);
|
|
5674
|
+
ui.set({ view: 'settings', settingsSection: section || null, navStack: stack });
|
|
5675
|
+
};
|
|
5676
|
+
const exitSettings = () => {
|
|
5677
|
+
const cur = ui.getSnapshot();
|
|
5678
|
+
const stack = cur.navStack || [];
|
|
5679
|
+
const top = stack[stack.length - 1];
|
|
5680
|
+
if (top) ui.set({ view: top.view, artistName: top.artistName, settingsSection: null, navStack: stack.slice(0, -1) });
|
|
5681
|
+
else ui.set({ view: 'library', settingsSection: null, navStack: [] });
|
|
5682
|
+
};
|
|
5683
|
+
|
|
5684
|
+
/* 全局键盘快捷键(桌面端肌肉记忆):必须放在所有条件 return 之前,严守 React Hooks 顺序。
|
|
5685
|
+
* Space 播放/暂停 · ←/→ 快退/快进 5 秒 · ⌘/Ctrl+K 聚焦搜索 · Esc 退回上一页或清空搜索。 */
|
|
5686
|
+
useEffect(() => {
|
|
5687
|
+
if (typeof window === 'undefined') return undefined;
|
|
5688
|
+
const onKey = (e) => {
|
|
5689
|
+
const el = e.target && e.target.tagName ? e.target : null;
|
|
5690
|
+
const typing = el && (/^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName) || (e.target && e.target.isContentEditable));
|
|
5691
|
+
const mod = e.metaKey || e.ctrlKey;
|
|
5692
|
+
if (mod && (e.key === 'k' || e.key === 'K')) {
|
|
5693
|
+
const inp = document.querySelector('.dshm-panel .dshm-search input');
|
|
5694
|
+
if (inp) { e.preventDefault(); inp.focus(); inp.select && inp.select(); }
|
|
5695
|
+
return;
|
|
5696
|
+
}
|
|
5697
|
+
if (typing) return;
|
|
5698
|
+
if (e.code === 'Space' || e.key === ' ') {
|
|
5699
|
+
/* 按钮与链接上的 Space 本身就是点击:不要劫持 */
|
|
5700
|
+
if (el && /^(BUTTON|A)$/.test(el.tagName)) return;
|
|
5701
|
+
e.preventDefault();
|
|
5702
|
+
player.toggle();
|
|
5703
|
+
return;
|
|
5704
|
+
}
|
|
5705
|
+
if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
|
|
5706
|
+
if (el && (/^(BUTTON|A)$/.test(el.tagName) || (el.getAttribute && el.getAttribute('role') === 'slider'))) return;
|
|
5707
|
+
const st = player.source && player.source.getSnapshot ? player.source.getSnapshot() : null;
|
|
5708
|
+
if (st && st.duration > 0) {
|
|
5709
|
+
e.preventDefault();
|
|
5710
|
+
const delta = e.key === 'ArrowRight' ? 5 : -5;
|
|
5711
|
+
player.seek(Math.max(0, Math.min(st.duration, (st.position || 0) + delta)));
|
|
5712
|
+
}
|
|
5713
|
+
return;
|
|
5714
|
+
}
|
|
5715
|
+
if (e.key === 'Escape') {
|
|
5716
|
+
if (view === 'settings') {
|
|
5717
|
+
const firstRun = onboarding && onboarding.source ? !onboarding.source.getSnapshot().completed : false;
|
|
5718
|
+
if (!firstRun) { e.preventDefault(); exitSettings(); }
|
|
5719
|
+
return;
|
|
5720
|
+
}
|
|
5721
|
+
if (view === 'artist') { e.preventDefault(); goBack(); return; }
|
|
5722
|
+
const inp = document.querySelector('.dshm-panel .dshm-search input');
|
|
5723
|
+
if (inp && inp.value) {
|
|
5724
|
+
e.preventDefault();
|
|
5725
|
+
window.dispatchEvent(new CustomEvent('dshm:clear-search'));
|
|
5726
|
+
}
|
|
5727
|
+
}
|
|
5728
|
+
};
|
|
5729
|
+
window.addEventListener('keydown', onKey);
|
|
5730
|
+
return () => window.removeEventListener('keydown', onKey);
|
|
5731
|
+
}, [view, player, goBack, onboarding]);
|
|
5732
|
+
|
|
5282
5733
|
if (view === 'settings') {
|
|
5283
5734
|
return h(SettingsView, {
|
|
5284
5735
|
t, onboarding, useOnboarding, sync, useSync, likedSync, useLikedSync,
|
|
5285
5736
|
section: settingsSection,
|
|
5286
5737
|
/* 导入结果里的「查看我喜欢」:回曲库并直接打开「我喜欢」子页 */
|
|
5287
|
-
onViewLikes: () => { ui.set({ view: 'library', settingsSection: null, libTabWish: 'likes' });
|
|
5288
|
-
|
|
5738
|
+
onViewLikes: () => { ui.set({ view: 'library', settingsSection: null, libTabWish: 'likes', navStack: [] }); },
|
|
5739
|
+
/* 退出设置 = 回到进设置之前的那一页(首启除外:首启没有上一页,回曲库) */
|
|
5740
|
+
onExit: exitSettings,
|
|
5289
5741
|
onRoute: (target) => {
|
|
5290
|
-
ui.set({ settingsSection: null });
|
|
5742
|
+
ui.set({ settingsSection: null, navStack: [] });
|
|
5291
5743
|
if (target === 'library') {
|
|
5292
5744
|
library.load();
|
|
5293
5745
|
setTimeout(() => library.load(), 1500);
|
|
5294
|
-
|
|
5295
|
-
|
|
5746
|
+
}
|
|
5747
|
+
ui.set({ view: target === 'library' ? 'library' : 'reco' });
|
|
5296
5748
|
},
|
|
5297
5749
|
});
|
|
5298
5750
|
}
|
|
@@ -5309,7 +5761,7 @@ window.__ModuleLoader__.load({
|
|
|
5309
5761
|
: view === 'reco'
|
|
5310
5762
|
? h(RecoView, { t, reco, download, player, library, likes, preview, history, openArtistPage, warm, useReco, useDownload, useLibrary, useLikes, usePlayer, useHistory, useWarm })
|
|
5311
5763
|
: view === 'artist'
|
|
5312
|
-
? h(ArtistPageView, { t, reco, player, likes, preview, library, openView, openArtistPage, artistImages, artistPage, useUi, useLikes, useLibrary, usePlayer, useArtistImages, useArtistPage })
|
|
5764
|
+
? h(ArtistPageView, { t, reco, player, likes, preview, library, openView, openArtistPage, goBack, backLabel, artistImages, artistPage, useUi, useLikes, useLibrary, usePlayer, useArtistImages, useArtistPage })
|
|
5313
5765
|
: view === 'history'
|
|
5314
5766
|
? h(HistoryView, { t, history, player, openArtistPage, artistImages, likes, useHistory, useLibrary, useArtistImages, useLikes })
|
|
5315
5767
|
: h(NowPlayingView, { t, player, lyrics, usePlayer, useLyrics, openView, openArtistPage, artistImages, useArtistImages, likes, useLikes });
|
|
@@ -5317,30 +5769,35 @@ window.__ModuleLoader__.load({
|
|
|
5317
5769
|
return h(React.Fragment, null,
|
|
5318
5770
|
h('div', { className: 'dshm-panel' },
|
|
5319
5771
|
h('header', { className: 'dshm-header' },
|
|
5320
|
-
h('div', { className: 'dshm-
|
|
5321
|
-
h('
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
h('
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5772
|
+
h('div', { className: 'dshm-header-inner' },
|
|
5773
|
+
h('div', { className: 'dshm-title-row' },
|
|
5774
|
+
h('h1', { className: 'dshm-title' }, t('panel')),
|
|
5775
|
+
h('span', { className: 'dshm-count' }, count > 0 ? count + ' ' + t('tracksUnit') : ''),
|
|
5776
|
+
h('div', { className: 'dshm-header-actions' },
|
|
5777
|
+
/* 迷你条开关:状态型幽灵按钮(不是实心主 CTA),aria-pressed 说明「现在开着」 */
|
|
5778
|
+
h('button', {
|
|
5779
|
+
type: 'button', className: cx('dshm-chipbtn dshm-chipbtn-icon dshm-chipbtn-toggle', !miniHidden && 'dshm-chipbtn-on'),
|
|
5780
|
+
disabled: miniHidden && !hasTrack,
|
|
5781
|
+
'aria-pressed': !miniHidden,
|
|
5782
|
+
title: miniHidden && !hasTrack ? t('miniNeedsTrack') : t('miniToggle'),
|
|
5783
|
+
'aria-label': t('miniToggle'),
|
|
5784
|
+
onClick: () => setMiniHidden(miniHidden ? false : true),
|
|
5785
|
+
}, h(IconNote, { size: 14 })),
|
|
5786
|
+
h('button', {
|
|
5787
|
+
type: 'button', className: 'dshm-chipbtn dshm-chipbtn-icon',
|
|
5788
|
+
title: t('settingsHint'), 'aria-label': t('settingsTitle'), onClick: () => openSettings(),
|
|
5789
|
+
}, h(IconGear, { size: 14 })),
|
|
5790
|
+
/* 「重新扫描」是曲库维护动作:只在曲库页出现,不再霸占全站右上角 */
|
|
5791
|
+
view === 'library' ? h('button', {
|
|
5792
|
+
type: 'button', className: 'dshm-chipbtn', disabled: busy,
|
|
5793
|
+
onClick: () => library.rescan(),
|
|
5794
|
+
}, h(IconRefresh, { size: 14, className: busy ? 'dshm-spin' : undefined }), busy ? t('rescanning') : t('rescan')) : null)),
|
|
5795
|
+
h('nav', { className: 'dshm-tabs', role: 'tablist', 'aria-label': t('panel') },
|
|
5796
|
+
tabs.map((tab) => h('button', {
|
|
5797
|
+
key: tab.id, type: 'button', role: 'tab',
|
|
5798
|
+
className: 'dshm-tab', 'aria-selected': view === tab.id,
|
|
5799
|
+
onClick: () => openView(tab.id),
|
|
5800
|
+
}, tab.label, tab.dot ? h('span', { className: 'dshm-tab-dot', 'aria-hidden': true }) : null))))),
|
|
5344
5801
|
h('div', { className: 'dshm-body', role: 'tabpanel' }, body)),
|
|
5345
5802
|
toast
|
|
5346
5803
|
? h('div', { className: 'dshm-toast', role: 'status' },
|
|
@@ -5386,8 +5843,19 @@ window.__ModuleLoader__.load({
|
|
|
5386
5843
|
const [pos, setPos] = useState(() => readPrefs().miniPos || null);
|
|
5387
5844
|
const [fabPos, setFabPos] = useState(() => readPrefs().miniFabPos || null);
|
|
5388
5845
|
const [dragging, setDragging] = useState(false);
|
|
5846
|
+
const [menuOpen, setMenuOpen] = useState(false);
|
|
5847
|
+
const menuRef = useRef(null);
|
|
5389
5848
|
const boxRef = useRef(null);
|
|
5390
5849
|
const dragRef = useRef(null);
|
|
5850
|
+
/* ··· 菜单:点外面 / Esc 关闭 */
|
|
5851
|
+
useEffect(() => {
|
|
5852
|
+
if (!menuOpen) return () => {};
|
|
5853
|
+
const onDoc = (e) => { if (menuRef.current && !menuRef.current.contains(e.target)) setMenuOpen(false); };
|
|
5854
|
+
const onKey = (e) => { if (e.key === 'Escape') { e.stopPropagation(); setMenuOpen(false); } };
|
|
5855
|
+
document.addEventListener('pointerdown', onDoc, true);
|
|
5856
|
+
document.addEventListener('keydown', onKey, true);
|
|
5857
|
+
return () => { document.removeEventListener('pointerdown', onDoc, true); document.removeEventListener('keydown', onKey, true); };
|
|
5858
|
+
}, [menuOpen]);
|
|
5391
5859
|
const posRef = useRef(pos);
|
|
5392
5860
|
posRef.current = pos;
|
|
5393
5861
|
const fabRef = useRef(null);
|
|
@@ -5515,7 +5983,9 @@ window.__ModuleLoader__.load({
|
|
|
5515
5983
|
ref: fabRef, style: fabStyle,
|
|
5516
5984
|
className: cx('dshm-mini-fab', dragging && 'dshm-mini-fab-dragging'),
|
|
5517
5985
|
role: 'button', tabIndex: 0,
|
|
5518
|
-
|
|
5986
|
+
/* 悬浮球提示直接说「现在在放什么」,一眼可扫 */
|
|
5987
|
+
title: fmt(t(playing ? 'miniFabPlaying' : 'miniFabPaused'), { title: track.title || t('untitled'), artist: track.artist || '' }),
|
|
5988
|
+
'aria-label': fmt(t(playing ? 'miniFabPlaying' : 'miniFabPaused'), { title: track.title || t('untitled'), artist: track.artist || '' }),
|
|
5519
5989
|
onPointerDown: onFabDown, onPointerMove: onFabMove,
|
|
5520
5990
|
onPointerUp: onFabUp, onPointerCancel: onFabUp,
|
|
5521
5991
|
onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); expandFromFab(); setMiniCollapsed(false); } },
|
|
@@ -5533,9 +6003,9 @@ window.__ModuleLoader__.load({
|
|
|
5533
6003
|
* 这里统一挂在 box 上并按下即捕获(快速一甩时首个 move 可能已在条外,延迟捕获会丢拖动);
|
|
5534
6004
|
* 捕获会让 Chrome 把 click 投递给 box,所以未拖动的轻点由我们转发给标题按钮,单击行为不变。 */
|
|
5535
6005
|
const DRAG_THRESHOLD = 4;
|
|
5536
|
-
/*
|
|
6006
|
+
/* 只有真正的控件排除在拖动区之外;标题区(.dshm-mini-main / .dshm-mini-titlebtn)既是拖动区也保留单击 */
|
|
5537
6007
|
const interactiveTarget = (target) => Boolean(target && typeof target.closest === 'function'
|
|
5538
|
-
&& target.closest('button:not(.dshm-mini-main), a, input, textarea, select, [role="slider"], [role="button"]:not(.dshm-mini-grip)'));
|
|
6008
|
+
&& target.closest('button:not(.dshm-mini-main):not(.dshm-mini-titlebtn), a, input, textarea, select, [role="slider"], [role="button"]:not(.dshm-mini-grip)'));
|
|
5539
6009
|
const barDown = (e) => {
|
|
5540
6010
|
if (e.button !== 0 || interactiveTarget(e.target)) return;
|
|
5541
6011
|
const el = boxRef.current;
|
|
@@ -5595,18 +6065,22 @@ const DRAG_THRESHOLD = 4;
|
|
|
5595
6065
|
}
|
|
5596
6066
|
const style = pos ? { left: pos.left, top: pos.top, right: 'auto', bottom: 'auto' } : undefined;
|
|
5597
6067
|
const activeLine = activeIdx >= 0 && lines && lines[activeIdx] ? (lines[activeIdx].text || '♪') : '';
|
|
5598
|
-
/*
|
|
6068
|
+
/* .dshm-mini-main 用 <div> 容器,歌名与歌手各自是独立原生 <button>,彻底消除按钮嵌套 */
|
|
5599
6069
|
const openArtist = (e) => { e.stopPropagation(); openArtistPage(track.artist || ''); };
|
|
5600
|
-
const artistBtn = h('
|
|
5601
|
-
|
|
6070
|
+
const artistBtn = h('button', {
|
|
6071
|
+
type: 'button', className: 'dshm-mini-artist',
|
|
5602
6072
|
title: t('artistOpen'), 'aria-label': t('artistOpen'),
|
|
5603
6073
|
onClick: openArtist,
|
|
5604
|
-
onKeyDown: (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); openArtist(e); } },
|
|
5605
6074
|
},
|
|
5606
6075
|
track.artist
|
|
5607
6076
|
? h(ArtistAvatar, { name: track.artist, size: 14, service: artistImages, useArtistImages })
|
|
5608
6077
|
: null,
|
|
5609
6078
|
h('span', { className: 'dshm-ellipsis' }, error ? t('playError') : (track.artist || t('unknownArtist'))));
|
|
6079
|
+
const modeHintShort = String(mode.hint || '').replace(
|
|
6080
|
+
new RegExp('^' + String(mode.label || '').replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + '[::]\\s*'),
|
|
6081
|
+
'',
|
|
6082
|
+
);
|
|
6083
|
+
const menuDown = !!(menuOpen && boxRef.current && boxRef.current.getBoundingClientRect && boxRef.current.getBoundingClientRect().top < 180);
|
|
5610
6084
|
|
|
5611
6085
|
return portalToBody(h('div', {
|
|
5612
6086
|
ref: boxRef, style,
|
|
@@ -5631,14 +6105,20 @@ const DRAG_THRESHOLD = 4;
|
|
|
5631
6105
|
},
|
|
5632
6106
|
}, h(IconGrip, { size: 14 })),
|
|
5633
6107
|
h('div', { className: 'dshm-mini-inner' },
|
|
5634
|
-
h('
|
|
5635
|
-
|
|
5636
|
-
onClick: openNow, title: t('openNow'),
|
|
6108
|
+
h('div', {
|
|
6109
|
+
className: 'dshm-mini-main',
|
|
6110
|
+
onClick: openNow, title: t('openNow'),
|
|
5637
6111
|
},
|
|
5638
6112
|
h(Cover, { track, size: 36 }),
|
|
5639
6113
|
h('span', { className: 'dshm-mini-text' },
|
|
5640
|
-
h('
|
|
6114
|
+
h('button', {
|
|
6115
|
+
type: 'button', className: 'dshm-mini-titlebtn dshm-mini-title dshm-ellipsis',
|
|
6116
|
+
onClick: (e) => { e.stopPropagation(); openNow(); },
|
|
6117
|
+
title: t('openNow'), 'aria-label': t('openNow'),
|
|
6118
|
+
}, track.title),
|
|
5641
6119
|
artistBtn)),
|
|
6120
|
+
/* 只留 4 个高频核心控制:上一首 / 播放暂停 / 下一首 / ♥。
|
|
6121
|
+
* 播放模式、收起、隐藏这些低频「窗口与设定」动作收进 ··· 菜单,歌名区从 93px 回到 200px+。 */
|
|
5642
6122
|
h('div', { className: 'dshm-mini-controls' },
|
|
5643
6123
|
h(IconButton, { label: t('prev'), onClick: () => player.prev() }, h(IconPrev, { size: 15 })),
|
|
5644
6124
|
h(IconButton, {
|
|
@@ -5646,19 +6126,27 @@ const DRAG_THRESHOLD = 4;
|
|
|
5646
6126
|
onClick: () => player.toggle(),
|
|
5647
6127
|
}, h(playing ? IconPause : IconPlay, { size: 16 })),
|
|
5648
6128
|
h(IconButton, { label: t('next'), onClick: () => player.next() }, h(IconNext, { size: 15 })),
|
|
5649
|
-
/*
|
|
6129
|
+
/* ♥:与曲库行、正在播放页同一套语义(喜欢才入库)。👎 不再挤在迷你条里 —— 它在推荐页 / 正在播放页都有,且离「下一首」太近容易误触。 */
|
|
5650
6130
|
likes ? h(LikeButton, { t, item: track, likes, useLikes, size: 14, className: 'dshm-mini-like' }) : null,
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
6131
|
+
h('div', { className: 'dshm-mini-more', ref: menuRef },
|
|
6132
|
+
h(IconButton, {
|
|
6133
|
+
label: t('miniMore'), title: t('miniMore'), className: 'dshm-mini-morebtn',
|
|
6134
|
+
'aria-haspopup': 'menu', 'aria-expanded': menuOpen,
|
|
6135
|
+
onClick: () => setMenuOpen((v) => !v),
|
|
6136
|
+
}, h(IconMore, { size: 15 })),
|
|
6137
|
+
menuOpen ? h('div', { className: cx('dshm-mini-menu', menuDown && 'dshm-mini-menu-down'), role: 'menu', 'aria-label': t('miniMore') },
|
|
6138
|
+
h('button', {
|
|
6139
|
+
type: 'button', role: 'menuitem', className: 'dshm-mini-menuitem',
|
|
6140
|
+
onClick: () => { setMenuOpen(false); player.cycleMode(); },
|
|
6141
|
+
}, h(mode.icon, { size: 14 }), h('span', null, mode.label), modeHintShort ? h('span', { className: 'dshm-count' }, modeHintShort) : null),
|
|
6142
|
+
h('button', {
|
|
6143
|
+
type: 'button', role: 'menuitem', className: 'dshm-mini-menuitem',
|
|
6144
|
+
onClick: () => { setMenuOpen(false); collapseToFab(); setMiniCollapsed(true); },
|
|
6145
|
+
}, h(IconChevronDown, { size: 14 }), h('span', null, t('miniCollapse'))),
|
|
6146
|
+
h('button', {
|
|
6147
|
+
type: 'button', role: 'menuitem', className: 'dshm-mini-menuitem',
|
|
6148
|
+
onClick: () => { setMenuOpen(false); setMiniHidden(true); },
|
|
6149
|
+
}, h(IconClose, { size: 13 }), h('span', null, t('hideMini')))) : null))),
|
|
5662
6150
|
h('div', { className: 'dshm-mini-seek' },
|
|
5663
6151
|
h(Slider, {
|
|
5664
6152
|
value: frac, label: t('seekLabel'), disabled: !(duration > 0),
|
|
@@ -5811,9 +6299,38 @@ const DRAG_THRESHOLD = 4;
|
|
|
5811
6299
|
libTabWish: null,
|
|
5812
6300
|
downloadFloat: null,
|
|
5813
6301
|
miniRect: null,
|
|
6302
|
+
/* 导航历史栈:返回 = 回到刚才的地方(不再写死「返回推荐」/「返回曲库」) */
|
|
6303
|
+
navStack: [],
|
|
5814
6304
|
});
|
|
5815
|
-
|
|
5816
|
-
const
|
|
6305
|
+
/* 主视图切换:栈里只记「能回到的」视图(带歌手名),上限 20 */
|
|
6306
|
+
const openView = (view, extra) => {
|
|
6307
|
+
const cur = ui.getSnapshot();
|
|
6308
|
+
const prev = cur.view === 'settings' || cur.view === 'artist' || cur.view === 'now' || cur.view === 'reco' || cur.view === 'library' || cur.view === 'history'
|
|
6309
|
+
? cur.view : null;
|
|
6310
|
+
const stack = prev && prev !== view ? [...(cur.navStack || []), { view: prev, artistName: cur.artistName || null }].slice(-20) : (cur.navStack || []);
|
|
6311
|
+
ui.set({ view, navStack: stack, ...(extra || {}) });
|
|
6312
|
+
};
|
|
6313
|
+
const openArtistPage = (name) => {
|
|
6314
|
+
const cur = ui.getSnapshot();
|
|
6315
|
+
const from = { view: cur.view, artistName: cur.artistName || null };
|
|
6316
|
+
const stack = [...(cur.navStack || []), from].slice(-20);
|
|
6317
|
+
ui.set({ view: 'artist', artistName: name, navStack: stack });
|
|
6318
|
+
};
|
|
6319
|
+
/* 回退一步:没有历史就回曲库 */
|
|
6320
|
+
const goBack = () => {
|
|
6321
|
+
const cur = ui.getSnapshot();
|
|
6322
|
+
const stack = cur.navStack || [];
|
|
6323
|
+
const top = stack[stack.length - 1];
|
|
6324
|
+
ui.set(top
|
|
6325
|
+
? { view: top.view, artistName: top.artistName, settingsSection: null, navStack: stack.slice(0, -1) }
|
|
6326
|
+
: { view: 'library', settingsSection: null, navStack: [] });
|
|
6327
|
+
};
|
|
6328
|
+
const backLabel = (t) => {
|
|
6329
|
+
const cur = ui.getSnapshot();
|
|
6330
|
+
const top = (cur.navStack || [])[(cur.navStack || []).length - 1];
|
|
6331
|
+
const names = { library: t('tabLibrary'), reco: t('tabReco'), now: t('tabNow'), history: t('tabHistory'), artist: (top && top.artistName) || t('artistPageTitle'), settings: t('settingsTitle') };
|
|
6332
|
+
return top ? fmt(t('backTo'), { target: names[top.view] || names.library }) : fmt(t('backTo'), { target: names.library });
|
|
6333
|
+
};
|
|
5817
6334
|
const setMiniHidden = (hidden) => {
|
|
5818
6335
|
/* Showing the mini player always restores the full bar (fab -> bar). */
|
|
5819
6336
|
ui.set(hidden ? { miniHidden: true } : { miniHidden: false, miniCollapsed: false });
|
|
@@ -5853,7 +6370,7 @@ const DRAG_THRESHOLD = 4;
|
|
|
5853
6370
|
player, library, lyrics: lyricsService, artist: artistService, artistImages: artistImageService, onboarding: onboardingService,
|
|
5854
6371
|
reco: recoService, download: downloadService, sync: syncService, history: historyService,
|
|
5855
6372
|
likes: likesService, preview: previewService, warm: warmService, likedSync: likedSyncService,
|
|
5856
|
-
openView, openArtistPage, setMiniHidden, ui, artistPage: artistPageService,
|
|
6373
|
+
openView, openArtistPage, goBack, backLabel, setMiniHidden, ui, artistPage: artistPageService,
|
|
5857
6374
|
hooks: {
|
|
5858
6375
|
player: player.source, library: library.source, ui,
|
|
5859
6376
|
lyrics: lyricsService.source, artist: artistService.source, artistPage: artistPageService.source, artistImages: artistImageService.source, onboarding: onboardingService.source,
|
|
@@ -5871,7 +6388,7 @@ const DRAG_THRESHOLD = 4;
|
|
|
5871
6388
|
id: 'dsh-music.mini-player',
|
|
5872
6389
|
locale: NS,
|
|
5873
6390
|
inject: () => ({
|
|
5874
|
-
player, lyrics: lyricsService, artistImages: artistImageService, likes: likesService, setMiniHidden, setMiniCollapsed,
|
|
6391
|
+
player, lyrics: lyricsService, artistImages: artistImageService, likes: likesService, setMiniHidden, setMiniCollapsed, goBack, openView,
|
|
5875
6392
|
openNow: () => { openView('now'); ctx.layout.selectPanel(PANEL_ID); },
|
|
5876
6393
|
openArtistPage: (name) => { if (!name) return; openArtistPage(name); ctx.layout.selectPanel(PANEL_ID); },
|
|
5877
6394
|
publishRect: (rect) => ui.set({ miniRect: rect }),
|