Atmosphere: music library, player and downloader
Native Rust + Tauri 2 app for Windows, macOS and Linux. - Library with songs, albums, artist profiles, liked songs and folder-based playlists - Player with EQ, presets, filters, reverb, 8D, independent pitch and tempo - Synced and word-synced lyrics (local, LRCLIB, NetEase, Musixmatch API, custom) - TV mode with second-screen output - Downloader built on yt-dlp and ffmpeg with honest format choices and tagging - Listening stats with shareable social-size cards - Portable mode, temp-file cleanup, branded installers
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 6h8m4 0h4M6 12a2 2 0 1 0 4 0a2 2 0 1 0-4 0m-2 0h2m4 0h10m-5 6a2 2 0 1 0 4 0a2 2 0 1 0-4 0M4 18h11m4 0h1"/></svg>
|
||||
|
After Width: | Height: | Size: 338 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-4v4m0 4h.01"/></svg>
|
||||
|
After Width: | Height: | Size: 248 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 7v14m-3-3l3 3l3-3M12 7a2 2 0 1 0 0-4a2 2 0 0 0 0 4"/></svg>
|
||||
|
After Width: | Height: | Size: 253 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14M5 12l6 6m-6-6l6-6"/></svg>
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 12h14m-6 6l6-6m-6-6l6 6"/></svg>
|
||||
|
After Width: | Height: | Size: 225 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="m18 4l3 3l-3 3m0 10l3-3l-3-3"/><path d="M3 7h3a5 5 0 0 1 5 5a5 5 0 0 0 5 5h5m0-10h-5a4.98 4.98 0 0 0-3 1m-4 8a5 5 0 0 1-3 1H3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 331 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 9l4-4l4 4M7 5v14m14-4l-4 4l-4-4m4 4V5"/></svg>
|
||||
|
After Width: | Height: | Size: 239 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8.5 6H22l-7 12H2z"/></svg>
|
||||
|
After Width: | Height: | Size: 217 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 7a4 4 0 0 1 4-4h10a4 4 0 0 1 4 4v10a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4z"/><path d="M8.5 12a3.5 3.5 0 1 0 7 0a3.5 3.5 0 0 0-7 0M17 7v.01"/></g></svg>
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 11h1c1.38 0 3 1.274 3 3c0 1.657-1.5 3-3 3h-6V7c3 0 4.5 1.5 5 4M9 8v9m-3 0v-7m-3 6v-2"/></svg>
|
||||
|
After Width: | Height: | Size: 287 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 7.917v4.034A9.95 9.95 0 0 1 16 10v4.5a6.5 6.5 0 1 1-8-6.326V12.5a2.5 2.5 0 1 0 4 2V3h4.083A6.005 6.005 0 0 0 21 7.917"/></svg>
|
||||
|
After Width: | Height: | Size: 320 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 5v11a1 1 0 0 0 1 1h2v4l4-4h5.584c.266 0 .52-.105.707-.293l2.415-2.414c.187-.188.293-.442.293-.708V5a1 1 0 0 0-1-1h-14a1 1 0 0 0-1 1zm12 3v4m-4-4v4"/></svg>
|
||||
|
After Width: | Height: | Size: 348 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m3 8.5l1 1S5.5 8.398 6 9c.509.609 1.863 7.65 2.5 9c.556 1.184 1.978 2.89 4 1.5C14.5 18 20 14 21 8c.444-2.661-1-4-2.5-4c-2 0-4.047 1.202-4.5 4c2.05-1.254 2.551 1 1.5 3s-2 3-2.5 3c-.49 0-.924-1.165-1.5-3.5c-.59-2.42-.5-6.5-3-6.5S3 8.5 3 8.5"/></svg>
|
||||
|
After Width: | Height: | Size: 437 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 4l11.733 16H20L8.267 4zm0 16l6.768-6.768m2.46-2.46L20 4"/></svg>
|
||||
|
After Width: | Height: | Size: 257 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M2 8a4 4 0 0 1 4-4h12a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4H6a4 4 0 0 1-4-4z"/><path d="m10 9l5 3l-5 3z"/></g></svg>
|
||||
|
After Width: | Height: | Size: 301 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm12-4v4M8 3v4m-4 4h16"/></svg>
|
||||
|
After Width: | Height: | Size: 289 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 13a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm12-4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM9 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 20h14"/></svg>
|
||||
|
After Width: | Height: | Size: 414 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 12l5 5L20 7"/></svg>
|
||||
|
After Width: | Height: | Size: 213 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m6 9l6 6l6-6"/></svg>
|
||||
|
After Width: | Height: | Size: 211 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m15 6l-6 6l6 6"/></svg>
|
||||
|
After Width: | Height: | Size: 213 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 6l6 6l-6 6"/></svg>
|
||||
|
After Width: | Height: | Size: 212 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="m9 12l2 2l4-4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 266 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2"/><path d="M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2"/></g></svg>
|
||||
|
After Width: | Height: | Size: 356 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0"/><path d="M12 7v5l3 3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 264 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 18a3.5 3.5 0 0 0 0-7h-1A5 4.5 0 0 0 7 9a4.6 4.4 0 0 0-2.1 8.4M12 13v9m-3-3l3 3l3-3"/></svg>
|
||||
|
After Width: | Height: | Size: 285 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M7 9.667A2.667 2.667 0 0 1 9.667 7h8.666A2.667 2.667 0 0 1 21 9.667v8.666A2.667 2.667 0 0 1 18.333 21H9.667A2.667 2.667 0 0 1 7 18.333z"/><path d="M4.012 16.737A2 2 0 0 1 3 15V5c0-1.1.9-2 2-2h10c.75 0 1.158.385 1.5 1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 422 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2zm13-6l-4 4l-4-4"/></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M17 3.34A10 10 0 1 1 2 12l.005-.324A10 10 0 0 1 17 3.34M17 11a1 1 0 0 0-1 1a4 4 0 0 1-4 4a1 1 0 0 0 0 2a6 6 0 0 0 6-6a1 1 0 0 0-1-1m-5-1a2 2 0 0 0-1.995 1.85L10 12a2 2 0 1 0 2-2m0-4a6 6 0 0 0-6 6a1 1 0 0 0 2 0a4 4 0 0 1 4-4a1 1 0 0 0 0-2"/></svg>
|
||||
|
After Width: | Height: | Size: 358 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="M11 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0m-4 0a5 5 0 0 1 5-5m0 10a5 5 0 0 0 5-5"/></g></svg>
|
||||
|
After Width: | Height: | Size: 325 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12a1 1 0 1 0 2 0a1 1 0 1 0-2 0m7 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0m7 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0"/></svg>
|
||||
|
After Width: | Height: | Size: 296 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5l5-5m-5-7v12"/></svg>
|
||||
|
After Width: | Height: | Size: 261 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-6m-7 1l9-9m-5 0h5v5"/></svg>
|
||||
|
After Width: | Height: | Size: 275 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M14 3v4a1 1 0 0 0 1 1h4"/><path d="M17 21H7a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7l5 5v11a2 2 0 0 1-2 2"/><path d="M10 16a1 1 0 1 0 2 0a1 1 0 1 0-2 0m2 0v-5l2 1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 359 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10.941c2.333-3.308.167-7.823-1-8.941c0 3.395-2.235 5.299-3.667 6.706C5.903 10.114 5 12 5 14.294C5 17.998 8.134 21 12 21s7-3.002 7-6.706c0-1.712-1.232-4.403-2.333-5.588c-2.084 3.353-3.257 3.353-4.667 2.235"/></svg>
|
||||
|
After Width: | Height: | Size: 407 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m5 19l2.757-7.351A1 1 0 0 1 8.693 11H21a1 1 0 0 1 .986 1.164l-.996 5.211A2 2 0 0 1 19.026 19za2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v2"/></svg>
|
||||
|
After Width: | Height: | Size: 346 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 19H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4l3 3h7a2 2 0 0 1 2 2v3.5M16 19h6m-3-3v6"/></svg>
|
||||
|
After Width: | Height: | Size: 278 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2"/></svg>
|
||||
|
After Width: | Height: | Size: 273 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M4 15a2 2 0 0 1 2-2h1a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2zm11 0a2 2 0 0 1 2-2h1a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2z"/><path d="M4 15v-3a8 8 0 0 1 16 0v3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 380 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M6.979 3.074a6 6 0 0 1 4.988 1.425l.037.033l.034-.03a6 6 0 0 1 4.733-1.44l.246.036a6 6 0 0 1 3.364 10.008l-.18.185l-.048.041l-7.45 7.379a1 1 0 0 1-1.313.082l-.094-.082l-7.493-7.422A6 6 0 0 1 6.979 3.074"/></svg>
|
||||
|
After Width: | Height: | Size: 323 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.5 12.572L12 20l-7.5-7.428A5 5 0 1 1 12 6.006a5 5 0 1 1 7.5 6.572"/></svg>
|
||||
|
After Width: | Height: | Size: 267 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m9-3h.01"/><path d="M11 12h1v4h1"/></g></svg>
|
||||
|
After Width: | Height: | Size: 273 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1zM4 15a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1zm10 0a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1z"/></svg>
|
||||
|
After Width: | Height: | Size: 472 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 15l6-6m-4-3l.463-.536a5 5 0 0 1 7.071 7.072L18 13m-5 5l-.397.534a5.07 5.07 0 0 1-7.127 0a4.97 4.97 0 0 1 0-7.071L6 11"/></svg>
|
||||
|
After Width: | Height: | Size: 319 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 5h8m-8 4h5m-5 6h8m-8 4h5M3 5a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1zm0 10a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1z"/></svg>
|
||||
|
After Width: | Height: | Size: 362 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 6h11M9 12h11M9 18h11M5 6v.01M5 12v.01M5 18v.01"/></svg>
|
||||
|
After Width: | Height: | Size: 248 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3a9 9 0 1 0 9 9"/></svg>
|
||||
|
After Width: | Height: | Size: 218 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8V6a2 2 0 0 1 2-2h2M4 16v2a2 2 0 0 0 2 2h2m8-16h2a2 2 0 0 1 2 2v2m-4 12h2a2 2 0 0 0 2-2v-2"/></svg>
|
||||
|
After Width: | Height: | Size: 292 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12.9A5 5 0 1 0 11.098 9M15 12.9l-3.902-3.899l-7.513 8.584a2 2 0 1 0 2.827 2.83z"/></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M9 5a3 3 0 0 1 3-3a3 3 0 0 1 3 3v5a3 3 0 0 1-3 3a3 3 0 0 1-3-3z"/><path d="M5 10a7 7 0 0 0 14 0M8 21h8m-4-4v4"/></g></svg>
|
||||
|
After Width: | Height: | Size: 315 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></svg>
|
||||
|
After Width: | Height: | Size: 292 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 17a3 3 0 1 0 6 0a3 3 0 0 0-6 0m10 0a3 3 0 1 0 6 0a3 3 0 0 0-6 0"/><path d="M9 17V4h10v13M9 8h10"/></g></svg>
|
||||
|
After Width: | Height: | Size: 304 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 20h4L18.5 9.5a2.828 2.828 0 1 0-4-4L4 16zm9.5-13.5l4 4"/></svg>
|
||||
|
After Width: | Height: | Size: 256 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 8h.01M12.5 21H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v6.5"/><path d="m3 16l5-5c.928-.893 2.072-.893 3 0l4 4"/><path d="m14 14l1-1c.653-.629 1.413-.815 2.13-.559M19 16v6m3-3l-3 3l-3-3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 401 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M15 8h.01M3 6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3z"/><path d="m3 16l5-5c.928-.893 2.072-.893 3 0l5 5"/><path d="m14 14l1-1c.928-.893 2.072-.893 3 0l3 3"/></g></svg>
|
||||
|
After Width: | Height: | Size: 385 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M9 4H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m8 0h-2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2"/></svg>
|
||||
|
After Width: | Height: | Size: 260 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M6 4v16a1 1 0 0 0 1.524.852l13-8a1 1 0 0 0 0-1.704l-13-8A1 1 0 0 0 6 4"/></svg>
|
||||
|
After Width: | Height: | Size: 191 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 4v16l13-8z"/></svg>
|
||||
|
After Width: | Height: | Size: 212 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="m19.496 4.136l-12 7a1 1 0 0 0 0 1.728l12 7A1 1 0 0 0 21 19V5a1 1 0 0 0-1.504-.864M4 4a1 1 0 0 1 .993.883L5 5v14a1 1 0 0 1-1.993.117L3 19V5a1 1 0 0 1 1-1"/></svg>
|
||||
|
After Width: | Height: | Size: 273 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M3 5v14a1 1 0 0 0 1.504.864l12-7a1 1 0 0 0 0-1.728l-12-7A1 1 0 0 0 3 5m17-1a1 1 0 0 1 .993.883L21 5v14a1 1 0 0 1-1.993.117L19 19V5a1 1 0 0 1 1-1"/></svg>
|
||||
|
After Width: | Height: | Size: 265 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 8H5m0 4h9m-3 4H5m10 0h6m-3-3v6"/></svg>
|
||||
|
After Width: | Height: | Size: 233 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 17a3 3 0 1 0 6 0a3 3 0 1 0-6 0m6 0V4h4m-8 1H3m0 4h10m-4 4H3"/></svg>
|
||||
|
After Width: | Height: | Size: 262 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 5v14m-7-7h14"/></svg>
|
||||
|
After Width: | Height: | Size: 215 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/></svg>
|
||||
|
After Width: | Height: | Size: 270 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12V9a3 3 0 0 1 3-3h13m-3-3l3 3l-3 3m3 3v3a3 3 0 0 1-3 3H4m3 3l-3-3l3-3m4-4l1-1v4"/></svg>
|
||||
|
After Width: | Height: | Size: 282 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12V9a3 3 0 0 1 3-3h13m-3-3l3 3l-3 3m3 3v3a3 3 0 0 1-3 3H4m3 3l-3-3l3-3"/></svg>
|
||||
|
After Width: | Height: | Size: 272 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 7a3 3 0 1 0 6 0a3 3 0 1 0-6 0m0 10a3 3 0 1 0 6 0a3 3 0 1 0-6 0m5.6-8.4L19 19M8.6 15.4L19 5"/></svg>
|
||||
|
After Width: | Height: | Size: 292 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0m18 11l-6-6"/></svg>
|
||||
|
After Width: | Height: | Size: 245 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065"/><path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0"/></g></svg>
|
||||
|
After Width: | Height: | Size: 742 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m12-6a3 3 0 1 0 6 0a3 3 0 1 0-6 0m0 12a3 3 0 1 0 6 0a3 3 0 1 0-6 0m-6.3-7.3l6.6-3.4m-6.6 6l6.6 3.4"/></svg>
|
||||
|
After Width: | Height: | Size: 330 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2m0-12a2 2 0 0 1 2 2a2 2 0 0 1 2-2a2 2 0 0 1-2-2a2 2 0 0 1-2 2M9 18a6 6 0 0 1 6-6a6 6 0 0 1-6-6a6 6 0 0 1-6 6a6 6 0 0 1 6 6"/></svg>
|
||||
|
After Width: | Height: | Size: 383 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3"/></svg>
|
||||
|
After Width: | Height: | Size: 302 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0"/><path d="M9 10a3 3 0 1 0 6 0a3 3 0 1 0-6 0m-2.832 8.849A4 4 0 0 1 10 16h4a4 4 0 0 1 3.834 2.855"/></g></svg>
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7a4 4 0 1 0 8 0a4 4 0 0 0-8 0M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2"/></svg>
|
||||
|
After Width: | Height: | Size: 271 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 8a5 5 0 0 1 1.912 4.934m-1.377 2.602A5 5 0 0 1 15 16m2.7-11a9 9 0 0 1 2.362 11.086m-1.676 2.299A9 9 0 0 1 17.7 19M9.069 5.054L9.5 4.5A.8.8 0 0 1 11 5v2m0 4v8a.8.8 0 0 1-1.5.5L6 15H4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h2l1.294-1.664M3 3l18 18"/></svg>
|
||||
|
After Width: | Height: | Size: 439 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 8a5 5 0 0 1 0 8m2.7-11a9 9 0 0 1 0 14M6 15H4a1 1 0 0 1-1-1v-4a1 1 0 0 1 1-1h2l3.5-4.5A.8.8 0 0 1 11 5v14a.8.8 0 0 1-1.5.5z"/></svg>
|
||||
|
After Width: | Height: | Size: 325 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 12h-2c-.894 0-1.662-.857-1.761-2c-.296-3.45-.749-6-2.749-6s-2.5 3.582-2.5 8s-.5 8-2.5 8s-2.452-2.547-2.749-6c-.1-1.147-.867-2-1.763-2h-2"/></svg>
|
||||
|
After Width: | Height: | Size: 339 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0-18 0m.6-3h16.8M3.6 15h16.8"/><path d="M11.5 3a17 17 0 0 0 0 18m1-18a17 17 0 0 1 0 18"/></g></svg>
|
||||
|
After Width: | Height: | Size: 321 B |
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18 6L6 18M6 6l12 12"/></svg>
|
||||
|
After Width: | Height: | Size: 219 B |
@@ -0,0 +1,64 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 170 3827 830">
|
||||
<!-- atmosphere · logo-lockup-dark.svg · Generated by tools/make_icons.py: a rising planet whose atmosphere radiates as an equalizer. -->
|
||||
<defs>
|
||||
<clipPath id="tile"><rect x="24" y="24" width="976" height="976" rx="228"/></clipPath>
|
||||
<radialGradient id="sky" cx="512" cy="900" r="900" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3a1f9a"/><stop offset="0.38" stop-color="#1b1248"/><stop offset="0.75" stop-color="#0c0b22"/><stop offset="1" stop-color="#06070f"/></radialGradient>
|
||||
<linearGradient id="planet" x1="200" y1="560" x2="860" y2="1000" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9b7bff"/><stop offset="0.5" stop-color="#5b6cff"/><stop offset="1" stop-color="#1fc8e8"/></linearGradient>
|
||||
<radialGradient id="shade" cx="512" cy="1180" r="520" gradientUnits="userSpaceOnUse"><stop offset="0.35" stop-color="#05060d" stop-opacity="0.75"/><stop offset="1" stop-color="#05060d" stop-opacity="0"/></radialGradient>
|
||||
<radialGradient id="sheen" cx="400" cy="560" r="300" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffffff" stop-opacity="0.35"/><stop offset="1" stop-color="#ffffff" stop-opacity="0"/></radialGradient>
|
||||
<linearGradient id="wave" x1="100" y1="0" x2="924" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b49cff"/><stop offset="0.5" stop-color="#8fb4ff"/><stop offset="1" stop-color="#6ff0ff"/></linearGradient>
|
||||
<linearGradient id="fadeGrad" x1="0" y1="720" x2="0" y2="985" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient>
|
||||
<mask id="fade" maskUnits="userSpaceOnUse" x="-200" y="-200" width="1424" height="1424"><rect x="-200" y="-200" width="1424" height="1424" fill="url(#fadeGrad)"/></mask>
|
||||
<filter id="glow" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="22"/></filter>
|
||||
<filter id="soft" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="9"/></filter>
|
||||
</defs>
|
||||
<g >
|
||||
<path d="M860 248 Q865.2 294.8 912 300 Q865.2 305.2 860 352 Q854.8 305.2 808 300 Q854.8 294.8 860 248Z" fill="url(#wave)" opacity="0.92"/>
|
||||
<circle cx="512" cy="980" r="420" fill="#4fdcff" opacity="0.55" filter="url(#glow)" mask="url(#fade)"/>
|
||||
<g stroke="url(#wave)" stroke-linecap="round" stroke-width="30">
|
||||
<line x1="109.3" y1="783.6" x2="71.6" y2="765.2"/>
|
||||
<line x1="140.6" y1="729.5" x2="80.9" y2="689.2"/>
|
||||
<line x1="179.1" y1="680.2" x2="137.5" y2="642.8"/>
|
||||
<line x1="224.0" y1="636.8" x2="152.0" y2="551.0"/>
|
||||
<line x1="274.6" y1="600.1" x2="225.8" y2="522.1"/>
|
||||
<line x1="329.8" y1="570.7" x2="263.9" y2="422.7"/>
|
||||
<line x1="388.5" y1="549.4" x2="352.1" y2="422.5"/>
|
||||
<line x1="449.7" y1="536.4" x2="419.9" y2="324.4"/>
|
||||
<line x1="512.0" y1="532.0" x2="512.0" y2="280.0"/>
|
||||
<line x1="574.3" y1="536.4" x2="602.7" y2="334.3"/>
|
||||
<line x1="635.5" y1="549.4" x2="674.6" y2="412.9"/>
|
||||
<line x1="694.2" y1="570.7" x2="766.6" y2="408.1"/>
|
||||
<line x1="749.4" y1="600.1" x2="801.3" y2="517.0"/>
|
||||
<line x1="800.0" y1="636.8" x2="878.4" y2="543.4"/>
|
||||
<line x1="844.9" y1="680.2" x2="891.0" y2="638.7"/>
|
||||
<line x1="883.4" y1="729.5" x2="951.4" y2="683.6"/>
|
||||
<line x1="914.7" y1="783.6" x2="956.0" y2="763.4"/>
|
||||
</g>
|
||||
<g mask="url(#fade)">
|
||||
<circle cx="512" cy="980" r="400" fill="url(#planet)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#shade)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#sheen)"/>
|
||||
<circle cx="512" cy="980" r="398" fill="none" stroke="#bff6ff" stroke-width="14" opacity="0.7" filter="url(#soft)"/>
|
||||
<circle cx="512" cy="980" r="399" fill="none" stroke="#e9fbff" stroke-width="5" opacity="0.9"/>
|
||||
</g>
|
||||
</g>
|
||||
<g fill="none" stroke="#141826" stroke-width="44.1" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M1277.0 612.5 L1276.8 607.2 L1276.4 602.0 L1275.7 596.8 L1274.8 591.6 L1273.5 586.5 L1272.0 581.5 L1270.3 576.5 L1268.3 571.6 L1266.0 566.9 L1263.5 562.3 L1260.7 557.8 L1257.8 553.5 L1254.6 549.3 L1251.1 545.3 L1247.5 541.5 L1243.7 537.9 L1239.7 534.4 L1235.5 531.2 L1231.2 528.3 L1226.7 525.5 L1222.1 523.0 L1217.4 520.7 L1212.5 518.7 L1207.5 517.0 L1202.5 515.5 L1197.4 514.2 L1192.2 513.3 L1187.0 512.6 L1181.8 512.2 L1176.5 512.0 L1171.2 512.2 L1166.0 512.6 L1160.8 513.3 L1155.6 514.2 L1150.5 515.5 L1145.5 517.0 L1140.5 518.7 L1135.6 520.7 L1130.9 523.0 L1126.3 525.5 L1121.8 528.3 L1117.5 531.2 L1113.3 534.4 L1109.3 537.9 L1105.5 541.5 L1101.9 545.3 L1098.4 549.3 L1095.2 553.5 L1092.3 557.8 L1089.5 562.3 L1087.0 566.9 L1084.7 571.6 L1082.7 576.5 L1081.0 581.5 L1079.5 586.5 L1078.2 591.6 L1077.3 596.8 L1076.6 602.0 L1076.2 607.2 L1076.0 612.5 L1076.2 617.8 L1076.6 623.0 L1077.3 628.2 L1078.2 633.4 L1079.5 638.5 L1081.0 643.5 L1082.7 648.5 L1084.7 653.4 L1087.0 658.1 L1089.5 662.7 L1092.3 667.2 L1095.2 671.5 L1098.4 675.7 L1101.9 679.7 L1105.5 683.5 L1109.3 687.1 L1113.3 690.6 L1117.5 693.8 L1121.8 696.7 L1126.3 699.5 L1130.9 702.0 L1135.6 704.3 L1140.5 706.3 L1145.5 708.0 L1150.5 709.5 L1155.6 710.8 L1160.8 711.7 L1166.0 712.4 L1171.2 712.8 L1176.5 713.0 L1181.8 712.8 L1187.0 712.4 L1192.2 711.7 L1197.4 710.8 L1202.5 709.5 L1207.5 708.0 L1212.5 706.3 L1217.4 704.3 L1222.1 702.0 L1226.7 699.5 L1231.2 696.7 L1235.5 693.8 L1239.7 690.6 L1243.7 687.1 L1247.5 683.5 L1251.1 679.7 L1254.6 675.7 L1257.8 671.5 L1260.7 667.2 L1263.5 662.7 L1266.0 658.1 L1268.3 653.4 L1270.3 648.5 L1272.0 643.5 L1273.5 638.5 L1274.8 633.4 L1275.7 628.2 L1276.4 623.0 L1276.8 617.8 L1277.0 612.5"/>
|
||||
<path d="M1277.0 512.0 L1277.0 713.0"/>
|
||||
<path d="M1424.0 433.6 L1424.0 651.7 L1424.0 651.7 L1424.0 654.9 L1424.3 658.1 L1424.7 661.3 L1425.3 664.4 L1426.0 667.6 L1426.9 670.6 L1428.0 673.7 L1429.2 676.6 L1430.6 679.5 L1432.2 682.3 L1433.8 685.1 L1435.6 687.7 L1437.6 690.2 L1439.7 692.7 L1441.9 695.0 L1444.2 697.2 L1446.7 699.3 L1449.2 701.3 L1451.8 703.1 L1454.6 704.7 L1457.4 706.3 L1460.3 707.7 L1463.2 708.9 L1466.3 710.0 L1469.3 710.9 L1472.5 711.6 L1475.6 712.2 L1478.8 712.6 L1482.0 712.9 L1485.2 713.0 L1526.8 713.0"/>
|
||||
<path d="M1370.0 512.0 L1507.2 512.0"/>
|
||||
<path d="M1620.0 512.0 L1620.0 713.0"/>
|
||||
<path d="M1620.0 585.5 L1620.0 585.5 L1620.1 581.7 L1620.4 577.9 L1620.9 574.1 L1621.6 570.3 L1622.5 566.5 L1623.5 562.8 L1624.8 559.2 L1626.3 555.7 L1628.0 552.2 L1629.8 548.8 L1631.8 545.5 L1634.0 542.3 L1636.3 539.3 L1638.8 536.4 L1641.5 533.6 L1644.3 530.9 L1647.2 528.4 L1650.2 526.1 L1653.4 523.9 L1656.7 521.9 L1660.1 520.1 L1663.6 518.4 L1667.1 516.9 L1670.7 515.6 L1674.4 514.6 L1678.2 513.7 L1682.0 513.0 L1685.8 512.5 L1689.6 512.2 L1693.5 512.0 L1697.3 512.2 L1701.1 512.5 L1704.9 513.0 L1708.7 513.7 L1712.5 514.6 L1716.2 515.6 L1719.8 516.9 L1723.3 518.4 L1726.8 520.1 L1730.2 521.9 L1733.5 523.9 L1736.7 526.1 L1739.7 528.4 L1742.6 530.9 L1745.4 533.6 L1748.1 536.4 L1750.6 539.3 L1752.9 542.3 L1755.1 545.5 L1757.1 548.8 L1758.9 552.2 L1760.6 555.7 L1762.1 559.2 L1763.4 562.8 L1764.4 566.5 L1765.3 570.3 L1766.0 574.1 L1766.5 577.9 L1766.8 581.7 L1767.0 585.5 L1767.0 713.0"/>
|
||||
<path d="M1767.0 585.5 L1767.0 585.5 L1767.1 581.7 L1767.4 577.9 L1767.9 574.1 L1768.6 570.3 L1769.5 566.5 L1770.5 562.8 L1771.8 559.2 L1773.3 555.7 L1775.0 552.2 L1776.8 548.8 L1778.8 545.5 L1781.0 542.3 L1783.3 539.3 L1785.8 536.4 L1788.5 533.6 L1791.3 530.9 L1794.2 528.4 L1797.2 526.1 L1800.4 523.9 L1803.7 521.9 L1807.1 520.1 L1810.6 518.4 L1814.1 516.9 L1817.7 515.6 L1821.4 514.6 L1825.2 513.7 L1829.0 513.0 L1832.8 512.5 L1836.6 512.2 L1840.5 512.0 L1844.3 512.2 L1848.1 512.5 L1851.9 513.0 L1855.7 513.7 L1859.5 514.6 L1863.2 515.6 L1866.8 516.9 L1870.3 518.4 L1873.8 520.1 L1877.2 521.9 L1880.5 523.9 L1883.7 526.1 L1886.7 528.4 L1889.6 530.9 L1892.4 533.6 L1895.1 536.4 L1897.6 539.3 L1899.9 542.3 L1902.1 545.5 L1904.1 548.8 L1905.9 552.2 L1907.6 555.7 L1909.1 559.2 L1910.4 562.8 L1911.4 566.5 L1912.3 570.3 L1913.0 574.1 L1913.5 577.9 L1913.8 581.7 L1914.0 585.5 L1914.0 713.0"/>
|
||||
<path d="M2207.9 612.5 L2207.8 607.2 L2207.4 602.0 L2206.7 596.8 L2205.8 591.6 L2204.5 586.5 L2203.0 581.5 L2201.3 576.5 L2199.3 571.6 L2197.0 566.9 L2194.5 562.3 L2191.7 557.8 L2188.8 553.5 L2185.6 549.3 L2182.1 545.3 L2178.5 541.5 L2174.7 537.9 L2170.7 534.4 L2166.5 531.2 L2162.2 528.3 L2157.7 525.5 L2153.1 523.0 L2148.4 520.7 L2143.5 518.7 L2138.5 517.0 L2133.5 515.5 L2128.4 514.2 L2123.2 513.3 L2118.0 512.6 L2112.8 512.2 L2107.5 512.0 L2102.2 512.2 L2097.0 512.6 L2091.8 513.3 L2086.6 514.2 L2081.5 515.5 L2076.5 517.0 L2071.5 518.7 L2066.6 520.7 L2061.9 523.0 L2057.3 525.5 L2052.8 528.3 L2048.5 531.2 L2044.3 534.4 L2040.3 537.9 L2036.5 541.5 L2032.9 545.3 L2029.4 549.3 L2026.2 553.5 L2023.3 557.8 L2020.5 562.3 L2018.0 566.9 L2015.7 571.6 L2013.7 576.5 L2012.0 581.5 L2010.5 586.5 L2009.2 591.6 L2008.3 596.8 L2007.6 602.0 L2007.2 607.2 L2007.1 612.5 L2007.2 617.8 L2007.6 623.0 L2008.3 628.2 L2009.2 633.4 L2010.5 638.5 L2012.0 643.5 L2013.7 648.5 L2015.7 653.4 L2018.0 658.1 L2020.5 662.7 L2023.3 667.2 L2026.2 671.5 L2029.4 675.7 L2032.9 679.7 L2036.5 683.5 L2040.3 687.1 L2044.3 690.6 L2048.5 693.8 L2052.8 696.7 L2057.3 699.5 L2061.9 702.0 L2066.6 704.3 L2071.5 706.3 L2076.5 708.0 L2081.5 709.5 L2086.6 710.8 L2091.8 711.7 L2097.0 712.4 L2102.2 712.8 L2107.5 713.0 L2112.8 712.8 L2118.0 712.4 L2123.2 711.7 L2128.4 710.8 L2133.5 709.5 L2138.5 708.0 L2143.5 706.3 L2148.4 704.3 L2153.1 702.0 L2157.7 699.5 L2162.2 696.7 L2166.5 693.8 L2170.7 690.6 L2174.7 687.1 L2178.5 683.5 L2182.1 679.7 L2185.6 675.7 L2188.8 671.5 L2191.7 667.2 L2194.5 662.7 L2197.0 658.1 L2199.3 653.4 L2201.3 648.5 L2203.0 643.5 L2204.5 638.5 L2205.8 633.4 L2206.7 628.2 L2207.4 623.0 L2207.8 617.8 L2207.9 612.5"/>
|
||||
<path d="M2453.3 538.7 L2451.2 536.4 L2448.9 534.2 L2446.4 532.0 L2443.7 529.9 L2440.9 527.9 L2437.9 526.1 L2434.7 524.3 L2431.4 522.6 L2428.0 521.0 L2424.4 519.6 L2420.8 518.2 L2417.0 517.0 L2413.1 515.9 L2409.1 515.0 L2405.0 514.1 L2400.9 513.5 L2396.7 512.9 L2392.5 512.5 L2388.3 512.2 L2384.0 512.1 L2379.7 512.1 L2375.5 512.2 L2371.2 512.5 L2367.0 512.9 L2362.8 513.5 L2358.7 514.2 L2354.7 515.0 L2350.7 515.9 L2346.8 517.0 L2343.0 518.2 L2339.3 519.6 L2335.8 521.0 L2332.3 522.6 L2329.0 524.3 L2325.9 526.1 L2322.9 528.0 L2320.0 529.9 L2317.4 532.0 L2314.9 534.2 L2312.6 536.4 L2310.5 538.7 L2308.6 541.1 L2306.9 543.5 L2305.4 546.0 L2304.1 548.5 L2303.1 551.1 L2302.2 553.7 L2301.6 556.3 L2301.2 559.0 L2301.1 561.6 L2301.1 564.3 L2301.4 566.9 L2301.9 569.5 L2302.6 572.2 L2303.6 574.7 L2304.7 577.3 L2306.1 579.8 L2307.7 582.3 L2309.5 584.7 L2311.5 587.0 L2313.7 589.3 L2316.1 591.5 L2318.7 593.6 L2321.4 595.6 L2324.4 597.6 L2327.4 599.4 L2330.7 601.1 L2334.0 602.8 L2337.5 604.3 L2341.2 605.7 L2344.9 606.9 L2348.8 608.1 L2352.7 609.1 L2356.7 610.0 L2360.8 610.8 L2364.9 611.4 L2369.1 611.9 L2373.4 612.2 L2377.6 612.4 L2381.9 612.5 L2386.2 612.6 L2390.4 612.8 L2394.6 613.1 L2398.8 613.6 L2403.0 614.2 L2407.1 615.0 L2411.1 615.9 L2415.0 616.9 L2418.9 618.1 L2422.6 619.3 L2426.3 620.7 L2429.8 622.2 L2433.1 623.9 L2436.4 625.6 L2439.4 627.4 L2442.4 629.4 L2445.1 631.4 L2447.7 633.5 L2450.1 635.7 L2452.3 638.0 L2454.3 640.3 L2456.1 642.7 L2457.7 645.2 L2459.0 647.7 L2460.2 650.3 L2461.2 652.8 L2461.9 655.5 L2462.4 658.1 L2462.7 660.7 L2462.7 663.4 L2462.6 666.0 L2462.2 668.7 L2461.6 671.3 L2460.7 673.9 L2459.7 676.5 L2458.4 679.0 L2456.9 681.5 L2455.2 683.9 L2453.3 686.3 L2451.2 688.6 L2448.9 690.8 L2446.4 693.0 L2443.8 695.1 L2440.9 697.0 L2437.9 698.9 L2434.8 700.7 L2431.5 702.4 L2428.0 704.0 L2424.5 705.4 L2420.8 706.8 L2417.0 708.0 L2413.1 709.1 L2409.1 710.0 L2405.1 710.8 L2400.9 711.5 L2396.8 712.1 L2392.6 712.5 L2388.3 712.8 L2384.0 712.9 L2379.8 712.9 L2375.5 712.8 L2371.3 712.5 L2367.1 712.1 L2362.9 711.5 L2358.8 710.9 L2354.7 710.0 L2350.7 709.1 L2346.8 708.0 L2343.0 706.8 L2339.3 705.4 L2335.8 704.0 L2332.3 702.4 L2329.0 700.7 L2325.9 698.9 L2322.9 697.1 L2320.0 695.1 L2317.4 693.0 L2314.9 690.8 L2312.6 688.6 L2310.5 686.3"/>
|
||||
<path d="M2756.7 612.5 L2756.6 607.2 L2756.2 602.0 L2755.5 596.8 L2754.5 591.6 L2753.3 586.5 L2751.8 581.5 L2750.1 576.5 L2748.1 571.6 L2745.8 566.9 L2743.3 562.3 L2740.5 557.8 L2737.6 553.5 L2734.4 549.3 L2730.9 545.3 L2727.3 541.5 L2723.5 537.9 L2719.5 534.4 L2715.3 531.2 L2711.0 528.3 L2706.5 525.5 L2701.9 523.0 L2697.1 520.7 L2692.3 518.7 L2687.3 517.0 L2682.3 515.5 L2677.2 514.2 L2672.0 513.3 L2666.8 512.6 L2661.5 512.2 L2656.3 512.0 L2651.0 512.2 L2645.8 512.6 L2640.6 513.3 L2635.4 514.2 L2630.3 515.5 L2625.2 517.0 L2620.3 518.7 L2615.4 520.7 L2610.7 523.0 L2606.1 525.5 L2601.6 528.3 L2597.2 531.2 L2593.1 534.4 L2589.1 537.9 L2585.3 541.5 L2581.6 545.3 L2578.2 549.3 L2575.0 553.5 L2572.0 557.8 L2569.3 562.3 L2566.8 566.9 L2564.5 571.6 L2562.5 576.5 L2560.8 581.5 L2559.3 586.5 L2558.0 591.6 L2557.1 596.8 L2556.4 602.0 L2556.0 607.2 L2555.8 612.5 L2556.0 617.8 L2556.4 623.0 L2557.1 628.2 L2558.0 633.4 L2559.3 638.5 L2560.8 643.5 L2562.5 648.5 L2564.5 653.4 L2566.8 658.1 L2569.3 662.7 L2572.0 667.2 L2575.0 671.5 L2578.2 675.7 L2581.6 679.7 L2585.3 683.5 L2589.1 687.1 L2593.1 690.6 L2597.2 693.8 L2601.6 696.7 L2606.1 699.5 L2610.7 702.0 L2615.4 704.3 L2620.3 706.3 L2625.2 708.0 L2630.3 709.5 L2635.4 710.8 L2640.6 711.7 L2645.8 712.4 L2651.0 712.8 L2656.3 713.0 L2661.5 712.8 L2666.8 712.4 L2672.0 711.7 L2677.2 710.8 L2682.3 709.5 L2687.3 708.0 L2692.3 706.3 L2697.1 704.3 L2701.9 702.0 L2706.5 699.5 L2711.0 696.7 L2715.3 693.8 L2719.5 690.6 L2723.5 687.1 L2727.3 683.5 L2730.9 679.7 L2734.4 675.7 L2737.6 671.5 L2740.5 667.2 L2743.3 662.7 L2745.8 658.1 L2748.1 653.4 L2750.1 648.5 L2751.8 643.5 L2753.3 638.5 L2754.5 633.4 L2755.5 628.2 L2756.2 623.0 L2756.6 617.8 L2756.7 612.5"/>
|
||||
<path d="M2555.8 512.0 L2555.8 823.2"/>
|
||||
<path d="M2849.8 401.8 L2849.8 713.0"/>
|
||||
<path d="M2849.8 595.4 L2849.8 595.3 L2850.0 591.0 L2850.3 586.6 L2850.9 582.3 L2851.7 578.0 L2852.7 573.8 L2853.9 569.6 L2855.4 565.5 L2857.0 561.5 L2858.9 557.5 L2861.0 553.7 L2863.3 550.0 L2865.7 546.4 L2868.4 542.9 L2871.2 539.6 L2874.2 536.4 L2877.4 533.4 L2880.7 530.6 L2884.2 528.0 L2887.8 525.5 L2891.5 523.2 L2895.3 521.1 L2899.3 519.3 L2903.3 517.6 L2907.4 516.1 L2911.6 514.9 L2915.8 513.9 L2920.1 513.1 L2924.4 512.5 L2928.8 512.2 L2933.1 512.0 L2937.5 512.2 L2941.8 512.5 L2946.2 513.1 L2950.5 513.9 L2954.7 514.9 L2958.9 516.1 L2963.0 517.6 L2967.0 519.3 L2971.0 521.1 L2974.8 523.2 L2978.5 525.5 L2982.1 528.0 L2985.6 530.6 L2988.9 533.4 L2992.0 536.4 L2995.0 539.6 L2997.9 542.9 L3000.5 546.4 L3003.0 550.0 L3005.3 553.7 L3007.4 557.5 L3009.2 561.5 L3010.9 565.5 L3012.4 569.6 L3013.6 573.8 L3014.6 578.0 L3015.4 582.3 L3016.0 586.6 L3016.3 591.0 L3016.4 595.4 L3016.4 713.0"/>
|
||||
<path d="M3109.5 612.5 L3310.4 612.5 L3310.4 612.5 L3310.3 607.2 L3309.9 602.0 L3309.2 596.8 L3308.2 591.6 L3307.0 586.5 L3305.5 581.5 L3303.8 576.5 L3301.8 571.6 L3299.5 566.9 L3297.0 562.3 L3294.2 557.8 L3291.3 553.5 L3288.1 549.3 L3284.6 545.3 L3281.0 541.5 L3277.2 537.9 L3273.2 534.4 L3269.0 531.2 L3264.7 528.3 L3260.2 525.5 L3255.6 523.0 L3250.8 520.7 L3246.0 518.7 L3241.0 517.0 L3236.0 515.5 L3230.9 514.2 L3225.7 513.3 L3220.5 512.6 L3215.2 512.2 L3210.0 512.0 L3204.7 512.2 L3199.5 512.6 L3194.3 513.3 L3189.1 514.2 L3184.0 515.5 L3178.9 517.0 L3174.0 518.7 L3169.1 520.7 L3164.4 523.0 L3159.8 525.5 L3155.3 528.3 L3150.9 531.2 L3146.8 534.4 L3142.8 537.9 L3139.0 541.5 L3135.3 545.3 L3131.9 549.3 L3128.7 553.5 L3125.7 557.8 L3123.0 562.3 L3120.5 566.9 L3118.2 571.6 L3116.2 576.5 L3114.5 581.5 L3113.0 586.5 L3111.7 591.6 L3110.8 596.8 L3110.1 602.0 L3109.7 607.2 L3109.5 612.5 L3109.7 617.8 L3110.1 623.0 L3110.8 628.2 L3111.7 633.4 L3113.0 638.5 L3114.5 643.5 L3116.2 648.5 L3118.2 653.4 L3120.5 658.1 L3123.0 662.7 L3125.7 667.2 L3128.7 671.5 L3131.9 675.7 L3135.3 679.7 L3139.0 683.5 L3142.8 687.1 L3146.8 690.6 L3150.9 693.8 L3155.3 696.7 L3159.8 699.5 L3164.4 702.0 L3169.1 704.3 L3174.0 706.3 L3178.9 708.0 L3184.0 709.5 L3189.1 710.8 L3194.3 711.7 L3199.5 712.4 L3204.7 712.8 L3210.0 713.0 L3215.2 712.8 L3220.5 712.4 L3225.7 711.7 L3230.9 710.8 L3236.0 709.5 L3241.0 708.0 L3246.0 706.3 L3250.8 704.3 L3255.6 702.0 L3260.2 699.5 L3264.7 696.7 L3269.0 693.8 L3273.2 690.6 L3277.2 687.1 L3281.0 683.5 L3284.6 679.7"/>
|
||||
<path d="M3403.5 512.0 L3403.5 713.0"/>
|
||||
<path d="M3403.5 590.5 L3403.5 590.4 L3403.6 586.3 L3404.0 582.2 L3404.5 578.1 L3405.3 574.0 L3406.3 570.0 L3407.4 566.0 L3408.8 562.1 L3410.4 558.3 L3412.2 554.6 L3414.2 550.9 L3416.4 547.4 L3418.8 544.0 L3421.3 540.7 L3424.0 537.6 L3426.9 534.6 L3429.9 531.8 L3433.1 529.1 L3436.4 526.6 L3439.8 524.3 L3443.4 522.2 L3447.0 520.2 L3450.8 518.5 L3454.6 517.0 L3458.6 515.6 L3462.5 514.5 L3466.6 513.6 L3470.7 512.9 L3474.8 512.4 L3478.9 512.1 L3483.0 512.1 L3487.2 512.2 L3491.3 512.6 L3495.4 513.2 L3499.5 514.0 L3503.5 515.1 L3507.4 516.3 L3511.3 517.8"/>
|
||||
<path d="M3604.4 612.5 L3805.3 612.5 L3805.3 612.5 L3805.2 607.2 L3804.8 602.0 L3804.1 596.8 L3803.1 591.6 L3801.9 586.5 L3800.4 581.5 L3798.6 576.5 L3796.6 571.6 L3794.4 566.9 L3791.8 562.3 L3789.1 557.8 L3786.1 553.5 L3782.9 549.3 L3779.5 545.3 L3775.9 541.5 L3772.1 537.9 L3768.1 534.4 L3763.9 531.2 L3759.6 528.3 L3755.1 525.5 L3750.5 523.0 L3745.7 520.7 L3740.9 518.7 L3735.9 517.0 L3730.9 515.5 L3725.7 514.2 L3720.6 513.3 L3715.4 512.6 L3710.1 512.2 L3704.9 512.0 L3699.6 512.2 L3694.4 512.6 L3689.1 513.3 L3684.0 514.2 L3678.9 515.5 L3673.8 517.0 L3668.9 518.7 L3664.0 520.7 L3659.3 523.0 L3654.6 525.5 L3650.1 528.3 L3645.8 531.2 L3641.6 534.4 L3637.6 537.9 L3633.8 541.5 L3630.2 545.3 L3626.8 549.3 L3623.6 553.5 L3620.6 557.8 L3617.9 562.3 L3615.4 566.9 L3613.1 571.6 L3611.1 576.5 L3609.3 581.5 L3607.8 586.5 L3606.6 591.6 L3605.6 596.8 L3605.0 602.0 L3604.5 607.2 L3604.4 612.5 L3604.5 617.8 L3605.0 623.0 L3605.6 628.2 L3606.6 633.4 L3607.8 638.5 L3609.3 643.5 L3611.1 648.5 L3613.1 653.4 L3615.4 658.1 L3617.9 662.7 L3620.6 667.2 L3623.6 671.5 L3626.8 675.7 L3630.2 679.7 L3633.8 683.5 L3637.6 687.1 L3641.6 690.6 L3645.8 693.8 L3650.1 696.7 L3654.6 699.5 L3659.3 702.0 L3664.0 704.3 L3668.9 706.3 L3673.8 708.0 L3678.9 709.5 L3684.0 710.8 L3689.1 711.7 L3694.4 712.4 L3699.6 712.8 L3704.9 713.0 L3710.1 712.8 L3715.4 712.4 L3720.6 711.7 L3725.7 710.8 L3730.9 709.5 L3735.9 708.0 L3740.9 706.3 L3745.7 704.3 L3750.5 702.0 L3755.1 699.5 L3759.6 696.7 L3763.9 693.8 L3768.1 690.6 L3772.1 687.1 L3775.9 683.5 L3779.5 679.7"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,64 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 170 3827 830">
|
||||
<!-- atmosphere · logo-lockup-light.svg · Generated by tools/make_icons.py: a rising planet whose atmosphere radiates as an equalizer. -->
|
||||
<defs>
|
||||
<clipPath id="tile"><rect x="24" y="24" width="976" height="976" rx="228"/></clipPath>
|
||||
<radialGradient id="sky" cx="512" cy="900" r="900" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3a1f9a"/><stop offset="0.38" stop-color="#1b1248"/><stop offset="0.75" stop-color="#0c0b22"/><stop offset="1" stop-color="#06070f"/></radialGradient>
|
||||
<linearGradient id="planet" x1="200" y1="560" x2="860" y2="1000" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9b7bff"/><stop offset="0.5" stop-color="#5b6cff"/><stop offset="1" stop-color="#1fc8e8"/></linearGradient>
|
||||
<radialGradient id="shade" cx="512" cy="1180" r="520" gradientUnits="userSpaceOnUse"><stop offset="0.35" stop-color="#05060d" stop-opacity="0.75"/><stop offset="1" stop-color="#05060d" stop-opacity="0"/></radialGradient>
|
||||
<radialGradient id="sheen" cx="400" cy="560" r="300" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffffff" stop-opacity="0.35"/><stop offset="1" stop-color="#ffffff" stop-opacity="0"/></radialGradient>
|
||||
<linearGradient id="wave" x1="100" y1="0" x2="924" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b49cff"/><stop offset="0.5" stop-color="#8fb4ff"/><stop offset="1" stop-color="#6ff0ff"/></linearGradient>
|
||||
<linearGradient id="fadeGrad" x1="0" y1="720" x2="0" y2="985" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient>
|
||||
<mask id="fade" maskUnits="userSpaceOnUse" x="-200" y="-200" width="1424" height="1424"><rect x="-200" y="-200" width="1424" height="1424" fill="url(#fadeGrad)"/></mask>
|
||||
<filter id="glow" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="22"/></filter>
|
||||
<filter id="soft" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="9"/></filter>
|
||||
</defs>
|
||||
<g >
|
||||
<path d="M860 248 Q865.2 294.8 912 300 Q865.2 305.2 860 352 Q854.8 305.2 808 300 Q854.8 294.8 860 248Z" fill="url(#wave)" opacity="0.92"/>
|
||||
<circle cx="512" cy="980" r="420" fill="#4fdcff" opacity="0.55" filter="url(#glow)" mask="url(#fade)"/>
|
||||
<g stroke="url(#wave)" stroke-linecap="round" stroke-width="30">
|
||||
<line x1="109.3" y1="783.6" x2="71.6" y2="765.2"/>
|
||||
<line x1="140.6" y1="729.5" x2="80.9" y2="689.2"/>
|
||||
<line x1="179.1" y1="680.2" x2="137.5" y2="642.8"/>
|
||||
<line x1="224.0" y1="636.8" x2="152.0" y2="551.0"/>
|
||||
<line x1="274.6" y1="600.1" x2="225.8" y2="522.1"/>
|
||||
<line x1="329.8" y1="570.7" x2="263.9" y2="422.7"/>
|
||||
<line x1="388.5" y1="549.4" x2="352.1" y2="422.5"/>
|
||||
<line x1="449.7" y1="536.4" x2="419.9" y2="324.4"/>
|
||||
<line x1="512.0" y1="532.0" x2="512.0" y2="280.0"/>
|
||||
<line x1="574.3" y1="536.4" x2="602.7" y2="334.3"/>
|
||||
<line x1="635.5" y1="549.4" x2="674.6" y2="412.9"/>
|
||||
<line x1="694.2" y1="570.7" x2="766.6" y2="408.1"/>
|
||||
<line x1="749.4" y1="600.1" x2="801.3" y2="517.0"/>
|
||||
<line x1="800.0" y1="636.8" x2="878.4" y2="543.4"/>
|
||||
<line x1="844.9" y1="680.2" x2="891.0" y2="638.7"/>
|
||||
<line x1="883.4" y1="729.5" x2="951.4" y2="683.6"/>
|
||||
<line x1="914.7" y1="783.6" x2="956.0" y2="763.4"/>
|
||||
</g>
|
||||
<g mask="url(#fade)">
|
||||
<circle cx="512" cy="980" r="400" fill="url(#planet)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#shade)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#sheen)"/>
|
||||
<circle cx="512" cy="980" r="398" fill="none" stroke="#bff6ff" stroke-width="14" opacity="0.7" filter="url(#soft)"/>
|
||||
<circle cx="512" cy="980" r="399" fill="none" stroke="#e9fbff" stroke-width="5" opacity="0.9"/>
|
||||
</g>
|
||||
</g>
|
||||
<g fill="none" stroke="#f4f5fb" stroke-width="44.1" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M1277.0 612.5 L1276.8 607.2 L1276.4 602.0 L1275.7 596.8 L1274.8 591.6 L1273.5 586.5 L1272.0 581.5 L1270.3 576.5 L1268.3 571.6 L1266.0 566.9 L1263.5 562.3 L1260.7 557.8 L1257.8 553.5 L1254.6 549.3 L1251.1 545.3 L1247.5 541.5 L1243.7 537.9 L1239.7 534.4 L1235.5 531.2 L1231.2 528.3 L1226.7 525.5 L1222.1 523.0 L1217.4 520.7 L1212.5 518.7 L1207.5 517.0 L1202.5 515.5 L1197.4 514.2 L1192.2 513.3 L1187.0 512.6 L1181.8 512.2 L1176.5 512.0 L1171.2 512.2 L1166.0 512.6 L1160.8 513.3 L1155.6 514.2 L1150.5 515.5 L1145.5 517.0 L1140.5 518.7 L1135.6 520.7 L1130.9 523.0 L1126.3 525.5 L1121.8 528.3 L1117.5 531.2 L1113.3 534.4 L1109.3 537.9 L1105.5 541.5 L1101.9 545.3 L1098.4 549.3 L1095.2 553.5 L1092.3 557.8 L1089.5 562.3 L1087.0 566.9 L1084.7 571.6 L1082.7 576.5 L1081.0 581.5 L1079.5 586.5 L1078.2 591.6 L1077.3 596.8 L1076.6 602.0 L1076.2 607.2 L1076.0 612.5 L1076.2 617.8 L1076.6 623.0 L1077.3 628.2 L1078.2 633.4 L1079.5 638.5 L1081.0 643.5 L1082.7 648.5 L1084.7 653.4 L1087.0 658.1 L1089.5 662.7 L1092.3 667.2 L1095.2 671.5 L1098.4 675.7 L1101.9 679.7 L1105.5 683.5 L1109.3 687.1 L1113.3 690.6 L1117.5 693.8 L1121.8 696.7 L1126.3 699.5 L1130.9 702.0 L1135.6 704.3 L1140.5 706.3 L1145.5 708.0 L1150.5 709.5 L1155.6 710.8 L1160.8 711.7 L1166.0 712.4 L1171.2 712.8 L1176.5 713.0 L1181.8 712.8 L1187.0 712.4 L1192.2 711.7 L1197.4 710.8 L1202.5 709.5 L1207.5 708.0 L1212.5 706.3 L1217.4 704.3 L1222.1 702.0 L1226.7 699.5 L1231.2 696.7 L1235.5 693.8 L1239.7 690.6 L1243.7 687.1 L1247.5 683.5 L1251.1 679.7 L1254.6 675.7 L1257.8 671.5 L1260.7 667.2 L1263.5 662.7 L1266.0 658.1 L1268.3 653.4 L1270.3 648.5 L1272.0 643.5 L1273.5 638.5 L1274.8 633.4 L1275.7 628.2 L1276.4 623.0 L1276.8 617.8 L1277.0 612.5"/>
|
||||
<path d="M1277.0 512.0 L1277.0 713.0"/>
|
||||
<path d="M1424.0 433.6 L1424.0 651.7 L1424.0 651.7 L1424.0 654.9 L1424.3 658.1 L1424.7 661.3 L1425.3 664.4 L1426.0 667.6 L1426.9 670.6 L1428.0 673.7 L1429.2 676.6 L1430.6 679.5 L1432.2 682.3 L1433.8 685.1 L1435.6 687.7 L1437.6 690.2 L1439.7 692.7 L1441.9 695.0 L1444.2 697.2 L1446.7 699.3 L1449.2 701.3 L1451.8 703.1 L1454.6 704.7 L1457.4 706.3 L1460.3 707.7 L1463.2 708.9 L1466.3 710.0 L1469.3 710.9 L1472.5 711.6 L1475.6 712.2 L1478.8 712.6 L1482.0 712.9 L1485.2 713.0 L1526.8 713.0"/>
|
||||
<path d="M1370.0 512.0 L1507.2 512.0"/>
|
||||
<path d="M1620.0 512.0 L1620.0 713.0"/>
|
||||
<path d="M1620.0 585.5 L1620.0 585.5 L1620.1 581.7 L1620.4 577.9 L1620.9 574.1 L1621.6 570.3 L1622.5 566.5 L1623.5 562.8 L1624.8 559.2 L1626.3 555.7 L1628.0 552.2 L1629.8 548.8 L1631.8 545.5 L1634.0 542.3 L1636.3 539.3 L1638.8 536.4 L1641.5 533.6 L1644.3 530.9 L1647.2 528.4 L1650.2 526.1 L1653.4 523.9 L1656.7 521.9 L1660.1 520.1 L1663.6 518.4 L1667.1 516.9 L1670.7 515.6 L1674.4 514.6 L1678.2 513.7 L1682.0 513.0 L1685.8 512.5 L1689.6 512.2 L1693.5 512.0 L1697.3 512.2 L1701.1 512.5 L1704.9 513.0 L1708.7 513.7 L1712.5 514.6 L1716.2 515.6 L1719.8 516.9 L1723.3 518.4 L1726.8 520.1 L1730.2 521.9 L1733.5 523.9 L1736.7 526.1 L1739.7 528.4 L1742.6 530.9 L1745.4 533.6 L1748.1 536.4 L1750.6 539.3 L1752.9 542.3 L1755.1 545.5 L1757.1 548.8 L1758.9 552.2 L1760.6 555.7 L1762.1 559.2 L1763.4 562.8 L1764.4 566.5 L1765.3 570.3 L1766.0 574.1 L1766.5 577.9 L1766.8 581.7 L1767.0 585.5 L1767.0 713.0"/>
|
||||
<path d="M1767.0 585.5 L1767.0 585.5 L1767.1 581.7 L1767.4 577.9 L1767.9 574.1 L1768.6 570.3 L1769.5 566.5 L1770.5 562.8 L1771.8 559.2 L1773.3 555.7 L1775.0 552.2 L1776.8 548.8 L1778.8 545.5 L1781.0 542.3 L1783.3 539.3 L1785.8 536.4 L1788.5 533.6 L1791.3 530.9 L1794.2 528.4 L1797.2 526.1 L1800.4 523.9 L1803.7 521.9 L1807.1 520.1 L1810.6 518.4 L1814.1 516.9 L1817.7 515.6 L1821.4 514.6 L1825.2 513.7 L1829.0 513.0 L1832.8 512.5 L1836.6 512.2 L1840.5 512.0 L1844.3 512.2 L1848.1 512.5 L1851.9 513.0 L1855.7 513.7 L1859.5 514.6 L1863.2 515.6 L1866.8 516.9 L1870.3 518.4 L1873.8 520.1 L1877.2 521.9 L1880.5 523.9 L1883.7 526.1 L1886.7 528.4 L1889.6 530.9 L1892.4 533.6 L1895.1 536.4 L1897.6 539.3 L1899.9 542.3 L1902.1 545.5 L1904.1 548.8 L1905.9 552.2 L1907.6 555.7 L1909.1 559.2 L1910.4 562.8 L1911.4 566.5 L1912.3 570.3 L1913.0 574.1 L1913.5 577.9 L1913.8 581.7 L1914.0 585.5 L1914.0 713.0"/>
|
||||
<path d="M2207.9 612.5 L2207.8 607.2 L2207.4 602.0 L2206.7 596.8 L2205.8 591.6 L2204.5 586.5 L2203.0 581.5 L2201.3 576.5 L2199.3 571.6 L2197.0 566.9 L2194.5 562.3 L2191.7 557.8 L2188.8 553.5 L2185.6 549.3 L2182.1 545.3 L2178.5 541.5 L2174.7 537.9 L2170.7 534.4 L2166.5 531.2 L2162.2 528.3 L2157.7 525.5 L2153.1 523.0 L2148.4 520.7 L2143.5 518.7 L2138.5 517.0 L2133.5 515.5 L2128.4 514.2 L2123.2 513.3 L2118.0 512.6 L2112.8 512.2 L2107.5 512.0 L2102.2 512.2 L2097.0 512.6 L2091.8 513.3 L2086.6 514.2 L2081.5 515.5 L2076.5 517.0 L2071.5 518.7 L2066.6 520.7 L2061.9 523.0 L2057.3 525.5 L2052.8 528.3 L2048.5 531.2 L2044.3 534.4 L2040.3 537.9 L2036.5 541.5 L2032.9 545.3 L2029.4 549.3 L2026.2 553.5 L2023.3 557.8 L2020.5 562.3 L2018.0 566.9 L2015.7 571.6 L2013.7 576.5 L2012.0 581.5 L2010.5 586.5 L2009.2 591.6 L2008.3 596.8 L2007.6 602.0 L2007.2 607.2 L2007.1 612.5 L2007.2 617.8 L2007.6 623.0 L2008.3 628.2 L2009.2 633.4 L2010.5 638.5 L2012.0 643.5 L2013.7 648.5 L2015.7 653.4 L2018.0 658.1 L2020.5 662.7 L2023.3 667.2 L2026.2 671.5 L2029.4 675.7 L2032.9 679.7 L2036.5 683.5 L2040.3 687.1 L2044.3 690.6 L2048.5 693.8 L2052.8 696.7 L2057.3 699.5 L2061.9 702.0 L2066.6 704.3 L2071.5 706.3 L2076.5 708.0 L2081.5 709.5 L2086.6 710.8 L2091.8 711.7 L2097.0 712.4 L2102.2 712.8 L2107.5 713.0 L2112.8 712.8 L2118.0 712.4 L2123.2 711.7 L2128.4 710.8 L2133.5 709.5 L2138.5 708.0 L2143.5 706.3 L2148.4 704.3 L2153.1 702.0 L2157.7 699.5 L2162.2 696.7 L2166.5 693.8 L2170.7 690.6 L2174.7 687.1 L2178.5 683.5 L2182.1 679.7 L2185.6 675.7 L2188.8 671.5 L2191.7 667.2 L2194.5 662.7 L2197.0 658.1 L2199.3 653.4 L2201.3 648.5 L2203.0 643.5 L2204.5 638.5 L2205.8 633.4 L2206.7 628.2 L2207.4 623.0 L2207.8 617.8 L2207.9 612.5"/>
|
||||
<path d="M2453.3 538.7 L2451.2 536.4 L2448.9 534.2 L2446.4 532.0 L2443.7 529.9 L2440.9 527.9 L2437.9 526.1 L2434.7 524.3 L2431.4 522.6 L2428.0 521.0 L2424.4 519.6 L2420.8 518.2 L2417.0 517.0 L2413.1 515.9 L2409.1 515.0 L2405.0 514.1 L2400.9 513.5 L2396.7 512.9 L2392.5 512.5 L2388.3 512.2 L2384.0 512.1 L2379.7 512.1 L2375.5 512.2 L2371.2 512.5 L2367.0 512.9 L2362.8 513.5 L2358.7 514.2 L2354.7 515.0 L2350.7 515.9 L2346.8 517.0 L2343.0 518.2 L2339.3 519.6 L2335.8 521.0 L2332.3 522.6 L2329.0 524.3 L2325.9 526.1 L2322.9 528.0 L2320.0 529.9 L2317.4 532.0 L2314.9 534.2 L2312.6 536.4 L2310.5 538.7 L2308.6 541.1 L2306.9 543.5 L2305.4 546.0 L2304.1 548.5 L2303.1 551.1 L2302.2 553.7 L2301.6 556.3 L2301.2 559.0 L2301.1 561.6 L2301.1 564.3 L2301.4 566.9 L2301.9 569.5 L2302.6 572.2 L2303.6 574.7 L2304.7 577.3 L2306.1 579.8 L2307.7 582.3 L2309.5 584.7 L2311.5 587.0 L2313.7 589.3 L2316.1 591.5 L2318.7 593.6 L2321.4 595.6 L2324.4 597.6 L2327.4 599.4 L2330.7 601.1 L2334.0 602.8 L2337.5 604.3 L2341.2 605.7 L2344.9 606.9 L2348.8 608.1 L2352.7 609.1 L2356.7 610.0 L2360.8 610.8 L2364.9 611.4 L2369.1 611.9 L2373.4 612.2 L2377.6 612.4 L2381.9 612.5 L2386.2 612.6 L2390.4 612.8 L2394.6 613.1 L2398.8 613.6 L2403.0 614.2 L2407.1 615.0 L2411.1 615.9 L2415.0 616.9 L2418.9 618.1 L2422.6 619.3 L2426.3 620.7 L2429.8 622.2 L2433.1 623.9 L2436.4 625.6 L2439.4 627.4 L2442.4 629.4 L2445.1 631.4 L2447.7 633.5 L2450.1 635.7 L2452.3 638.0 L2454.3 640.3 L2456.1 642.7 L2457.7 645.2 L2459.0 647.7 L2460.2 650.3 L2461.2 652.8 L2461.9 655.5 L2462.4 658.1 L2462.7 660.7 L2462.7 663.4 L2462.6 666.0 L2462.2 668.7 L2461.6 671.3 L2460.7 673.9 L2459.7 676.5 L2458.4 679.0 L2456.9 681.5 L2455.2 683.9 L2453.3 686.3 L2451.2 688.6 L2448.9 690.8 L2446.4 693.0 L2443.8 695.1 L2440.9 697.0 L2437.9 698.9 L2434.8 700.7 L2431.5 702.4 L2428.0 704.0 L2424.5 705.4 L2420.8 706.8 L2417.0 708.0 L2413.1 709.1 L2409.1 710.0 L2405.1 710.8 L2400.9 711.5 L2396.8 712.1 L2392.6 712.5 L2388.3 712.8 L2384.0 712.9 L2379.8 712.9 L2375.5 712.8 L2371.3 712.5 L2367.1 712.1 L2362.9 711.5 L2358.8 710.9 L2354.7 710.0 L2350.7 709.1 L2346.8 708.0 L2343.0 706.8 L2339.3 705.4 L2335.8 704.0 L2332.3 702.4 L2329.0 700.7 L2325.9 698.9 L2322.9 697.1 L2320.0 695.1 L2317.4 693.0 L2314.9 690.8 L2312.6 688.6 L2310.5 686.3"/>
|
||||
<path d="M2756.7 612.5 L2756.6 607.2 L2756.2 602.0 L2755.5 596.8 L2754.5 591.6 L2753.3 586.5 L2751.8 581.5 L2750.1 576.5 L2748.1 571.6 L2745.8 566.9 L2743.3 562.3 L2740.5 557.8 L2737.6 553.5 L2734.4 549.3 L2730.9 545.3 L2727.3 541.5 L2723.5 537.9 L2719.5 534.4 L2715.3 531.2 L2711.0 528.3 L2706.5 525.5 L2701.9 523.0 L2697.1 520.7 L2692.3 518.7 L2687.3 517.0 L2682.3 515.5 L2677.2 514.2 L2672.0 513.3 L2666.8 512.6 L2661.5 512.2 L2656.3 512.0 L2651.0 512.2 L2645.8 512.6 L2640.6 513.3 L2635.4 514.2 L2630.3 515.5 L2625.2 517.0 L2620.3 518.7 L2615.4 520.7 L2610.7 523.0 L2606.1 525.5 L2601.6 528.3 L2597.2 531.2 L2593.1 534.4 L2589.1 537.9 L2585.3 541.5 L2581.6 545.3 L2578.2 549.3 L2575.0 553.5 L2572.0 557.8 L2569.3 562.3 L2566.8 566.9 L2564.5 571.6 L2562.5 576.5 L2560.8 581.5 L2559.3 586.5 L2558.0 591.6 L2557.1 596.8 L2556.4 602.0 L2556.0 607.2 L2555.8 612.5 L2556.0 617.8 L2556.4 623.0 L2557.1 628.2 L2558.0 633.4 L2559.3 638.5 L2560.8 643.5 L2562.5 648.5 L2564.5 653.4 L2566.8 658.1 L2569.3 662.7 L2572.0 667.2 L2575.0 671.5 L2578.2 675.7 L2581.6 679.7 L2585.3 683.5 L2589.1 687.1 L2593.1 690.6 L2597.2 693.8 L2601.6 696.7 L2606.1 699.5 L2610.7 702.0 L2615.4 704.3 L2620.3 706.3 L2625.2 708.0 L2630.3 709.5 L2635.4 710.8 L2640.6 711.7 L2645.8 712.4 L2651.0 712.8 L2656.3 713.0 L2661.5 712.8 L2666.8 712.4 L2672.0 711.7 L2677.2 710.8 L2682.3 709.5 L2687.3 708.0 L2692.3 706.3 L2697.1 704.3 L2701.9 702.0 L2706.5 699.5 L2711.0 696.7 L2715.3 693.8 L2719.5 690.6 L2723.5 687.1 L2727.3 683.5 L2730.9 679.7 L2734.4 675.7 L2737.6 671.5 L2740.5 667.2 L2743.3 662.7 L2745.8 658.1 L2748.1 653.4 L2750.1 648.5 L2751.8 643.5 L2753.3 638.5 L2754.5 633.4 L2755.5 628.2 L2756.2 623.0 L2756.6 617.8 L2756.7 612.5"/>
|
||||
<path d="M2555.8 512.0 L2555.8 823.2"/>
|
||||
<path d="M2849.8 401.8 L2849.8 713.0"/>
|
||||
<path d="M2849.8 595.4 L2849.8 595.3 L2850.0 591.0 L2850.3 586.6 L2850.9 582.3 L2851.7 578.0 L2852.7 573.8 L2853.9 569.6 L2855.4 565.5 L2857.0 561.5 L2858.9 557.5 L2861.0 553.7 L2863.3 550.0 L2865.7 546.4 L2868.4 542.9 L2871.2 539.6 L2874.2 536.4 L2877.4 533.4 L2880.7 530.6 L2884.2 528.0 L2887.8 525.5 L2891.5 523.2 L2895.3 521.1 L2899.3 519.3 L2903.3 517.6 L2907.4 516.1 L2911.6 514.9 L2915.8 513.9 L2920.1 513.1 L2924.4 512.5 L2928.8 512.2 L2933.1 512.0 L2937.5 512.2 L2941.8 512.5 L2946.2 513.1 L2950.5 513.9 L2954.7 514.9 L2958.9 516.1 L2963.0 517.6 L2967.0 519.3 L2971.0 521.1 L2974.8 523.2 L2978.5 525.5 L2982.1 528.0 L2985.6 530.6 L2988.9 533.4 L2992.0 536.4 L2995.0 539.6 L2997.9 542.9 L3000.5 546.4 L3003.0 550.0 L3005.3 553.7 L3007.4 557.5 L3009.2 561.5 L3010.9 565.5 L3012.4 569.6 L3013.6 573.8 L3014.6 578.0 L3015.4 582.3 L3016.0 586.6 L3016.3 591.0 L3016.4 595.4 L3016.4 713.0"/>
|
||||
<path d="M3109.5 612.5 L3310.4 612.5 L3310.4 612.5 L3310.3 607.2 L3309.9 602.0 L3309.2 596.8 L3308.2 591.6 L3307.0 586.5 L3305.5 581.5 L3303.8 576.5 L3301.8 571.6 L3299.5 566.9 L3297.0 562.3 L3294.2 557.8 L3291.3 553.5 L3288.1 549.3 L3284.6 545.3 L3281.0 541.5 L3277.2 537.9 L3273.2 534.4 L3269.0 531.2 L3264.7 528.3 L3260.2 525.5 L3255.6 523.0 L3250.8 520.7 L3246.0 518.7 L3241.0 517.0 L3236.0 515.5 L3230.9 514.2 L3225.7 513.3 L3220.5 512.6 L3215.2 512.2 L3210.0 512.0 L3204.7 512.2 L3199.5 512.6 L3194.3 513.3 L3189.1 514.2 L3184.0 515.5 L3178.9 517.0 L3174.0 518.7 L3169.1 520.7 L3164.4 523.0 L3159.8 525.5 L3155.3 528.3 L3150.9 531.2 L3146.8 534.4 L3142.8 537.9 L3139.0 541.5 L3135.3 545.3 L3131.9 549.3 L3128.7 553.5 L3125.7 557.8 L3123.0 562.3 L3120.5 566.9 L3118.2 571.6 L3116.2 576.5 L3114.5 581.5 L3113.0 586.5 L3111.7 591.6 L3110.8 596.8 L3110.1 602.0 L3109.7 607.2 L3109.5 612.5 L3109.7 617.8 L3110.1 623.0 L3110.8 628.2 L3111.7 633.4 L3113.0 638.5 L3114.5 643.5 L3116.2 648.5 L3118.2 653.4 L3120.5 658.1 L3123.0 662.7 L3125.7 667.2 L3128.7 671.5 L3131.9 675.7 L3135.3 679.7 L3139.0 683.5 L3142.8 687.1 L3146.8 690.6 L3150.9 693.8 L3155.3 696.7 L3159.8 699.5 L3164.4 702.0 L3169.1 704.3 L3174.0 706.3 L3178.9 708.0 L3184.0 709.5 L3189.1 710.8 L3194.3 711.7 L3199.5 712.4 L3204.7 712.8 L3210.0 713.0 L3215.2 712.8 L3220.5 712.4 L3225.7 711.7 L3230.9 710.8 L3236.0 709.5 L3241.0 708.0 L3246.0 706.3 L3250.8 704.3 L3255.6 702.0 L3260.2 699.5 L3264.7 696.7 L3269.0 693.8 L3273.2 690.6 L3277.2 687.1 L3281.0 683.5 L3284.6 679.7"/>
|
||||
<path d="M3403.5 512.0 L3403.5 713.0"/>
|
||||
<path d="M3403.5 590.5 L3403.5 590.4 L3403.6 586.3 L3404.0 582.2 L3404.5 578.1 L3405.3 574.0 L3406.3 570.0 L3407.4 566.0 L3408.8 562.1 L3410.4 558.3 L3412.2 554.6 L3414.2 550.9 L3416.4 547.4 L3418.8 544.0 L3421.3 540.7 L3424.0 537.6 L3426.9 534.6 L3429.9 531.8 L3433.1 529.1 L3436.4 526.6 L3439.8 524.3 L3443.4 522.2 L3447.0 520.2 L3450.8 518.5 L3454.6 517.0 L3458.6 515.6 L3462.5 514.5 L3466.6 513.6 L3470.7 512.9 L3474.8 512.4 L3478.9 512.1 L3483.0 512.1 L3487.2 512.2 L3491.3 512.6 L3495.4 513.2 L3499.5 514.0 L3503.5 515.1 L3507.4 516.3 L3511.3 517.8"/>
|
||||
<path d="M3604.4 612.5 L3805.3 612.5 L3805.3 612.5 L3805.2 607.2 L3804.8 602.0 L3804.1 596.8 L3803.1 591.6 L3801.9 586.5 L3800.4 581.5 L3798.6 576.5 L3796.6 571.6 L3794.4 566.9 L3791.8 562.3 L3789.1 557.8 L3786.1 553.5 L3782.9 549.3 L3779.5 545.3 L3775.9 541.5 L3772.1 537.9 L3768.1 534.4 L3763.9 531.2 L3759.6 528.3 L3755.1 525.5 L3750.5 523.0 L3745.7 520.7 L3740.9 518.7 L3735.9 517.0 L3730.9 515.5 L3725.7 514.2 L3720.6 513.3 L3715.4 512.6 L3710.1 512.2 L3704.9 512.0 L3699.6 512.2 L3694.4 512.6 L3689.1 513.3 L3684.0 514.2 L3678.9 515.5 L3673.8 517.0 L3668.9 518.7 L3664.0 520.7 L3659.3 523.0 L3654.6 525.5 L3650.1 528.3 L3645.8 531.2 L3641.6 534.4 L3637.6 537.9 L3633.8 541.5 L3630.2 545.3 L3626.8 549.3 L3623.6 553.5 L3620.6 557.8 L3617.9 562.3 L3615.4 566.9 L3613.1 571.6 L3611.1 576.5 L3609.3 581.5 L3607.8 586.5 L3606.6 591.6 L3605.6 596.8 L3605.0 602.0 L3604.5 607.2 L3604.4 612.5 L3604.5 617.8 L3605.0 623.0 L3605.6 628.2 L3606.6 633.4 L3607.8 638.5 L3609.3 643.5 L3611.1 648.5 L3613.1 653.4 L3615.4 658.1 L3617.9 662.7 L3620.6 667.2 L3623.6 671.5 L3626.8 675.7 L3630.2 679.7 L3633.8 683.5 L3637.6 687.1 L3641.6 690.6 L3645.8 693.8 L3650.1 696.7 L3654.6 699.5 L3659.3 702.0 L3664.0 704.3 L3668.9 706.3 L3673.8 708.0 L3678.9 709.5 L3684.0 710.8 L3689.1 711.7 L3694.4 712.4 L3699.6 712.8 L3704.9 713.0 L3710.1 712.8 L3715.4 712.4 L3720.6 711.7 L3725.7 710.8 L3730.9 709.5 L3735.9 708.0 L3740.9 706.3 L3745.7 704.3 L3750.5 702.0 L3755.1 699.5 L3759.6 696.7 L3763.9 693.8 L3768.1 690.6 L3772.1 687.1 L3775.9 683.5 L3779.5 679.7"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,45 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 170 944 830">
|
||||
<!-- atmosphere · logo-mark.svg · Generated by tools/make_icons.py: a rising planet whose atmosphere radiates as an equalizer. -->
|
||||
<defs>
|
||||
<clipPath id="tile"><rect x="24" y="24" width="976" height="976" rx="228"/></clipPath>
|
||||
<radialGradient id="sky" cx="512" cy="900" r="900" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#3a1f9a"/><stop offset="0.38" stop-color="#1b1248"/><stop offset="0.75" stop-color="#0c0b22"/><stop offset="1" stop-color="#06070f"/></radialGradient>
|
||||
<linearGradient id="planet" x1="200" y1="560" x2="860" y2="1000" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#9b7bff"/><stop offset="0.5" stop-color="#5b6cff"/><stop offset="1" stop-color="#1fc8e8"/></linearGradient>
|
||||
<radialGradient id="shade" cx="512" cy="1180" r="520" gradientUnits="userSpaceOnUse"><stop offset="0.35" stop-color="#05060d" stop-opacity="0.75"/><stop offset="1" stop-color="#05060d" stop-opacity="0"/></radialGradient>
|
||||
<radialGradient id="sheen" cx="400" cy="560" r="300" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffffff" stop-opacity="0.35"/><stop offset="1" stop-color="#ffffff" stop-opacity="0"/></radialGradient>
|
||||
<linearGradient id="wave" x1="100" y1="0" x2="924" y2="0" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#b49cff"/><stop offset="0.5" stop-color="#8fb4ff"/><stop offset="1" stop-color="#6ff0ff"/></linearGradient>
|
||||
<linearGradient id="fadeGrad" x1="0" y1="720" x2="0" y2="985" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset="1" stop-color="#000"/></linearGradient>
|
||||
<mask id="fade" maskUnits="userSpaceOnUse" x="-200" y="-200" width="1424" height="1424"><rect x="-200" y="-200" width="1424" height="1424" fill="url(#fadeGrad)"/></mask>
|
||||
<filter id="glow" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="22"/></filter>
|
||||
<filter id="soft" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="9"/></filter>
|
||||
</defs>
|
||||
<g >
|
||||
<path d="M860 248 Q865.2 294.8 912 300 Q865.2 305.2 860 352 Q854.8 305.2 808 300 Q854.8 294.8 860 248Z" fill="url(#wave)" opacity="0.92"/>
|
||||
<circle cx="512" cy="980" r="420" fill="#4fdcff" opacity="0.55" filter="url(#glow)" mask="url(#fade)"/>
|
||||
<g stroke="url(#wave)" stroke-linecap="round" stroke-width="30">
|
||||
<line x1="109.3" y1="783.6" x2="71.6" y2="765.2"/>
|
||||
<line x1="140.6" y1="729.5" x2="80.9" y2="689.2"/>
|
||||
<line x1="179.1" y1="680.2" x2="137.5" y2="642.8"/>
|
||||
<line x1="224.0" y1="636.8" x2="152.0" y2="551.0"/>
|
||||
<line x1="274.6" y1="600.1" x2="225.8" y2="522.1"/>
|
||||
<line x1="329.8" y1="570.7" x2="263.9" y2="422.7"/>
|
||||
<line x1="388.5" y1="549.4" x2="352.1" y2="422.5"/>
|
||||
<line x1="449.7" y1="536.4" x2="419.9" y2="324.4"/>
|
||||
<line x1="512.0" y1="532.0" x2="512.0" y2="280.0"/>
|
||||
<line x1="574.3" y1="536.4" x2="602.7" y2="334.3"/>
|
||||
<line x1="635.5" y1="549.4" x2="674.6" y2="412.9"/>
|
||||
<line x1="694.2" y1="570.7" x2="766.6" y2="408.1"/>
|
||||
<line x1="749.4" y1="600.1" x2="801.3" y2="517.0"/>
|
||||
<line x1="800.0" y1="636.8" x2="878.4" y2="543.4"/>
|
||||
<line x1="844.9" y1="680.2" x2="891.0" y2="638.7"/>
|
||||
<line x1="883.4" y1="729.5" x2="951.4" y2="683.6"/>
|
||||
<line x1="914.7" y1="783.6" x2="956.0" y2="763.4"/>
|
||||
</g>
|
||||
<g mask="url(#fade)">
|
||||
<circle cx="512" cy="980" r="400" fill="url(#planet)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#shade)"/>
|
||||
<circle cx="512" cy="980" r="400" fill="url(#sheen)"/>
|
||||
<circle cx="512" cy="980" r="398" fill="none" stroke="#bff6ff" stroke-width="14" opacity="0.7" filter="url(#soft)"/>
|
||||
<circle cx="512" cy="980" r="399" fill="none" stroke="#e9fbff" stroke-width="5" opacity="0.9"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,338 @@
|
||||
<!doctype html>
|
||||
<!-- atmosphere · index.html · Window markup: onboarding, sidebar, Get / Downloads / Settings views and the save-as menu. -->
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>Atmosphere</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="titlebar" id="titlebar" data-tauri-drag-region>
|
||||
<div class="tb-brand" data-tauri-drag-region>
|
||||
<img class="lockup lockup-light" src="assets/lockup-light.svg" alt="Atmosphere" width="132" height="30" draggable="false" />
|
||||
<img class="lockup lockup-dark" src="assets/lockup-dark.svg" alt="Atmosphere" width="132" height="30" draggable="false" />
|
||||
</div>
|
||||
<div class="tb-drag" data-tauri-drag-region></div>
|
||||
<div class="tb-controls" id="winControls">
|
||||
<button class="tb-btn" id="winMin" aria-label="Minimize" title="Minimize"><svg viewBox="0 0 10 10" aria-hidden="true"><path d="M0 5.5h10" /></svg></button>
|
||||
<button class="tb-btn" id="winMax" aria-label="Maximize" title="Maximize"><svg viewBox="0 0 10 10" aria-hidden="true"><rect x="0.5" y="0.5" width="9" height="9" /></svg></button>
|
||||
<button class="tb-btn close" id="winClose" aria-label="Close" title="Close"><svg viewBox="0 0 10 10" aria-hidden="true"><path d="M0.5 0.5l9 9M9.5 0.5l-9 9" /></svg></button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="shell" id="shell" inert>
|
||||
<aside class="sidebar">
|
||||
<nav class="nav" aria-label="Main">
|
||||
<button class="nav-item" data-nav="get" aria-current="page"><span class="i" data-icon="cloud-download"></span><span>Get</span><kbd>Ctrl K</kbd></button>
|
||||
<button class="nav-item" data-nav="downloads" id="navDownloads">
|
||||
<span class="nav-ring" aria-hidden="true"><svg viewBox="0 0 20 20"><circle class="track" cx="10" cy="10" r="8.5"/><circle class="fill" id="navRing" cx="10" cy="10" r="8.5"/></svg><span class="i" data-icon="download"></span></span>
|
||||
<span>Downloads</span><span class="count" id="navCount" hidden></span>
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<div class="nav-group">
|
||||
<h2 class="nav-heading">Library</h2>
|
||||
<nav class="nav" aria-label="Library">
|
||||
<button class="nav-item" data-lib="songs"><span class="i" data-icon="music"></span><span>Songs</span></button>
|
||||
<button class="nav-item" data-lib="albums"><span class="i" data-icon="disc"></span><span>Albums</span></button>
|
||||
<button class="nav-item" data-lib="artists"><span class="i" data-icon="microphone-2"></span><span>Artists</span></button>
|
||||
<button class="nav-item" data-lib="liked"><span class="i" data-icon="heart"></span><span>Liked</span></button>
|
||||
<button class="nav-item" data-lib="stats"><span class="i" data-icon="chart-bar"></span><span>Stats</span></button>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<div class="nav-group grow">
|
||||
<div class="nav-heading-row">
|
||||
<h2 class="nav-heading">Playlists</h2>
|
||||
<button class="icon-btn" id="newPlaylistBtn" aria-label="New playlist" title="New playlist"><span class="i" data-icon="plus"></span></button>
|
||||
</div>
|
||||
<nav class="nav playlist-nav" id="playlistNav" aria-label="Playlists"></nav>
|
||||
<p class="fetched-empty" id="playlistEmpty">Playlists are folders on this device. Drag songs onto one to add them.</p>
|
||||
</div>
|
||||
|
||||
<div class="sidebar-foot">
|
||||
<button class="nav-item" data-nav="settings"><span class="i" data-icon="settings"></span><span>Settings</span></button>
|
||||
<button class="engine-state" id="engineState" data-nav="settings" data-anchor="engine"></button>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<main class="main">
|
||||
<section class="view view-get" data-view="get">
|
||||
<header class="command">
|
||||
<form class="command-bar" id="commandForm" autocomplete="off">
|
||||
<span class="i command-glyph" id="commandGlyph" data-icon="link"></span>
|
||||
<input id="commandInput" spellcheck="false" placeholder="Paste a link, or search YouTube and SoundCloud" aria-label="Link or search" />
|
||||
<div class="scope" id="searchScope" role="radiogroup" aria-label="Search on" hidden>
|
||||
<button type="button" role="radio" data-scope="youtube" aria-checked="true">YouTube</button>
|
||||
<button type="button" role="radio" data-scope="soundcloud" aria-checked="false">SoundCloud</button>
|
||||
</div>
|
||||
<button class="btn primary" id="commandGo" type="submit"><span class="label">Fetch</span><span class="spin" aria-hidden="true"></span></button>
|
||||
</form>
|
||||
<div class="clip" id="clipChip" hidden>
|
||||
<span class="i" data-icon="clipboard"></span>
|
||||
<span>Copied link</span>
|
||||
<code id="clipUrl"></code>
|
||||
<button class="btn small" id="clipUse">Fetch it</button>
|
||||
<button class="icon-btn" id="clipDismiss" aria-label="Dismiss"><span class="i" data-icon="x"></span></button>
|
||||
</div>
|
||||
<div class="fetched-strip" id="fetchedStrip" hidden>
|
||||
<ul class="fetched-list" id="fetchedList"></ul>
|
||||
<button class="link-btn" id="clearFetched" hidden>Clear</button>
|
||||
</div>
|
||||
<p id="fetchedEmpty" hidden></p>
|
||||
</header>
|
||||
|
||||
<div class="get-scroll" id="getScroll">
|
||||
<div class="banner" id="engineBanner" hidden>
|
||||
<span class="i" data-icon="alert-circle"></span>
|
||||
<div><strong>Atmosphere needs its download engine.</strong> <span id="engineBannerText">yt-dlp reads links from 1,000+ sites. It takes about a minute to set up.</span></div>
|
||||
<button class="btn" id="engineBannerBtn">Set up engine</button>
|
||||
</div>
|
||||
|
||||
<div class="empty-get" id="emptyGet">
|
||||
<div class="empty-art" aria-hidden="true"><img src="assets/mark.svg" alt="" width="120" height="100" /></div>
|
||||
<h1>Paste a link to begin</h1>
|
||||
<p>Drop in anything you have the rights to keep. Atmosphere reads it, shows you exactly what's available, and saves it tagged and named.</p>
|
||||
<ul class="examples">
|
||||
<li><span class="i" data-icon="music"></span><div><strong>A track or video</strong><span>Saved as one file, with its cover and details.</span></div></li>
|
||||
<li><span class="i" data-icon="disc"></span><div><strong>An album, EP or playlist</strong><span>Detected, numbered in order, kept in one folder.</span></div></li>
|
||||
<li><span class="i" data-icon="user-circle"></span><div><strong>A profile or channel</strong><span>Every upload, listed so you can pick.</span></div></li>
|
||||
</ul>
|
||||
<p class="hint">Tip: drag a link onto this window, or press <kbd>Ctrl V</kbd> anywhere.</p>
|
||||
</div>
|
||||
|
||||
<article class="sheet" id="sheet" hidden></article>
|
||||
</div>
|
||||
|
||||
<footer class="commit" id="commit" hidden>
|
||||
<button class="save-as" id="saveAsBtn" aria-haspopup="dialog" aria-expanded="false">
|
||||
<span class="save-as-label">Save as</span>
|
||||
<span class="save-as-value" id="saveAsValue">Best quality</span>
|
||||
<span class="i" data-icon="chevron-down"></span>
|
||||
</button>
|
||||
<button class="dest" id="destBtn" title="Change where downloads are saved">
|
||||
<span class="i" data-icon="folder"></span>
|
||||
<span class="dest-path" id="destPath"></span>
|
||||
</button>
|
||||
<select id="destPlaylist" class="dest-playlist" aria-label="Also add to a playlist" title="Also add finished downloads to a playlist folder"><option value="">No playlist</option></select>
|
||||
<label class="attest">
|
||||
<input type="checkbox" id="attest" />
|
||||
<span id="attestText">I have the rights to this</span>
|
||||
</label>
|
||||
<button class="btn primary big" id="downloadBtn" disabled>Download</button>
|
||||
</footer>
|
||||
</section>
|
||||
|
||||
<section class="view view-library" data-view="library" hidden>
|
||||
<div class="lib-scroll" id="libScroll"><div id="libView"></div></div>
|
||||
</section>
|
||||
|
||||
<section class="view view-downloads" data-view="downloads" hidden>
|
||||
<header class="view-head">
|
||||
<div>
|
||||
<h1>Downloads</h1>
|
||||
<p class="view-sub" id="downloadsSub">Nothing in progress</p>
|
||||
</div>
|
||||
<div class="row">
|
||||
<button class="btn" id="openFolderBtn"><span class="i" data-icon="folder-open"></span>Open folder</button>
|
||||
<button class="btn danger-ghost" id="cancelAllBtn" hidden>Cancel all</button>
|
||||
</div>
|
||||
</header>
|
||||
<div class="downloads-scroll">
|
||||
<section id="activeGroups" class="groups"></section>
|
||||
<section class="history" id="historySection">
|
||||
<div class="history-head">
|
||||
<h2>Recent</h2>
|
||||
<button class="link-btn" id="clearHistory">Clear history</button>
|
||||
</div>
|
||||
<div id="historyList"></div>
|
||||
</section>
|
||||
<div class="empty-downloads" id="emptyDownloads">
|
||||
<span class="i" data-icon="arrow-down-circle"></span>
|
||||
<h2>Nothing here yet</h2>
|
||||
<p>Files you download appear here, with a shortcut to find them on disk.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="view view-settings" data-view="settings" hidden>
|
||||
<header class="view-head">
|
||||
<div><h1>Settings</h1><p class="view-sub">Changes save as you make them.</p></div>
|
||||
<span class="saved" id="savedFlag" aria-live="polite"></span>
|
||||
</header>
|
||||
<div class="settings-scroll">
|
||||
<div class="settings">
|
||||
<h2 id="set-files">Files</h2>
|
||||
<div class="group">
|
||||
<div class="setting">
|
||||
<div><strong>Save to</strong><span id="setDir"></span></div>
|
||||
<button class="btn" id="setDirBtn">Change…</button>
|
||||
</div>
|
||||
<label class="setting"><div><strong>Give albums and playlists their own folder</strong><span>Named “Artist - Album”, or after the playlist.</span></div><input type="checkbox" class="switch" data-key="collectionFolders" /></label>
|
||||
<label class="setting"><div><strong>Number tracks in albums and playlists</strong><span>Keeps files sorted in their original order.</span></div><input type="checkbox" class="switch" data-key="numberTracks" /></label>
|
||||
<div class="setting stack">
|
||||
<div><strong>File names</strong><span>Click a token to add it. Preview: <code id="templatePreview"></code></span></div>
|
||||
<input class="text" data-key="filenameTemplate" id="templateInput" spellcheck="false" />
|
||||
<div class="tokens" id="tokens"></div>
|
||||
</div>
|
||||
<label class="setting"><div><strong>Skip anything downloaded before</strong><span>Remembers what you've saved, even after files are moved.</span></div><input type="checkbox" class="switch" data-key="skipDownloaded" /></label>
|
||||
<div class="setting">
|
||||
<div><strong>Downloads at once</strong><span>Albums and playlists always start in track order.</span></div>
|
||||
<div class="stepper"><button type="button" data-step="-1" aria-label="Fewer">−</button><output id="concValue">3</output><button type="button" data-step="1" aria-label="More">+</button></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 id="set-library">Library</h2>
|
||||
<div class="group" id="libFolders"></div>
|
||||
<div class="group gap-top">
|
||||
<div class="setting"><div><strong>Playlist folders live in</strong><span id="playlistsDir"></span></div></div>
|
||||
<div class="setting" id="hiddenSongs"></div>
|
||||
<label class="setting"><div><strong>Copy songs into playlists</strong><span>Off: songs are hard-linked, so they appear in the folder without using extra space (same drive only). On: real copies, which are best for syncing to phones and USB drives.</span></div><input type="checkbox" class="switch" data-key="playlistCopy" /></label>
|
||||
</div>
|
||||
|
||||
<h2 id="set-lyrics">Lyrics</h2>
|
||||
<p class="set-note">Sources are tried top to bottom until synced lyrics are found. Reorder them with the arrows.</p>
|
||||
<div class="group" id="lyricsProviders"></div>
|
||||
<div class="group gap-top">
|
||||
<div class="setting"><div><strong>Musixmatch API key</strong><span>A developer API key from developer.musixmatch.com (free tier available). Stays on this device.</span></div><input class="text" type="password" data-key="musixmatchKey" placeholder="Not set" spellcheck="false" autocomplete="off" /></div>
|
||||
<label class="setting"><div><strong>Save lyrics with downloads</strong><span>Writes a synced .lrc file next to each song you download, when lyrics are found.</span></div><input type="checkbox" class="switch" data-key="lyricsOnDownload" /></label>
|
||||
</div>
|
||||
<h2 class="sub">Custom sources</h2>
|
||||
<div class="group" id="customProviders"></div>
|
||||
|
||||
<h2 id="set-tags">Tags</h2>
|
||||
<div class="group">
|
||||
<label class="setting"><div><strong>Write metadata and cover art</strong><span>Title, artist, album, track number, date and artwork, plus any edits you make.</span></div><input type="checkbox" class="switch" data-key="embedMetadata" /></label>
|
||||
<label class="setting"><div><strong>Keep chapters</strong><span>When the source has them (mixes, long videos).</span></div><input type="checkbox" class="switch" data-key="embedChapters" /></label>
|
||||
</div>
|
||||
|
||||
<h2 id="set-video">Video</h2>
|
||||
<div class="group">
|
||||
<label class="setting"><div><strong>Embed subtitles</strong><span>When available, in these languages:</span></div><input type="checkbox" class="switch" data-key="embedSubtitles" /></label>
|
||||
<div class="setting"><div><strong>Subtitle languages</strong><span>Comma-separated codes, e.g. <code>en,es</code></span></div><input class="text short" data-key="subtitleLangs" spellcheck="false" /></div>
|
||||
<label class="setting"><div><strong>Cut sponsor segments</strong><span>Uses SponsorBlock on YouTube. Audio downloads also drop non-music sections.</span></div><input type="checkbox" class="switch" data-key="sponsorblock" /></label>
|
||||
</div>
|
||||
|
||||
<h2 id="set-engine">Engine</h2>
|
||||
<div class="group" id="engineGroup">
|
||||
<div class="setting tool" id="toolYtdlp"></div>
|
||||
<div class="setting tool" id="toolFfmpeg"></div>
|
||||
<details class="setting advanced">
|
||||
<summary><strong>Use my own copies</strong><span>Point to yt-dlp or ffmpeg you've installed yourself.</span></summary>
|
||||
<div class="adv-fields">
|
||||
<label><span>yt-dlp path</span><input class="text" data-key="ytdlpPath" placeholder="Managed by Atmosphere" spellcheck="false" /></label>
|
||||
<label><span>ffmpeg path</span><input class="text" data-key="ffmpegPath" placeholder="Managed by Atmosphere" spellcheck="false" /></label>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
|
||||
<h2 id="set-network">Network & sign-in</h2>
|
||||
<div class="group">
|
||||
<div class="setting">
|
||||
<div><strong>Use my browser sign-in</strong><span>Lets Atmosphere reach content your account can already see, like your own private uploads. Your sign-in stays in your browser.</span></div>
|
||||
<select data-key="cookiesBrowser">
|
||||
<option value="">Off</option><option value="chrome">Chrome</option><option value="edge">Edge</option><option value="firefox">Firefox</option><option value="brave">Brave</option><option value="opera">Opera</option><option value="vivaldi">Vivaldi</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="setting"><div><strong>Speed limit</strong><span>Blank for no limit. For example <code>2M</code> is 2 MB/s.</span></div><input class="text short" data-key="rateLimit" placeholder="No limit" spellcheck="false" /></div>
|
||||
<div class="setting"><div><strong>Proxy</strong><span>For example <code>socks5://127.0.0.1:1080</code></span></div><input class="text" data-key="proxy" placeholder="None" spellcheck="false" /></div>
|
||||
</div>
|
||||
|
||||
<h2 id="set-app">App</h2>
|
||||
<div class="group">
|
||||
<div class="setting">
|
||||
<div><strong>Appearance</strong><span>Follows Windows unless you choose.</span></div>
|
||||
<div class="seg" data-seg="theme"><button type="button" data-value="system">System</button><button type="button" data-value="light">Light</button><button type="button" data-value="dark">Dark</button></div>
|
||||
</div>
|
||||
<label class="setting"><div><strong>Offer copied links</strong><span>When you switch to Atmosphere with a link copied, offer to fetch it.</span></div><input type="checkbox" class="switch" data-key="watchClipboard" /></label>
|
||||
</div>
|
||||
|
||||
<h2 id="set-storage">Storage</h2>
|
||||
<p class="set-note">Temporary files are removed automatically on every launch and exit. Here's everything else Atmosphere keeps.</p>
|
||||
<div class="group" id="storageList"></div>
|
||||
|
||||
<h2 id="set-rights">Your responsibility</h2>
|
||||
<div class="group">
|
||||
<div class="setting">
|
||||
<div><strong>Rights acknowledgment</strong><span id="rightsInfo"></span></div>
|
||||
<button class="btn danger-ghost" id="revokeBtn">Withdraw</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer class="player idle" id="player">
|
||||
<div class="np">
|
||||
<div id="npArt"></div>
|
||||
<div class="np-text"><button class="np-title link" id="npTitle">Nothing playing</button><span class="np-artist" id="npArtist"></span></div>
|
||||
<span id="npLike"></span>
|
||||
</div>
|
||||
<div class="transport">
|
||||
<div class="controls">
|
||||
<button class="icon-btn" id="shuffleBtn" aria-label="Shuffle" aria-pressed="false" title="Shuffle"><span class="i" data-icon="arrows-shuffle"></span></button>
|
||||
<button class="icon-btn" id="prevBtn" aria-label="Previous" title="Previous (Ctrl ←)"><span class="i" data-icon="player-skip-back-filled"></span></button>
|
||||
<button class="play-btn" id="playBtn" aria-label="Play"></button>
|
||||
<button class="icon-btn" id="nextBtn" aria-label="Next" title="Next (Ctrl →)"><span class="i" data-icon="player-skip-forward-filled"></span></button>
|
||||
<button class="icon-btn" id="repeatBtn" aria-label="Repeat" aria-pressed="false"></button>
|
||||
</div>
|
||||
<div class="seek-row"><span class="time" id="tCur">0:00</span><input type="range" id="seek" class="range" min="0" max="1000" value="0" aria-label="Seek" /><span class="time" id="tDur">0:00</span></div>
|
||||
</div>
|
||||
<div class="np-tools">
|
||||
<button class="icon-btn" id="fxBtn" aria-label="Sound and effects" aria-pressed="false" aria-expanded="false" title="Sound, presets, pitch and tempo"><span class="i" data-icon="adjustments-horizontal"></span></button>
|
||||
<button class="icon-btn" id="lyricsBtn" aria-label="Lyrics" aria-pressed="false" title="Lyrics (L)"><span class="i" data-icon="microphone"></span></button>
|
||||
<button class="icon-btn" id="queueBtn" aria-label="Queue" aria-pressed="false" title="Queue (Q)"><span class="i" data-icon="list"></span></button>
|
||||
<button class="icon-btn" id="tvBtn" aria-label="TV mode" title="TV mode (F)"><span class="i" data-icon="device-tv"></span></button>
|
||||
<button class="icon-btn" id="muteBtn" aria-label="Mute"></button>
|
||||
<input type="range" id="volume" class="range vol" min="0" max="100" value="85" aria-label="Volume" />
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<aside class="drawer-panel" id="lyricsPanel" aria-label="Lyrics" hidden></aside>
|
||||
<aside class="drawer-panel" id="queuePanel" aria-label="Queue" hidden></aside>
|
||||
<div class="fx" id="fxPanel" role="dialog" aria-label="Sound and effects" hidden></div>
|
||||
<div class="tv" id="tv" hidden></div>
|
||||
|
||||
<div class="save-menu" id="saveMenu" role="dialog" aria-label="Save as" hidden></div>
|
||||
<div class="menu" id="typeMenu" role="menu" hidden></div>
|
||||
|
||||
<div class="onboarding" id="onboarding" hidden>
|
||||
<div class="ob-card">
|
||||
<img class="ob-mark" src="assets/mark.svg" alt="" width="96" height="80" />
|
||||
<ol class="ob-steps" aria-label="Setup steps"><li class="on" id="obStep1Dot">Your responsibility</li><li id="obStep2Dot">Engine</li></ol>
|
||||
|
||||
<section class="ob-step" id="obStep1">
|
||||
<h1>Welcome to Atmosphere</h1>
|
||||
<p class="lede">It saves audio and video you're allowed to keep. Before you start, please confirm each of these.</p>
|
||||
<label class="pledge"><input type="checkbox" class="pledge-check" /><span>I'll only download media I <b>own</b>, that the <b>rights holder has allowed</b> me to download, or that's under a licence that permits it, such as artist-enabled downloads or Creative Commons.</span></label>
|
||||
<label class="pledge"><input type="checkbox" class="pledge-check" /><span>I understand that downloading without permission can infringe copyright and break a site's terms, and that <b>I'm responsible</b> for how I use Atmosphere.</span></label>
|
||||
<label class="pledge"><input type="checkbox" class="pledge-check" /><span>I won't share downloaded media unless its licence or the rights holder allows it.</span></label>
|
||||
<p class="fine">Atmosphere never bypasses DRM or paywalls, and skips preview-only media.</p>
|
||||
<button class="btn primary big wide" id="obAccept" disabled>Agree and continue</button>
|
||||
</section>
|
||||
|
||||
<section class="ob-step" id="obStep2" hidden>
|
||||
<h1>Set up the engine</h1>
|
||||
<p class="lede">Atmosphere uses two trusted open-source tools: <b>yt-dlp</b> reads links from 1,000+ sites, and <b>ffmpeg</b> converts and tags files. Both are downloaded from their official releases and checksum-verified.</p>
|
||||
<div class="ob-tools" id="obTools"></div>
|
||||
<div class="row end">
|
||||
<button class="btn ghost" id="obSkip">I'll do this later</button>
|
||||
<button class="btn primary big" id="obInstall">Set up both</button>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="toasts" id="toasts" aria-live="polite"></div>
|
||||
|
||||
<script src="icons.js"></script>
|
||||
<script src="app.js"></script>
|
||||
<script src="player.js"></script>
|
||||
<script src="library.js"></script>
|
||||
<script src="nowplaying.js"></script>
|
||||
<script src="lyrics.js"></script>
|
||||
<script src="stats.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,921 @@
|
||||
/* atmosphere · library.js · Library views (songs, albums, artists, playlists, liked), context menu, dialogs and library/storage settings. */
|
||||
const Lib = {
|
||||
data: null,
|
||||
byId: new Map(),
|
||||
songs: [],
|
||||
albums: new Map(),
|
||||
artists: new Map(),
|
||||
liked: new Set(),
|
||||
plays: {},
|
||||
route: { name: "songs" },
|
||||
back: [],
|
||||
filter: "",
|
||||
sort: { key: "artist", dir: 1 },
|
||||
scan: null,
|
||||
drawSongs: null,
|
||||
sel: new Set(),
|
||||
anchor: -1,
|
||||
currentList: [],
|
||||
};
|
||||
|
||||
const lnorm = (s) => (s || "").trim().toLowerCase();
|
||||
const primaryArtist = (s) => (s || "").split(/\s*(?:,|;|\bfeat\.?|\bft\.?|\bfeaturing\b)\s*/i)[0].trim() || "Unknown artist";
|
||||
const artistsOf = (t) => [...new Set([t.albumArtist, ...(t.artist || "").split(/\s*(?:,|;|\bfeat\.?|\bft\.?|\bfeaturing\b)\s*/i)].map((x) => (x || "").trim()).filter(Boolean))];
|
||||
const sig = (t) => `${lnorm(t.title)}|${lnorm(primaryArtist(t.artist))}|${Math.round((t.durationMs || 0) / 2000)}`;
|
||||
const albumKind = (a) => {
|
||||
const mins = a.duration / 60000;
|
||||
return a.tracks.length <= 3 && mins < 30 ? "Single" : a.tracks.length <= 6 && mins < 30 ? "EP" : "Album";
|
||||
};
|
||||
|
||||
function buildIndexes(snap) {
|
||||
Lib.data = snap;
|
||||
Lib.byId = new Map(snap.tracks.map((t) => [t.id, t]));
|
||||
Lib.liked = new Set(snap.liked);
|
||||
Lib.plays = snap.plays || {};
|
||||
const main = new Set(snap.tracks.filter((t) => !t.playlist).map(sig));
|
||||
Lib.songs = snap.tracks.filter((t) => !t.playlist || !main.has(sig(t)));
|
||||
const albums = new Map();
|
||||
for (const t of Lib.songs) {
|
||||
if (!t.album) continue;
|
||||
const artist = t.albumArtist || primaryArtist(t.artist);
|
||||
const key = `${lnorm(artist)}|${lnorm(t.album)}`;
|
||||
let a = albums.get(key);
|
||||
if (!a) albums.set(key, (a = { key, title: t.album, artist, year: t.year, art: t.art, tracks: [], duration: 0 }));
|
||||
a.tracks.push(t);
|
||||
a.duration += t.durationMs || 0;
|
||||
a.art ||= t.art;
|
||||
a.year ||= t.year;
|
||||
}
|
||||
for (const a of albums.values()) a.tracks.sort((x, y) => (x.discNo || 1) - (y.discNo || 1) || (x.trackNo || 999) - (y.trackNo || 999) || x.title.localeCompare(y.title));
|
||||
Lib.albums = albums;
|
||||
const metaByName = new Map(Object.values(snap.artists || {}).map((m) => [lnorm(m.name), m]));
|
||||
const artists = new Map();
|
||||
const touch = (name) => {
|
||||
const k = lnorm(name);
|
||||
if (!artists.has(k)) artists.set(k, { key: k, name, meta: metaByName.get(k) || null, albums: [], tracks: [], appearsOn: [] });
|
||||
return artists.get(k);
|
||||
};
|
||||
for (const a of albums.values()) touch(a.artist).albums.push(a);
|
||||
for (const t of Lib.songs) for (const n of artistsOf(t)) touch(n).tracks.push(t);
|
||||
for (const a of albums.values()) {
|
||||
for (const n of new Set(a.tracks.flatMap(artistsOf))) {
|
||||
const ar = artists.get(lnorm(n));
|
||||
if (ar && lnorm(a.artist) !== ar.key && !ar.appearsOn.includes(a)) ar.appearsOn.push(a);
|
||||
}
|
||||
}
|
||||
for (const ar of artists.values()) ar.albums.sort((x, y) => (y.year || 0) - (x.year || 0));
|
||||
Lib.artists = artists;
|
||||
}
|
||||
|
||||
async function loadLibrary() {
|
||||
const snap = await invoke("library_get").catch(() => null);
|
||||
if (!snap) return;
|
||||
buildIndexes(snap);
|
||||
for (const id of [...Lib.sel]) if (!Lib.byId.has(id)) Lib.sel.delete(id);
|
||||
if (!Lib.restored) {
|
||||
Lib.restored = true;
|
||||
Player.restore((id) => Lib.byId.get(id));
|
||||
if (Lib.songs.length && state.view === "get" && !state.collections.length) openLib("songs", null, false);
|
||||
} else {
|
||||
Player.refreshTracks((id) => Lib.byId.get(id) || null);
|
||||
}
|
||||
renderPlaylistNav();
|
||||
if (state.view === "library") renderLib(true);
|
||||
if (typeof updateCommit === "function") updateCommit();
|
||||
}
|
||||
|
||||
const artistImage = (ar) => ar?.meta?.image || ar?.albums.find((a) => a.art)?.art || ar?.tracks.find((t) => t.art)?.art || null;
|
||||
|
||||
function cover(key, cls, alt = "") {
|
||||
return art(artUrl(key), cls, alt);
|
||||
}
|
||||
|
||||
/* routing */
|
||||
function openLib(name, id = null, push = true) {
|
||||
if (push && state.view === "library") Lib.back.push(Lib.route);
|
||||
Lib.route = { name, id };
|
||||
Lib.filter = "";
|
||||
go("library");
|
||||
renderLib();
|
||||
}
|
||||
|
||||
function libBack() {
|
||||
const prev = Lib.back.pop();
|
||||
if (prev) {
|
||||
Lib.route = prev;
|
||||
renderLib();
|
||||
}
|
||||
}
|
||||
|
||||
function markLibNav() {
|
||||
const r = Lib.route;
|
||||
$$("[data-lib]").forEach((b) => (state.view === "library" && (b.dataset.lib === r.name || (r.name === "album" && b.dataset.lib === "albums") || (r.name === "artist" && b.dataset.lib === "artists")) ? b.setAttribute("aria-current", "page") : b.removeAttribute("aria-current")));
|
||||
$$("#playlistNav .nav-item").forEach((b) => (state.view === "library" && r.name === "playlist" && b.dataset.playlist === r.id ? b.setAttribute("aria-current", "page") : b.removeAttribute("aria-current")));
|
||||
}
|
||||
|
||||
/* playback helpers */
|
||||
function playList(list, i = 0, shuffle = null) {
|
||||
if (!list.length) return toast("Nothing to play here yet.", "err");
|
||||
Player.setQueue(list, i, shuffle);
|
||||
}
|
||||
|
||||
/* track rows */
|
||||
function likeBtn(t) {
|
||||
const on = Lib.liked.has(t.id);
|
||||
return h("button", { class: `icon-btn like ${on ? "on" : ""}`, "aria-label": on ? "Unlike" : "Like", "aria-pressed": String(on), onclick: (e) => { e.stopPropagation(); toggleLike(t); } }, icon(on ? "heart-filled" : "heart"));
|
||||
}
|
||||
|
||||
async function toggleLike(t) {
|
||||
const on = !Lib.liked.has(t.id);
|
||||
on ? Lib.liked.add(t.id) : Lib.liked.delete(t.id);
|
||||
await invoke("track_like", { id: t.id, liked: on }).catch(() => {});
|
||||
$$(`.lt-row[data-id="${t.id}"] .like`).forEach((b) => b.replaceWith(likeBtn(t)));
|
||||
updatePlayerBar();
|
||||
if (Lib.route.name === "liked") renderLib(true);
|
||||
}
|
||||
|
||||
function artistLinks(t) {
|
||||
const names = artistsOf({ ...t, albumArtist: "" });
|
||||
const wrap = h("span", { class: "links" });
|
||||
names.forEach((n, i) => {
|
||||
if (i) wrap.append(", ");
|
||||
wrap.append(h("button", { class: "link", onclick: (e) => { e.stopPropagation(); openLib("artist", lnorm(n)); } }, n));
|
||||
});
|
||||
return wrap;
|
||||
}
|
||||
|
||||
function trackRow(t, i, ctx) {
|
||||
const playing = Player.current?.id === t.id;
|
||||
const label = ctx.numbers ? String(ctx.numbers(t, i)) : String(i + 1);
|
||||
const row = h("div", { class: `lt-row ${playing ? "playing" : ""} ${ctx.cover ? "with-cover" : ""} ${Lib.sel.has(t.id) ? "sel" : ""}`, role: "row", "aria-selected": String(Lib.sel.has(t.id)), "data-id": t.id, "data-i": i, "data-num": label, draggable: "true", tabindex: "-1",
|
||||
onclick: (e) => selectRow(e, t, i, ctx),
|
||||
ondblclick: () => playList(ctx.list, i),
|
||||
oncontextmenu: (e) => { e.preventDefault(); if (!Lib.sel.has(t.id)) selectRow({}, t, i, ctx); trackMenu(e, t, ctx, i); },
|
||||
onkeydown: (e) => { if (e.key === "Enter") playList(ctx.list, i); },
|
||||
},
|
||||
h("span", { class: "lt-num" }, playing ? eqBars() : label,
|
||||
h("button", { class: "lt-play", "aria-label": `Play ${t.title}`, onclick: (e) => { e.stopPropagation(); playList(ctx.list, i); } }, icon("player-play-filled"))),
|
||||
ctx.cover ? cover(t.art, "lt-cover") : null,
|
||||
h("div", { class: "lt-main" }, h("span", { class: "lt-title" }, t.title), ctx.hideArtist && !ctx.showArtistFor?.(t) ? null : h("span", { class: "lt-sub" }, artistLinks(t))),
|
||||
ctx.hideAlbum ? h("span") : h("span", { class: "lt-album" }, t.album ? h("button", { class: "link", onclick: (e) => { e.stopPropagation(); openLib("album", `${lnorm(t.albumArtist || primaryArtist(t.artist))}|${lnorm(t.album)}`); } }, t.album) : ""),
|
||||
likeBtn(t),
|
||||
h("span", { class: "lt-dur" }, fmtDur(t.durationMs)),
|
||||
ctx.playlist ? h("button", { class: "icon-btn", "aria-label": "Remove from playlist", onclick: (e) => { e.stopPropagation(); removeFromPlaylist(ctx.playlist, [t]); } }, icon("x")) : h("button", { class: "icon-btn", "aria-label": "More", onclick: (e) => { e.stopPropagation(); trackMenu(e, t, ctx, i); } }, icon("dots"))
|
||||
);
|
||||
row.addEventListener("dragstart", (e) => {
|
||||
const ids = Lib.sel.has(t.id) && Lib.sel.size > 1 ? [...Lib.sel] : [t.id];
|
||||
e.dataTransfer.setData("application/x-atmo-tracks", JSON.stringify(ids));
|
||||
e.dataTransfer.setData("text/plain", t.title);
|
||||
e.dataTransfer.effectAllowed = "copyMove";
|
||||
});
|
||||
return row;
|
||||
}
|
||||
|
||||
const eqBars = () => h("span", { class: "eqbars", "aria-label": "Now playing" }, h("i"), h("i"), h("i"));
|
||||
|
||||
function selectRow(e, t, i, ctx) {
|
||||
Lib.currentList = ctx.list;
|
||||
if (e.shiftKey && Lib.anchor >= 0) {
|
||||
const [a, b] = [Math.min(Lib.anchor, i), Math.max(Lib.anchor, i)];
|
||||
if (!(e.ctrlKey || e.metaKey)) Lib.sel.clear();
|
||||
ctx.list.slice(a, b + 1).forEach((x) => Lib.sel.add(x.id));
|
||||
} else if (e.ctrlKey || e.metaKey) {
|
||||
Lib.sel.has(t.id) ? Lib.sel.delete(t.id) : Lib.sel.add(t.id);
|
||||
Lib.anchor = i;
|
||||
} else {
|
||||
Lib.sel = new Set([t.id]);
|
||||
Lib.anchor = i;
|
||||
}
|
||||
markSelection();
|
||||
}
|
||||
|
||||
function markSelection() {
|
||||
$$(".lt-row").forEach((r) => {
|
||||
const on = Lib.sel.has(r.dataset.id);
|
||||
r.classList.toggle("sel", on);
|
||||
r.setAttribute("aria-selected", String(on));
|
||||
});
|
||||
}
|
||||
|
||||
function selectedTracks(fallback) {
|
||||
const picked = [...Lib.sel].map((id) => Lib.byId.get(id)).filter(Boolean);
|
||||
return picked.length && (!fallback || Lib.sel.has(fallback.id)) ? picked : fallback ? [fallback] : [];
|
||||
}
|
||||
|
||||
function playlistsContaining(t) {
|
||||
const key = sig(t);
|
||||
return (Lib.data?.playlists || []).map((p) => ({ p, copies: p.order.map((id) => Lib.byId.get(id)).filter((x) => x && sig(x) === key) })).filter((x) => x.copies.length);
|
||||
}
|
||||
|
||||
const songs = (n) => (n === 1 ? "song" : `${n} songs`);
|
||||
|
||||
async function deleteTracks(tracks) {
|
||||
if (!tracks.length) return;
|
||||
const inPlaylists = tracks.some((t) => !t.playlist && playlistsContaining(t).length);
|
||||
const box = h("input", { type: "checkbox", class: "box" });
|
||||
box.checked = true;
|
||||
const body = h("div", { class: "stack" },
|
||||
h("p", { class: "muted" }, `${tracks.length === 1 ? `“${tracks[0].title}”` : songs(tracks.length)} will be moved to your ${isMac ? "Trash" : "Recycle Bin"}, along with any lyrics files, so you can restore them from there if you change your mind.`),
|
||||
inPlaylists ? h("label", { class: "check-row" }, box, h("span", {}, "Also remove them from your playlists")) : null);
|
||||
const ok = await modal(tracks.length === 1 ? "Delete this song from your device?" : `Delete ${tracks.length} songs from your device?`, body, [{ label: "Cancel", value: false }, { label: "Delete", value: true, primary: true }]);
|
||||
if (!ok) return;
|
||||
try {
|
||||
const n = await invoke("tracks_delete", { ids: tracks.map((t) => t.id), playlists: inPlaylists && box.checked });
|
||||
Lib.sel.clear();
|
||||
toast(`Deleted ${songs(n)}. ${isMac ? "Trash" : "Recycle Bin"} has them if you need them back.`, "ok");
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
async function hideTracks(tracks) {
|
||||
if (!tracks.length) return;
|
||||
const n = await invoke("tracks_hide", { ids: tracks.map((t) => t.id) }).catch((e) => (toast(errText(e), "err"), 0));
|
||||
Lib.sel.clear();
|
||||
if (n) toast(`Removed ${songs(n)} from your library. The files are still on your drive; restore them in Settings → Library.`, "ok");
|
||||
}
|
||||
|
||||
function trackList(list, ctx = {}) {
|
||||
ctx.list = ctx.list || list;
|
||||
const wrap = h("div", { class: "lt", role: "table" });
|
||||
list.forEach((t, i) => {
|
||||
const at = ctx.list.indexOf(t);
|
||||
wrap.append(trackRow(t, at >= 0 ? at : i, ctx));
|
||||
});
|
||||
if (ctx.playlist) enableReorder(wrap, ctx.playlist);
|
||||
return wrap;
|
||||
}
|
||||
|
||||
function markPlaying() {
|
||||
const id = Player.current?.id;
|
||||
$$(".lt-row").forEach((r) => {
|
||||
const on = r.dataset.id === id;
|
||||
if (on === r.classList.contains("playing")) return;
|
||||
r.classList.toggle("playing", on);
|
||||
const num = r.querySelector(".lt-num");
|
||||
const play = num.querySelector(".lt-play");
|
||||
num.replaceChildren(on ? eqBars() : r.dataset.num, play);
|
||||
});
|
||||
}
|
||||
|
||||
/* context menu */
|
||||
function closeMenus() {
|
||||
$$(".ctx").forEach((m) => m.remove());
|
||||
}
|
||||
|
||||
function menuAt(x, y, items) {
|
||||
closeMenus();
|
||||
const m = h("div", { class: "menu ctx", role: "menu" });
|
||||
for (const it of items) {
|
||||
if (it === "-") m.append(h("div", { class: "menu-divider" }));
|
||||
else if (it) m.append(h("button", { role: "menuitem", class: `${it.sub ? "has-sub" : ""} ${it.danger ? "danger" : ""}`, disabled: it.disabled, onclick: (e) => { if (it.sub) { e.stopPropagation(); const r = e.currentTarget.getBoundingClientRect(); menuAt(r.right + 4, r.top - 6, it.sub()); } else { closeMenus(); it.run(); } } }, h("span", {}, it.label), it.sub ? icon("chevron-down") : it.hint ? h("kbd", {}, it.hint) : null));
|
||||
}
|
||||
document.body.append(m);
|
||||
const w = m.offsetWidth, hgt = m.offsetHeight;
|
||||
m.style.left = `${Math.min(x, innerWidth - w - 8)}px`;
|
||||
m.style.top = `${Math.min(y, innerHeight - hgt - 8)}px`;
|
||||
m.querySelector("button")?.focus();
|
||||
return m;
|
||||
}
|
||||
|
||||
document.addEventListener("click", (e) => { if (!e.target.closest(".ctx")) closeMenus(); });
|
||||
document.addEventListener("keydown", (e) => { if (e.key === "Escape") closeMenus(); });
|
||||
|
||||
function playlistItems(tracks) {
|
||||
return () => [
|
||||
...(Lib.data?.playlists || []).map((p) => ({ label: p.name, run: () => addToPlaylist(p.name, tracks) })),
|
||||
(Lib.data?.playlists || []).length ? "-" : null,
|
||||
{ label: "New playlist…", run: () => newPlaylist(tracks) },
|
||||
];
|
||||
}
|
||||
|
||||
function trackMenu(e, t, ctx, i) {
|
||||
const albumKey = t.album ? `${lnorm(t.albumArtist || primaryArtist(t.artist))}|${lnorm(t.album)}` : null;
|
||||
const many = selectedTracks(t);
|
||||
if (many.length > 1) {
|
||||
const inList = ctx.playlist ? many.filter((x) => x.playlist === ctx.playlist) : [];
|
||||
return menuAt(e.clientX, e.clientY, [
|
||||
{ label: `Play ${many.length} songs`, run: () => playList(many, 0, false) },
|
||||
{ label: "Play next", run: () => Player.playNext(many) },
|
||||
{ label: "Add to queue", run: () => Player.addToQueue(many) },
|
||||
"-",
|
||||
{ label: "Add to playlist", sub: playlistItems(many) },
|
||||
inList.length ? { label: `Remove ${inList.length} from this playlist`, run: () => removeFromPlaylist(ctx.playlist, inList) } : null,
|
||||
"-",
|
||||
{ label: `Remove ${many.length} from library`, run: () => hideTracks(many) },
|
||||
{ label: `Delete ${many.length} from device…`, danger: true, run: () => deleteTracks(many) },
|
||||
]);
|
||||
}
|
||||
const holders = playlistsContaining(t).filter((x) => x.p.name !== ctx.playlist);
|
||||
menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Play", run: () => playList(ctx.list, i) },
|
||||
{ label: "Play next", run: () => Player.playNext([t]) },
|
||||
{ label: "Add to queue", run: () => Player.addToQueue([t]) },
|
||||
"-",
|
||||
{ label: "Add to playlist", sub: playlistItems([t]) },
|
||||
{ label: Lib.liked.has(t.id) ? "Unlike" : "Like", run: () => toggleLike(t) },
|
||||
"-",
|
||||
albumKey && { label: "Go to album", run: () => openLib("album", albumKey) },
|
||||
{ label: "Go to artist", run: () => openLib("artist", lnorm(t.albumArtist || primaryArtist(t.artist))) },
|
||||
"-",
|
||||
{ label: "Edit info…", run: () => editInfo(t) },
|
||||
{ label: "Show lyrics", run: () => { if (Player.current?.id !== t.id) playList(ctx.list, i); openLyrics(); } },
|
||||
{ label: "Show in folder", run: () => invoke("reveal", { path: t.path }) },
|
||||
"-",
|
||||
ctx.playlist && t.playlist === ctx.playlist ? { label: "Remove from this playlist", run: () => removeFromPlaylist(ctx.playlist, [t]) } : null,
|
||||
holders.length ? { label: "Remove from playlist", sub: () => holders.map(({ p, copies }) => ({ label: p.name, run: () => removeFromPlaylist(p.name, copies) })) } : null,
|
||||
t.playlist ? null : { label: "Remove from library", run: () => hideTracks([t]) },
|
||||
{ label: t.playlist ? "Delete this copy from device…" : "Delete from device…", danger: true, run: () => deleteTracks([t]) },
|
||||
]);
|
||||
}
|
||||
|
||||
/* playlists */
|
||||
function renderPlaylistNav() {
|
||||
const nav = $("#playlistNav");
|
||||
const lists = Lib.data?.playlists || [];
|
||||
nav.replaceChildren(
|
||||
...lists.map((p) => {
|
||||
const b = h("button", { class: "nav-item small", "data-playlist": p.name, onclick: () => openLib("playlist", p.name) }, icon("playlist"), h("span", { class: "nav-label" }, p.name), h("span", { class: "nav-meta" }, String(p.order.length)));
|
||||
b.addEventListener("dragover", (e) => { if (e.dataTransfer.types.includes("application/x-atmo-tracks")) { e.preventDefault(); b.classList.add("drop"); } });
|
||||
b.addEventListener("dragleave", () => b.classList.remove("drop"));
|
||||
b.addEventListener("drop", (e) => {
|
||||
e.preventDefault();
|
||||
b.classList.remove("drop");
|
||||
const ids = JSON.parse(e.dataTransfer.getData("application/x-atmo-tracks") || "[]");
|
||||
addToPlaylist(p.name, ids.map((id) => Lib.byId.get(id)).filter(Boolean));
|
||||
});
|
||||
return b;
|
||||
})
|
||||
);
|
||||
$("#playlistEmpty").hidden = lists.length > 0;
|
||||
markLibNav();
|
||||
}
|
||||
|
||||
async function addToPlaylist(name, tracks) {
|
||||
if (!tracks.length) return;
|
||||
try {
|
||||
const n = await invoke("playlist_add", { name, ids: tracks.map((t) => t.id) });
|
||||
toast(n ? `Added ${plural(n, "song")} to ${name}` : `Already in ${name}`, "ok");
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
async function removeFromPlaylist(name, tracks) {
|
||||
const ok = await confirmBox(`Remove ${tracks.length === 1 ? `“${tracks[0].title}”` : plural(tracks.length, "song")} from ${name}?`, `The playlist's copy goes to your ${isMac ? "Trash" : "Recycle Bin"}. The song stays in your library.`, "Remove");
|
||||
if (!ok) return;
|
||||
try {
|
||||
await invoke("playlist_remove", { name, ids: tracks.map((t) => t.id) });
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
function enableReorder(wrap, name) {
|
||||
let dragging = null;
|
||||
wrap.addEventListener("dragstart", (e) => (dragging = e.target.closest(".lt-row")));
|
||||
wrap.addEventListener("dragover", (e) => {
|
||||
const over = e.target.closest(".lt-row");
|
||||
if (!dragging || !over || over === dragging) return;
|
||||
e.preventDefault();
|
||||
const r = over.getBoundingClientRect();
|
||||
over.parentNode.insertBefore(dragging, e.clientY < r.top + r.height / 2 ? over : over.nextSibling);
|
||||
});
|
||||
wrap.addEventListener("dragend", async () => {
|
||||
if (!dragging) return;
|
||||
dragging = null;
|
||||
const ids = $$(".lt-row", wrap).map((r) => r.dataset.id);
|
||||
await invoke("playlist_reorder", { name, ids }).catch((e) => toast(errText(e), "err"));
|
||||
loadLibrary();
|
||||
});
|
||||
}
|
||||
|
||||
/* dialogs */
|
||||
function modal(title, body, actions) {
|
||||
return new Promise((resolve) => {
|
||||
const close = (v) => { wrap.remove(); resolve(v); };
|
||||
const wrap = h("div", { class: "modal-wrap", onclick: (e) => { if (e.target === wrap) close(null); } },
|
||||
h("div", { class: "modal", role: "dialog", "aria-modal": "true", "aria-label": title },
|
||||
h("h2", {}, title), body,
|
||||
h("div", { class: "row end" }, ...actions.map((a) => h("button", { class: `btn ${a.primary ? "primary" : a.danger ? "danger-ghost" : "ghost"}`, onclick: () => close(a.value) }, a.label)))));
|
||||
wrap.addEventListener("keydown", (e) => {
|
||||
if (e.key === "Escape") close(null);
|
||||
if (e.key === "Enter" && e.target.tagName === "INPUT") close(actions.find((a) => a.primary)?.value);
|
||||
});
|
||||
document.body.append(wrap);
|
||||
(wrap.querySelector("input, textarea") || wrap.querySelector(".btn.primary"))?.focus();
|
||||
});
|
||||
}
|
||||
|
||||
const confirmBox = (title, text, label) => modal(title, h("p", { class: "muted" }, text), [{ label: "Cancel", value: false }, { label, value: true, primary: true }]);
|
||||
|
||||
async function newPlaylist(tracks = []) {
|
||||
const input = h("input", { class: "text wide", placeholder: "Playlist name", "aria-label": "Playlist name" });
|
||||
const ok = await modal("New playlist", h("div", { class: "stack" }, input, h("p", { class: "muted small" }, "It's a folder of songs on this device. Phones, USB drives and other players can use it as-is.")), [{ label: "Cancel", value: false }, { label: "Create", value: true, primary: true }]);
|
||||
const name = input.value.trim();
|
||||
if (!ok || !name) return;
|
||||
try {
|
||||
const created = await invoke("playlist_create", { name });
|
||||
if (tracks.length) await addToPlaylist(created, tracks);
|
||||
openLib("playlist", created);
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
async function editInfo(t) {
|
||||
const fields = [["title", "Title", t.title], ["artist", "Artist", t.artist], ["album", "Album", t.album], ["albumArtist", "Album artist", t.albumArtist], ["trackNumber", "Track", t.trackNo ?? ""], ["discNumber", "Disc", t.discNo ?? ""], ["date", "Year", t.year ?? ""], ["genre", "Genre", t.genre]];
|
||||
const inputs = {};
|
||||
const grid = h("div", { class: "fields two" }, ...fields.map(([k, label, v]) => h("label", { class: `field ${["title", "artist"].includes(k) ? "full" : ""}` }, h("span", {}, label), (inputs[k] = h("input", { value: String(v ?? ""), spellcheck: "false" })))));
|
||||
const ok = await modal("Edit info", h("div", { class: "stack" }, grid, h("p", { class: "muted small" }, "Changes are written into the file's tags, so they're kept everywhere you use it. Moving a song to a different album or artist is as simple as changing it here.")), [{ label: "Cancel", value: false }, { label: "Save", value: true, primary: true }]);
|
||||
if (!ok) return;
|
||||
const num = (v) => (v.trim() === "" ? null : parseInt(v, 10) || null);
|
||||
const meta = { title: inputs.title.value, artist: inputs.artist.value, album: inputs.album.value, albumArtist: inputs.albumArtist.value, trackNumber: num(inputs.trackNumber.value), discNumber: num(inputs.discNumber.value), date: inputs.date.value, genre: inputs.genre.value, artwork: { kind: "keep" } };
|
||||
try {
|
||||
await invoke("track_edit", { id: t.id, meta });
|
||||
toast("Saved to the file's tags", "ok");
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
async function editArtist(ar) {
|
||||
const bio = h("textarea", { class: "text area", rows: "6", placeholder: "A few lines about this artist…" }, ar.meta?.bio || "");
|
||||
const pic = h("div", { class: "row" }, cover(artistImage(ar), "avatar sm"), h("button", { class: "btn", onclick: async () => { try { await invoke("artist_update", { name: ar.name, pickImage: true, bio: null }); toast("Artist image updated", "ok"); } catch (e) { if (errText(e) !== "cancelled") toast(errText(e), "err"); } } }, "Choose image…"));
|
||||
const ok = await modal(`Edit ${ar.name}`, h("div", { class: "stack" }, pic, h("label", { class: "field" }, h("span", {}, "About"), bio)), [{ label: "Cancel", value: false }, { label: "Save", value: true, primary: true }]);
|
||||
if (ok) await invoke("artist_update", { name: ar.name, pickImage: false, bio: bio.value }).catch((e) => toast(errText(e), "err"));
|
||||
}
|
||||
|
||||
/* views */
|
||||
function libHead(title, sub, actions = [], opts = {}) {
|
||||
const search = opts.search ? h("input", { class: "text lib-search", type: "search", placeholder: `Search ${title.toLowerCase()}`, value: Lib.filter, "aria-label": `Search ${title}`, oninput: (e) => { Lib.filter = e.target.value; opts.onSearch?.(); } }) : null;
|
||||
return h("header", { class: "lib-head" },
|
||||
Lib.back.length ? h("button", { class: "icon-btn back", "aria-label": "Back", onclick: libBack }, icon("arrow-left")) : null,
|
||||
h("div", { class: "lib-titles" }, h("h1", {}, title), sub ? h("p", { class: "view-sub" }, sub) : null),
|
||||
h("div", { class: "row" }, search, ...actions));
|
||||
}
|
||||
|
||||
const playBtns = (list) => [
|
||||
h("button", { class: "btn primary", disabled: !list.length, onclick: () => playList(list, 0, false) }, icon("player-play-filled"), "Play"),
|
||||
h("button", { class: "btn", disabled: !list.length, onclick: () => playList(list, Math.floor(Math.random() * list.length), true) }, icon("arrows-shuffle"), "Shuffle"),
|
||||
];
|
||||
|
||||
function emptyLibrary() {
|
||||
const s = Lib.scan;
|
||||
return h("div", { class: "lib-empty" },
|
||||
h("img", { src: "assets/mark.svg", alt: "", width: "110", height: "96" }),
|
||||
h("h2", {}, s ? "Reading your music…" : "Your library is empty"),
|
||||
h("p", {}, s ? `${s.done} of ${s.total} files` : "Songs you download land here automatically. You can also point Atmosphere at folders you already have."),
|
||||
s ? progressBar(s.total ? s.done / s.total : null) : h("div", { class: "row" }, h("button", { class: "btn primary", onclick: addFolder }, icon("folder-plus"), "Add a music folder"), h("button", { class: "btn", onclick: () => go("get") }, icon("cloud-download"), "Get music")));
|
||||
}
|
||||
|
||||
function filtered(list) {
|
||||
const q = lnorm(Lib.filter);
|
||||
if (!q) return list;
|
||||
return list.filter((t) => `${t.title} ${t.artist} ${t.album} ${t.genre}`.toLowerCase().includes(q));
|
||||
}
|
||||
|
||||
function sortedSongs() {
|
||||
const { key, dir } = Lib.sort;
|
||||
const val = (t) => (key === "plays" ? -(Lib.plays[t.id] || 0) : key === "added" ? -(t.added || 0) : key === "duration" ? t.durationMs : lnorm(key === "artist" ? `${t.albumArtist || t.artist}|${t.album}|${String(t.discNo || 1).padStart(2, "0")}${String(t.trackNo || 0).padStart(3, "0")}` : t[key]));
|
||||
return [...filtered(Lib.songs)].sort((a, b) => (val(a) > val(b) ? dir : val(a) < val(b) ? -dir : 0));
|
||||
}
|
||||
|
||||
function songsView(root) {
|
||||
const list = sortedSongs();
|
||||
Lib.currentList = list;
|
||||
const sortSel = h("select", { "aria-label": "Sort by", onchange: (e) => { Lib.sort = { key: e.target.value, dir: 1 }; renderLib(); } },
|
||||
...[["artist", "Artist"], ["title", "Title"], ["album", "Album"], ["added", "Recently added"], ["plays", "Most played"], ["duration", "Length"]].map(([v, l]) => h("option", { value: v, selected: Lib.sort.key === v }, l)));
|
||||
root.append(libHead("Songs", `${plural(Lib.songs.length, "song")}${Lib.scan ? ` · reading ${Lib.scan.done} of ${Lib.scan.total}…` : ""}`, [sortSel, ...playBtns(list)], { search: true, onSearch: () => renderLib(true) }));
|
||||
if (!Lib.songs.length) return root.append(emptyLibrary());
|
||||
const head = h("div", { class: "lt-head with-cover" }, h("span", {}, "#"), h("span"), h("span", {}, "Title"), h("span", {}, "Album"), h("span"), h("span", { class: "r" }, icon("clock")), h("span"));
|
||||
const box = h("div", { class: "vlist" });
|
||||
root.append(head, box);
|
||||
if (!list.length) return box.append(h("p", { class: "muted pad" }, "No songs match your search."));
|
||||
const ctx = { list, cover: true };
|
||||
const rowH = 52;
|
||||
box.addEventListener("click", (e) => { if (e.target === box || e.target === spacer) { Lib.sel.clear(); markSelection(); } });
|
||||
const spacer = h("div", { class: "vspacer", style: `height:${list.length * rowH}px` });
|
||||
box.append(spacer);
|
||||
const scroller = $("#libScroll");
|
||||
const draw = () => {
|
||||
const top = scroller.scrollTop - spacer.offsetTop;
|
||||
const start = Math.max(0, Math.floor(top / rowH) - 10);
|
||||
const end = Math.min(list.length, Math.ceil((top + scroller.clientHeight) / rowH) + 10);
|
||||
const rows = [];
|
||||
for (let i = start; i < end; i++) {
|
||||
const r = trackRow(list[i], i, ctx);
|
||||
r.style.transform = `translateY(${i * rowH}px)`;
|
||||
rows.push(r);
|
||||
}
|
||||
spacer.replaceChildren(...rows);
|
||||
};
|
||||
Lib.drawSongs = draw;
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
|
||||
function albumCard(a) {
|
||||
return h("div", { class: "card-tile", role: "button", tabindex: "0", "data-album": a.key, onclick: () => openLib("album", a.key), onkeydown: (e) => { if (e.key === "Enter") openLib("album", a.key); } },
|
||||
h("div", { class: "tile-art" }, cover(a.art, "tile-img", a.title), h("button", { class: "tile-play", "aria-label": `Play ${a.title}`, onclick: (e) => { e.stopPropagation(); playList(a.tracks); } }, icon("player-play-filled"))),
|
||||
h("div", { class: "tile-title" }, a.title),
|
||||
h("div", { class: "tile-sub" }, [a.artist, a.year].filter(Boolean).join(" · ")));
|
||||
}
|
||||
|
||||
function albumsView(root) {
|
||||
const q = lnorm(Lib.filter);
|
||||
const list = [...Lib.albums.values()].filter((a) => !q || `${a.title} ${a.artist}`.toLowerCase().includes(q)).sort((x, y) => lnorm(x.artist).localeCompare(lnorm(y.artist)) || (y.year || 0) - (x.year || 0));
|
||||
root.append(libHead("Albums", plural(Lib.albums.size, "album"), [], { search: true, onSearch: () => renderLib(true) }));
|
||||
if (!Lib.songs.length) return root.append(emptyLibrary());
|
||||
root.append(h("div", { class: "grid" }, ...list.map(albumCard)));
|
||||
}
|
||||
|
||||
function albumView(root, key) {
|
||||
const a = Lib.albums.get(key);
|
||||
if (!a) return root.append(libHead("Album not found", "It may have been renamed or removed."));
|
||||
const discs = new Set(a.tracks.map((t) => t.discNo || 1)).size > 1;
|
||||
const multiArtist = a.tracks.some((t) => lnorm(primaryArtist(t.artist)) !== lnorm(a.artist));
|
||||
root.append(
|
||||
h("header", { class: "hero" },
|
||||
h("div", { class: "hero-bg", style: a.art ? `background-image:url("${artUrl(a.art)}")` : "" }),
|
||||
cover(a.art, "hero-cover", a.title),
|
||||
h("div", { class: "hero-meta" },
|
||||
h("div", { class: "kind-line" }, h("span", { class: "kind-btn", style: "cursor:default" }, albumKind(a)), a.year ? h("span", {}, String(a.year)) : null, a.tracks[0]?.genre ? h("span", { class: "sep" }, "·") : null, a.tracks[0]?.genre || null),
|
||||
h("h1", { class: "hero-title" }, a.title),
|
||||
h("button", { class: "link hero-artist", onclick: () => openLib("artist", lnorm(a.artist)) }, a.artist),
|
||||
h("p", { class: "view-sub" }, `${plural(a.tracks.length, "song")} · ${fmtLong(a.duration)}`),
|
||||
h("div", { class: "row" }, ...playBtns(a.tracks), h("button", { class: "btn ghost", onclick: (e) => menuAt(e.clientX, e.clientY, playlistItems(a.tracks)()) }, icon("playlist-add"), "Add to playlist"))))
|
||||
);
|
||||
if (Lib.back.length) root.firstChild.prepend(h("button", { class: "icon-btn back on-hero", "aria-label": "Back", onclick: libBack }, icon("arrow-left")));
|
||||
const ctx = { hideAlbum: true, hideArtist: !multiArtist, showArtistFor: (t) => lnorm(primaryArtist(t.artist)) !== lnorm(a.artist), numbers: (t, i) => t.trackNo || i + 1 };
|
||||
if (!discs) return root.append(h("div", { class: "pad-x" }, trackList(a.tracks, ctx)));
|
||||
const body = h("div", { class: "pad-x" });
|
||||
for (const d of [...new Set(a.tracks.map((t) => t.discNo || 1))]) {
|
||||
body.append(h("h3", { class: "disc" }, icon("disc"), `Disc ${d}`));
|
||||
body.append(trackList(a.tracks.filter((t) => (t.discNo || 1) === d), { ...ctx, list: a.tracks, numbers: (t) => t.trackNo || a.tracks.indexOf(t) + 1 }));
|
||||
}
|
||||
root.append(body);
|
||||
}
|
||||
|
||||
function artistCard(ar) {
|
||||
return h("div", { class: "card-tile artist", role: "button", tabindex: "0", "data-artist": ar.key, onclick: () => openLib("artist", ar.key), onkeydown: (e) => { if (e.key === "Enter") openLib("artist", ar.key); } },
|
||||
h("div", { class: "tile-art round" }, cover(artistImage(ar), "tile-img", ar.name)),
|
||||
h("div", { class: "tile-title" }, ar.name),
|
||||
h("div", { class: "tile-sub" }, ar.albums.length ? plural(ar.albums.length, "release") : plural(ar.tracks.length, "song")));
|
||||
}
|
||||
|
||||
function artistsView(root) {
|
||||
const q = lnorm(Lib.filter);
|
||||
const list = [...Lib.artists.values()].filter((a) => !q || a.key.includes(q)).sort((x, y) => x.key.localeCompare(y.key));
|
||||
root.append(libHead("Artists", plural(Lib.artists.size, "artist"), [], { search: true, onSearch: () => renderLib(true) }));
|
||||
if (!Lib.songs.length) return root.append(emptyLibrary());
|
||||
root.append(h("div", { class: "grid" }, ...list.map(artistCard)));
|
||||
}
|
||||
|
||||
function artistView(root, key) {
|
||||
const ar = Lib.artists.get(key);
|
||||
if (!ar) return root.append(libHead("Artist not found", "Their songs may have been retagged or removed."));
|
||||
const img = artistImage(ar);
|
||||
const popular = [...ar.tracks].sort((a, b) => (Lib.plays[b.id] || 0) - (Lib.plays[a.id] || 0) || (b.added || 0) - (a.added || 0)).slice(0, 5);
|
||||
const plays = ar.tracks.reduce((n, t) => n + (Lib.plays[t.id] || 0), 0);
|
||||
const full = ar.albums.filter((a) => albumKind(a) === "Album");
|
||||
const small = ar.albums.filter((a) => albumKind(a) !== "Album");
|
||||
root.append(
|
||||
h("header", { class: "hero artist-hero" },
|
||||
h("div", { class: "hero-bg", style: img ? `background-image:url("${artUrl(img)}")` : "" }),
|
||||
cover(img, "avatar", ar.name),
|
||||
h("div", { class: "hero-meta" },
|
||||
h("div", { class: "kind-line" }, h("span", { class: "kind-btn", style: "cursor:default" }, icon("user"), "Artist")),
|
||||
h("h1", { class: "hero-title big" }, ar.name),
|
||||
h("p", { class: "view-sub" }, [plural(ar.tracks.length, "song"), ar.albums.length && plural(ar.albums.length, "release"), plays && plural(plays, "play")].filter(Boolean).join(" · ")),
|
||||
h("div", { class: "row" }, ...playBtns(ar.tracks), h("button", { class: "btn ghost", onclick: () => editArtist(ar) }, icon("pencil"), "Edit profile"))))
|
||||
);
|
||||
if (Lib.back.length) root.firstChild.prepend(h("button", { class: "icon-btn back on-hero", "aria-label": "Back", onclick: libBack }, icon("arrow-left")));
|
||||
const body = h("div", { class: "pad-x sections" });
|
||||
body.append(h("section", {}, h("h2", { class: "sec" }, "Popular"), trackList(popular, { cover: true, list: popular })));
|
||||
if (full.length) body.append(h("section", {}, h("h2", { class: "sec" }, "Albums"), h("div", { class: "grid" }, ...full.map(albumCard))));
|
||||
if (small.length) body.append(h("section", {}, h("h2", { class: "sec" }, "Singles & EPs"), h("div", { class: "grid" }, ...small.map(albumCard))));
|
||||
if (ar.appearsOn.length) body.append(h("section", {}, h("h2", { class: "sec" }, "Appears on"), h("div", { class: "grid" }, ...ar.appearsOn.map(albumCard))));
|
||||
body.append(h("section", { class: "about" }, h("h2", { class: "sec" }, "About"), ar.meta?.bio ? h("p", { class: "bio" }, ar.meta.bio) : h("button", { class: "link muted", onclick: () => editArtist(ar) }, "Add a bio and photo for this artist")));
|
||||
root.append(body);
|
||||
}
|
||||
|
||||
function mosaic(tracks) {
|
||||
const arts = [...new Set(tracks.map((t) => t.art).filter(Boolean))].slice(0, 4);
|
||||
if (arts.length < 4) return arts.length ? cover(arts[0], "hero-cover") : h("div", { class: "hero-cover ph" }, icon("playlist"));
|
||||
return h("div", { class: "hero-cover mosaic" }, ...arts.map((k) => cover(k, "")));
|
||||
}
|
||||
|
||||
function playlistView(root, name) {
|
||||
const p = (Lib.data?.playlists || []).find((x) => x.name === name);
|
||||
if (!p) return root.append(libHead("Playlist not found", "Its folder may have been moved or deleted."));
|
||||
const tracks = p.order.map((id) => Lib.byId.get(id)).filter(Boolean);
|
||||
const dur = tracks.reduce((n, t) => n + (t.durationMs || 0), 0);
|
||||
const title = h("h1", { class: "hero-title editable", contenteditable: "plaintext-only", spellcheck: "false", "aria-label": "Playlist name", onkeydown: (e) => { if (e.key === "Enter") { e.preventDefault(); e.target.blur(); } } }, p.name);
|
||||
title.addEventListener("blur", async () => {
|
||||
const v = title.textContent.trim();
|
||||
if (!v || v === p.name) return (title.textContent = p.name);
|
||||
try {
|
||||
const n = await invoke("playlist_rename", { from: p.name, to: v });
|
||||
Lib.route = { name: "playlist", id: n };
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
title.textContent = p.name;
|
||||
}
|
||||
});
|
||||
root.append(
|
||||
h("header", { class: "hero" },
|
||||
h("div", { class: "hero-bg", style: tracks[0]?.art ? `background-image:url("${artUrl(tracks[0].art)}")` : "" }),
|
||||
mosaic(tracks),
|
||||
h("div", { class: "hero-meta" },
|
||||
h("div", { class: "kind-line" }, h("span", { class: "kind-btn", style: "cursor:default" }, icon("folder"), "Playlist folder")),
|
||||
title,
|
||||
h("p", { class: "view-sub" }, `${plural(tracks.length, "song")}${dur ? " · " + fmtLong(dur) : ""}`),
|
||||
h("button", { class: "link path", title: "Open this folder", onclick: () => invoke("reveal", { path: p.path }) }, p.path),
|
||||
h("div", { class: "row" }, ...playBtns(tracks),
|
||||
h("button", { class: "btn ghost", onclick: async () => { try { const n = await invoke("playlist_add_files", { name: p.name }); if (n) toast(`Added ${plural(n, "song")}`, "ok"); } catch (e) { toast(errText(e), "err"); } } }, icon("plus"), "Add files…"),
|
||||
h("button", { class: "btn ghost danger", onclick: async () => { if (await confirmBox(`Delete “${p.name}”?`, "The playlist folder goes to your Recycle Bin or Trash. Songs in your library aren't touched.", "Delete")) { await invoke("playlist_delete", { name: p.name }).catch((e) => toast(errText(e), "err")); openLib("songs", null, false); } } }, icon("trash"), "Delete"))))
|
||||
);
|
||||
if (Lib.back.length) root.firstChild.prepend(h("button", { class: "icon-btn back on-hero", "aria-label": "Back", onclick: libBack }, icon("arrow-left")));
|
||||
if (!tracks.length) return root.append(h("div", { class: "lib-empty slim" }, h("p", {}, "Drag songs onto this playlist in the sidebar, use “Add to playlist” from any song's menu, or add files from your computer.")));
|
||||
root.append(h("div", { class: "pad-x" }, h("p", { class: "muted small hint-line" }, "Drag rows to reorder. The order is saved in the folder's playlist.m3u8, so other players see it too."), trackList(tracks, { cover: true, playlist: p.name })));
|
||||
}
|
||||
|
||||
function likedView(root) {
|
||||
const list = filtered(Lib.songs.filter((t) => Lib.liked.has(t.id)));
|
||||
root.append(libHead("Liked songs", plural(list.length, "song"), playBtns(list), { search: true, onSearch: () => renderLib(true) }));
|
||||
if (!list.length) return root.append(h("div", { class: "lib-empty slim" }, icon("heart"), h("p", {}, "Tap the heart on any song to keep it here.")));
|
||||
root.append(h("div", { class: "pad-x" }, trackList(list, { cover: true })));
|
||||
}
|
||||
|
||||
function renderLib(soft = false) {
|
||||
const root = $("#libView");
|
||||
const scroller = $("#libScroll");
|
||||
const y = soft ? scroller.scrollTop : 0;
|
||||
const focusSearch = soft && document.activeElement?.classList.contains("lib-search");
|
||||
const caret = focusSearch ? document.activeElement.selectionStart : 0;
|
||||
root.replaceChildren();
|
||||
Lib.drawSongs = null;
|
||||
const r = Lib.route;
|
||||
({ songs: songsView, albums: albumsView, album: (x) => albumView(x, r.id), artists: artistsView, artist: (x) => artistView(x, r.id), playlist: (x) => playlistView(x, r.id), liked: likedView, stats: statsView }[r.name] || songsView)(root);
|
||||
scroller.scrollTop = y;
|
||||
if (focusSearch) {
|
||||
const s = $(".lib-search");
|
||||
s?.focus();
|
||||
s?.setSelectionRange(caret, caret);
|
||||
}
|
||||
markLibNav();
|
||||
}
|
||||
|
||||
/* library + storage settings */
|
||||
async function addFolder() {
|
||||
try {
|
||||
const p = await invoke("library_add_folder");
|
||||
if (p) {
|
||||
state.settings = await invoke("get_settings");
|
||||
renderLibrarySettings();
|
||||
toast("Reading the new folder…", "ok");
|
||||
}
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
function renderLibrarySettings() {
|
||||
const s = state.settings;
|
||||
if (!s || !$("#libFolders")) return;
|
||||
$("#libFolders").replaceChildren(
|
||||
...s.libraryFolders.map((f) => h("div", { class: "setting" }, h("div", {}, h("strong", { class: "mono-path" }, f), h("span", {}, f === s.outputDir ? "Your download folder" : "Music folder")),
|
||||
h("button", { class: "btn ghost danger", disabled: s.libraryFolders.length === 1, onclick: async () => { await invoke("library_remove_folder", { path: f }); state.settings = await invoke("get_settings"); renderLibrarySettings(); } }, "Remove"))),
|
||||
h("div", { class: "setting" }, h("div", {}, h("strong", {}, "Add a folder"), h("span", {}, "Atmosphere reads tags and cover art. It never moves or changes your files unless you edit them.")),
|
||||
h("div", { class: "row" }, h("button", { class: "btn", onclick: () => invoke("library_scan").then(() => toast("Rescanning your library…", "ok")) }, icon("refresh"), "Rescan"), h("button", { class: "btn primary", onclick: addFolder }, icon("folder-plus"), "Add folder…")))
|
||||
);
|
||||
$("#playlistsDir").textContent = s.playlistsDir;
|
||||
const hidden = Lib.data?.hidden || 0;
|
||||
$("#hiddenSongs").replaceChildren(
|
||||
h("div", {}, h("strong", {}, "Hidden songs"), h("span", {}, hidden ? `${songs(hidden)} removed from the library but still on your drive.` : "Songs you remove from the library (without deleting) appear here.")),
|
||||
h("button", { class: "btn", disabled: !hidden, onclick: async () => { const n = await invoke("tracks_unhide_all"); toast(`Restoring ${songs(n)}…`, "ok"); } }, "Restore all"));
|
||||
}
|
||||
|
||||
async function renderStorage() {
|
||||
const box = $("#storageList");
|
||||
if (!box) return;
|
||||
const items = await invoke("storage_report").catch(() => []);
|
||||
const fmt = (b) => fmtBytes(b);
|
||||
const cleanable = items.filter((i) => i.cleanable && i.bytes > 0);
|
||||
box.replaceChildren(
|
||||
...items.map((i) => h("div", { class: "setting" }, h("div", {}, h("strong", {}, i.label), h("span", {}, i.detail)),
|
||||
h("div", { class: "row" }, h("span", { class: "size" }, i.count ? `${fmt(i.bytes)} · ${plural(i.count, "file")}` : "Empty"),
|
||||
i.cleanable ? h("button", { class: "btn", disabled: !i.bytes, onclick: () => cleanStorage([i.id]) }, "Clean") : null))),
|
||||
h("div", { class: "setting" }, h("div", {}, h("strong", {}, "Clean everything that's safe to remove"), h("span", {}, "Never touches your music, playlists or settings.")),
|
||||
h("button", { class: "btn primary", disabled: !cleanable.length, onclick: () => cleanStorage(cleanable.map((i) => i.id)) }, "Clean up"))
|
||||
);
|
||||
}
|
||||
|
||||
async function cleanStorage(ids) {
|
||||
const r = await invoke("storage_clean", { ids }).catch((e) => (toast(errText(e), "err"), null));
|
||||
if (r) toast(r.files ? `Removed ${plural(r.files, "file")} (${fmtBytes(r.bytes)})` : "Nothing needed cleaning", "ok");
|
||||
renderStorage();
|
||||
}
|
||||
|
||||
/* boot */
|
||||
function bindLibrary() {
|
||||
$$("[data-lib]").forEach((b) => b.addEventListener("click", () => { Lib.back = []; openLib(b.dataset.lib, null, false); }));
|
||||
$("#newPlaylistBtn").addEventListener("click", () => newPlaylist());
|
||||
$("#libScroll").addEventListener("scroll", () => Lib.drawSongs && requestAnimationFrame(Lib.drawSongs), { passive: true });
|
||||
window.addEventListener("resize", () => Lib.drawSongs && Lib.drawSongs());
|
||||
window.addEventListener("player", (e) => { if (e.detail.type === "track") markPlaying(); });
|
||||
window.addEventListener("played", (e) => { Lib.plays[e.detail] = (Lib.plays[e.detail] || 0) + 1; });
|
||||
listen("atmosphere://library", (e) => {
|
||||
const p = e.payload;
|
||||
if (p.type === "progress") {
|
||||
Lib.scan = { done: p.done, total: p.total };
|
||||
if (state.view === "library" && !Lib.songs.length) renderLib(true);
|
||||
} else {
|
||||
Lib.scan = null;
|
||||
if (p.type === "error") toast(p.message, "err");
|
||||
clearTimeout(Lib.reload);
|
||||
Lib.reload = setTimeout(loadLibrary, 150);
|
||||
}
|
||||
});
|
||||
loadLibrary();
|
||||
}
|
||||
|
||||
/* app-wide context menus (replaces the browser's own) */
|
||||
const MOD = isMac ? "⌘" : "Ctrl+";
|
||||
|
||||
function editMenu(e, el) {
|
||||
const isInput = el.tagName === "INPUT" || el.tagName === "TEXTAREA";
|
||||
const start = isInput ? el.selectionStart : null;
|
||||
const end = isInput ? el.selectionEnd : null;
|
||||
const sel = window.getSelection();
|
||||
const range = !isInput && sel.rangeCount ? sel.getRangeAt(0).cloneRange() : null;
|
||||
const hasSel = isInput ? start !== end : !sel.isCollapsed;
|
||||
const readOnly = el.readOnly || el.disabled;
|
||||
const restore = () => {
|
||||
el.focus();
|
||||
if (isInput) el.setSelectionRange(start, end);
|
||||
else if (range) { sel.removeAllRanges(); sel.addRange(range); }
|
||||
};
|
||||
const selected = () => (isInput ? el.value.slice(start, end) : range?.toString() || "");
|
||||
menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Cut", hint: `${MOD}X`, disabled: !hasSel || readOnly, run: async () => { await invoke("clipboard_write", { text: selected() }); restore(); document.execCommand("delete"); el.dispatchEvent(new Event("input", { bubbles: true })); } },
|
||||
{ label: "Copy", hint: `${MOD}C`, disabled: !hasSel, run: () => invoke("clipboard_write", { text: selected() }) },
|
||||
{ label: "Paste", hint: `${MOD}V`, disabled: readOnly, run: async () => { const text = await invoke("clipboard_text").catch(() => ""); restore(); if (text) document.execCommand("insertText", false, text); } },
|
||||
"-",
|
||||
{ label: "Select all", hint: `${MOD}A`, run: () => { el.focus(); if (isInput) el.select(); else document.execCommand("selectAll"); } },
|
||||
]);
|
||||
}
|
||||
|
||||
function albumMenu(e, a) {
|
||||
menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Play", run: () => playList(a.tracks, 0, false) },
|
||||
{ label: "Shuffle", run: () => playList(a.tracks, Math.floor(Math.random() * a.tracks.length), true) },
|
||||
{ label: "Play next", run: () => Player.playNext(a.tracks) },
|
||||
{ label: "Add to queue", run: () => Player.addToQueue(a.tracks) },
|
||||
"-",
|
||||
{ label: "Add to playlist", sub: playlistItems(a.tracks) },
|
||||
{ label: "Go to artist", run: () => openLib("artist", lnorm(a.artist)) },
|
||||
"-",
|
||||
{ label: "Remove album from library", run: () => hideTracks(a.tracks) },
|
||||
{ label: "Delete album from device…", danger: true, run: () => deleteTracks(a.tracks) },
|
||||
]);
|
||||
}
|
||||
|
||||
function artistMenu(e, ar) {
|
||||
menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Play", run: () => playList(ar.tracks, 0, false) },
|
||||
{ label: "Shuffle", run: () => playList(ar.tracks, Math.floor(Math.random() * ar.tracks.length), true) },
|
||||
{ label: "Add to queue", run: () => Player.addToQueue(ar.tracks) },
|
||||
"-",
|
||||
{ label: "Open profile", run: () => openLib("artist", ar.key) },
|
||||
{ label: "Edit profile…", run: () => editArtist(ar) },
|
||||
]);
|
||||
}
|
||||
|
||||
async function renamePlaylist(name) {
|
||||
const input = h("input", { class: "text wide", value: name, "aria-label": "Playlist name" });
|
||||
const ok = await modal("Rename playlist", input, [{ label: "Cancel", value: false }, { label: "Rename", value: true, primary: true }]);
|
||||
const to = input.value.trim();
|
||||
if (!ok || !to || to === name) return;
|
||||
try {
|
||||
const n = await invoke("playlist_rename", { from: name, to });
|
||||
if (Lib.route.name === "playlist" && Lib.route.id === name) Lib.route = { name: "playlist", id: n };
|
||||
} catch (err) {
|
||||
toast(errText(err), "err");
|
||||
}
|
||||
}
|
||||
|
||||
function playlistMenu(e, name) {
|
||||
const p = (Lib.data?.playlists || []).find((x) => x.name === name);
|
||||
if (!p) return;
|
||||
const tracks = p.order.map((id) => Lib.byId.get(id)).filter(Boolean);
|
||||
menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Play", disabled: !tracks.length, run: () => playList(tracks, 0, false) },
|
||||
{ label: "Shuffle", disabled: !tracks.length, run: () => playList(tracks, Math.floor(Math.random() * tracks.length), true) },
|
||||
"-",
|
||||
{ label: "Add files…", run: () => invoke("playlist_add_files", { name }).catch((err) => toast(errText(err), "err")) },
|
||||
{ label: "Rename…", run: () => renamePlaylist(name) },
|
||||
{ label: "Show in folder", run: () => invoke("reveal", { path: p.path }) },
|
||||
"-",
|
||||
{ label: "Delete playlist…", danger: true, run: async () => { if (await confirmBox(`Delete “${name}”?`, "The playlist folder goes to your Recycle Bin or Trash. Songs in your library aren't touched.", "Delete")) invoke("playlist_delete", { name }).catch((err) => toast(errText(err), "err")); } },
|
||||
]);
|
||||
}
|
||||
|
||||
document.addEventListener("contextmenu", (e) => {
|
||||
if (e.defaultPrevented) return;
|
||||
e.preventDefault();
|
||||
const t = e.target;
|
||||
const field = t.closest("input:not([type=checkbox]):not([type=range]):not([type=radio]), textarea, [contenteditable]");
|
||||
if (field) return editMenu(e, field);
|
||||
const selText = window.getSelection()?.toString().trim();
|
||||
if (selText) return menuAt(e.clientX, e.clientY, [{ label: "Copy", hint: `${MOD}C`, run: () => invoke("clipboard_write", { text: selText }) }]);
|
||||
const album = t.closest("[data-album]");
|
||||
if (album) return Lib.albums.has(album.dataset.album) && albumMenu(e, Lib.albums.get(album.dataset.album));
|
||||
const artist = t.closest("[data-artist]");
|
||||
if (artist) return Lib.artists.has(artist.dataset.artist) && artistMenu(e, Lib.artists.get(artist.dataset.artist));
|
||||
const pl = t.closest("[data-playlist]");
|
||||
if (pl) return playlistMenu(e, pl.dataset.playlist);
|
||||
const q = t.closest("[data-qi]");
|
||||
if (q) {
|
||||
const i = Number(q.dataset.qi);
|
||||
const tr = Player.queue[i];
|
||||
return tr && menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Play", run: () => Player.load(i) },
|
||||
{ label: "Remove from queue", disabled: i === Player.index, run: () => Player.removeAt(i) },
|
||||
"-",
|
||||
{ label: "Add to playlist", sub: playlistItems([tr]) },
|
||||
{ label: "Show in folder", run: () => invoke("reveal", { path: tr.path }) },
|
||||
]);
|
||||
}
|
||||
const line = t.closest(".lyr-line");
|
||||
if (line && Lyr.data) {
|
||||
const l = Lyr.data.lines[Number(line.dataset.i)];
|
||||
return menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Copy line", run: () => invoke("clipboard_write", { text: l.text }) },
|
||||
{ label: "Copy all lyrics", run: () => invoke("clipboard_write", { text: Lyr.data.lines.map((x) => x.text).join("\n") }) },
|
||||
l.t != null ? { label: "Play from here", run: () => Player.seek((l.t - Lyr.offset) / 1000) } : null,
|
||||
]);
|
||||
}
|
||||
const fetched = t.closest(".fetched-item");
|
||||
if (fetched) {
|
||||
const c = state.collections.find((x) => x.data.id === fetched.dataset.cid);
|
||||
return c && menuAt(e.clientX, e.clientY, [
|
||||
{ label: "Open", run: () => { state.active = c; go("get"); renderFetched(); renderSheet(); } },
|
||||
c.data.url ? { label: "Open on site", run: () => invoke("open_link", { url: c.data.url }) } : null,
|
||||
c.data.url ? { label: "Copy link", run: () => invoke("clipboard_write", { text: c.data.url }) } : null,
|
||||
"-",
|
||||
{ label: "Remove", run: () => removeCollection(c) },
|
||||
]);
|
||||
}
|
||||
const hist = t.closest("[data-hist]");
|
||||
if (hist) {
|
||||
const r = state.history.find((x) => x.id === hist.dataset.hist);
|
||||
return r && menuAt(e.clientX, e.clientY, [
|
||||
r.path ? { label: "Show in folder", run: () => invoke("reveal", { path: r.path }) } : null,
|
||||
r.url ? { label: "Open source page", run: () => invoke("open_link", { url: r.url }) } : null,
|
||||
r.url ? { label: "Copy link", run: () => invoke("clipboard_write", { text: r.url }) } : null,
|
||||
"-",
|
||||
{ label: "Remove from history", run: async () => { await invoke("history_remove", { ids: [r.id] }); state.history = state.history.filter((x) => x !== r); renderHistory(); } },
|
||||
]);
|
||||
}
|
||||
const srow = t.closest(".tl-row[data-index]");
|
||||
if (srow && current()) {
|
||||
const c = current();
|
||||
const idx = Number(srow.dataset.index);
|
||||
const ent = entryOf(c, idx);
|
||||
return ent && menuAt(e.clientX, e.clientY, [
|
||||
{ label: c.selected.has(idx) ? "Don't download" : "Include in download", disabled: !selectable(ent), run: () => { c.selected.has(idx) ? c.selected.delete(idx) : c.selected.add(idx); renderSheet(true); } },
|
||||
{ label: "Get info", run: () => { c.inspected = idx; renderSheet(true); } },
|
||||
ent.url ? { label: "Copy link", run: () => invoke("clipboard_write", { text: ent.url }) } : null,
|
||||
]);
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("keydown", (e) => {
|
||||
const mod = e.ctrlKey || e.metaKey;
|
||||
const k = e.key.toLowerCase();
|
||||
if (e.key === "F5" || (mod && ["r", "p", "s", "u", "j", "g", "o", "n"].includes(k)) || (mod && e.shiftKey && ["r", "p"].includes(k))) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
const typing = e.target.closest?.("input, textarea, select, [contenteditable]");
|
||||
if (!typing && state.view === "library" && Lib.sel.size && (e.key === "Delete" || (isMac && e.key === "Backspace" && e.metaKey))) {
|
||||
e.preventDefault();
|
||||
return deleteTracks(selectedTracks());
|
||||
}
|
||||
if (!typing && state.view === "library" && mod && k === "a" && Lib.currentList.length) {
|
||||
e.preventDefault();
|
||||
Lib.sel = new Set(Lib.currentList.map((t) => t.id));
|
||||
return markSelection();
|
||||
}
|
||||
if (!typing && e.key === "Escape" && Lib.sel.size) {
|
||||
Lib.sel.clear();
|
||||
markSelection();
|
||||
}
|
||||
if (mod && k === "f") {
|
||||
e.preventDefault();
|
||||
const s = state.view === "library" ? $(".lib-search") : null;
|
||||
if (s) { s.focus(); s.select(); }
|
||||
else { go("get"); $("#commandInput").focus(); }
|
||||
}
|
||||
}, true);
|
||||
@@ -0,0 +1,380 @@
|
||||
/* atmosphere · lyrics.js · Synced lyrics panel, full-screen TV mode with visualizer, and the lyrics-provider settings. */
|
||||
const Lyr = { cache: new Map(), tried: [], cachedMiss: false, data: null, trackId: null, loading: false, error: null, offset: 0, raf: 0, active: -1, tv: false, idleTimer: 0 };
|
||||
|
||||
const PROVIDER_INFO = {
|
||||
local: ["Your files", "Lyrics embedded in the song, or a .lrc file next to it."],
|
||||
lrclib: ["LRCLIB", "Free, community-synced lyrics library. No key needed."],
|
||||
musixmatch: ["Musixmatch", "Official developer API with your own key (free tier available). Synced lyrics depend on your plan."],
|
||||
netease: ["NetEase Cloud Music", "Free synced lyrics, often word-by-word with translations. No key needed."],
|
||||
kugou: ["Kugou", "Free synced lyrics for Chinese and Asian releases. Often blocked outside China, so it's off by default."],
|
||||
};
|
||||
|
||||
function lyricsQuery(t) {
|
||||
return { title: t.title, artist: primaryArtist(t.artist), album: t.album || "", durationMs: t.durationMs || null, path: t.path };
|
||||
}
|
||||
|
||||
async function loadLyrics(refresh = false) {
|
||||
const t = Player.current;
|
||||
if (!t) {
|
||||
Lyr.data = null;
|
||||
Lyr.trackId = null;
|
||||
return renderLyricsAll();
|
||||
}
|
||||
if (!refresh && Lyr.trackId === t.id && (Lyr.data || Lyr.loading)) return;
|
||||
Lyr.trackId = t.id;
|
||||
Lyr.error = null;
|
||||
Lyr.active = -1;
|
||||
if (!refresh && Lyr.cache.has(t.id)) {
|
||||
({ lyrics: Lyr.data, tried: Lyr.tried, cached: Lyr.cachedMiss } = Lyr.cache.get(t.id));
|
||||
return renderLyricsAll();
|
||||
}
|
||||
Lyr.loading = true;
|
||||
Lyr.data = null;
|
||||
renderLyricsAll();
|
||||
try {
|
||||
const found = await invoke("lyrics_get", { query: lyricsQuery(t), refresh });
|
||||
Lyr.cache.set(t.id, found);
|
||||
if (Lyr.trackId === t.id) ({ lyrics: Lyr.data, tried: Lyr.tried, cached: Lyr.cachedMiss } = found);
|
||||
} catch (e) {
|
||||
if (Lyr.trackId === t.id) Lyr.error = errText(e);
|
||||
} finally {
|
||||
if (Lyr.trackId === t.id) Lyr.loading = false;
|
||||
renderLyricsAll();
|
||||
}
|
||||
}
|
||||
|
||||
function lyricLines(l, big) {
|
||||
const box = h("div", { class: `lyr ${big ? "big" : ""} ${l.synced ? "synced" : "plain"}` });
|
||||
l.lines.forEach((line, i) => {
|
||||
const el = h("div", { class: "lyr-line", "data-i": i, role: l.synced ? "button" : null, tabindex: l.synced ? "0" : null, onclick: () => line.t != null && Player.seek((line.t - Lyr.offset) / 1000) });
|
||||
if (line.words?.length > 1) line.words.forEach((w, j) => el.append(h("span", { class: "w", "data-j": j }, w.text)));
|
||||
else el.append(line.text || "· · ·");
|
||||
if (line.translation) el.append(h("span", { class: "lyr-tr" }, line.translation));
|
||||
box.append(el);
|
||||
});
|
||||
return box;
|
||||
}
|
||||
|
||||
function lyricsBody(big) {
|
||||
const t = Player.current;
|
||||
if (!t) return h("div", { class: "lyr-state" }, h("p", {}, "Play something to see its lyrics."));
|
||||
if (Lyr.loading) return h("div", { class: "lyr-state" }, h("span", { class: "skeleton w60" }), h("span", { class: "skeleton w30" }), h("span", { class: "skeleton w60" }));
|
||||
if (Lyr.error) return h("div", { class: "lyr-state" }, h("p", {}, Lyr.error), h("button", { class: "btn small", onclick: () => loadLyrics(true) }, "Try again"));
|
||||
const l = Lyr.data;
|
||||
if (!l) return h("div", { class: "lyr-state" }, h("p", {}, "No lyrics found for this song."),
|
||||
Lyr.cachedMiss ? h("p", { class: "muted small" }, "Searched recently with no match. Search again to retry every source.") : Lyr.tried.length ? h("ul", { class: "tried" }, ...Lyr.tried.map((a) => h("li", {}, h("strong", {}, a.provider), ` ${a.outcome}`))) : null,
|
||||
h("div", { class: "row" }, h("button", { class: "btn small", onclick: () => loadLyrics(true) }, icon("refresh"), "Search again"), h("button", { class: "btn small ghost", onclick: () => { closeTv(); go("settings"); $("#set-lyrics")?.scrollIntoView(); } }, "Lyrics sources")));
|
||||
if (l.instrumental) return h("div", { class: "lyr-state" }, icon("music"), h("p", {}, "Instrumental"));
|
||||
return lyricLines(l, big);
|
||||
}
|
||||
|
||||
function renderLyricsPanel() {
|
||||
const panel = $("#lyricsPanel");
|
||||
if (panel.hidden) return;
|
||||
if (Player.current && Lyr.trackId !== Player.current.id) loadLyrics();
|
||||
const l = Lyr.data;
|
||||
const t = Player.current;
|
||||
const canSave = l?.synced && t && !["Local .lrc", "Embedded"].includes(l.provider);
|
||||
panel.replaceChildren(
|
||||
h("div", { class: "drawer-head" }, h("div", {}, h("h2", {}, "Lyrics"), l ? h("p", { class: "muted small" }, `${l.provider}${l.wordSynced ? " · word-synced" : l.synced ? " · synced" : ""}`) : null),
|
||||
h("div", { class: "row" },
|
||||
l?.synced ? h("div", { class: "offset", title: "Nudge timing if lyrics run early or late" }, h("button", { class: "icon-btn", "aria-label": "Lyrics earlier", onclick: () => nudge(-250) }, "−"), h("output", {}, `${Lyr.offset > 0 ? "+" : ""}${(Lyr.offset / 1000).toFixed(2)}s`), h("button", { class: "icon-btn", "aria-label": "Lyrics later", onclick: () => nudge(250) }, "+")) : null,
|
||||
canSave ? h("button", { class: "icon-btn", title: "Save as .lrc next to the song", "aria-label": "Save lyrics file", onclick: saveLrc }, icon("download")) : null,
|
||||
t ? h("button", { class: "icon-btn", title: "Edit or attach lyrics", "aria-label": "Edit lyrics", onclick: editLyrics }, icon("pencil")) : null,
|
||||
h("button", { class: "icon-btn", title: "Search again", "aria-label": "Search again", onclick: () => loadLyrics(true) }, icon("refresh")),
|
||||
h("button", { class: "icon-btn", "aria-label": "Close", onclick: closeDrawers }, icon("x")))),
|
||||
h("div", { class: "drawer-body lyr-scroll" }, lyricsBody(false), l?.copyright ? h("p", { class: "lyr-copy" }, l.copyright) : null)
|
||||
);
|
||||
Lyr.active = -1;
|
||||
startTick();
|
||||
}
|
||||
|
||||
async function editLyrics() {
|
||||
const t = Player.current;
|
||||
if (!t) return;
|
||||
const l = Lyr.data;
|
||||
const start = l?.lines?.length ? (l.synced ? l.lines.map((x) => (x.t != null ? `[${String(Math.floor(x.t / 60000)).padStart(2, "0")}:${String(Math.floor(x.t / 1000) % 60).padStart(2, "0")}.${String(Math.floor((x.t % 1000) / 10)).padStart(2, "0")}]` : "") + x.text).join("\n") : l.lines.map((x) => x.text).join("\n")) : "";
|
||||
const box = h("textarea", { class: "text area lyr-input", rows: "14", spellcheck: "false", placeholder: "Paste lyrics. Start lines with [mm:ss.xx] to make them synced." }, start);
|
||||
const stamp = h("button", { class: "btn small", title: "Insert the current playback time at the cursor", onclick: () => {
|
||||
const ms = Math.max(0, Player.audio.currentTime * 1000);
|
||||
const tag = `[${String(Math.floor(ms / 60000)).padStart(2, "0")}:${String(Math.floor(ms / 1000) % 60).padStart(2, "0")}.${String(Math.floor((ms % 1000) / 10)).padStart(2, "0")}]`;
|
||||
const at = box.selectionStart;
|
||||
const lineStart = box.value.lastIndexOf("\n", at - 1) + 1;
|
||||
box.value = box.value.slice(0, lineStart) + tag + box.value.slice(lineStart).replace(/^\[\d{1,3}:\d{1,2}([.:]\d{1,3})?\]/, "");
|
||||
const next = box.value.indexOf("\n", lineStart);
|
||||
box.focus();
|
||||
box.setSelectionRange(next < 0 ? box.value.length : next + 1, next < 0 ? box.value.length : next + 1);
|
||||
} }, icon("clock"), "Stamp current time");
|
||||
const importBtn = h("button", { class: "btn small ghost", onclick: async () => { const text = await invoke("pick_text_file").catch((x) => (toast(errText(x), "err"), null)); if (text != null) box.value = text; } }, icon("file-music"), "Import .lrc or .txt…");
|
||||
const ok = await modal(`Lyrics · ${t.title}`, h("div", { class: "stack" }, box, h("div", { class: "row" }, stamp, importBtn), h("p", { class: "muted small" }, "Tip: play the song, put the cursor on a line, and press “Stamp current time” as it's sung. That's how you sync lyrics yourself.")), [{ label: "Cancel", value: false }, { label: "Save to song", value: true, primary: true }]);
|
||||
if (!ok) return;
|
||||
try {
|
||||
await invoke("lyrics_save_text", { id: t.id, text: box.value });
|
||||
Lyr.cache.delete(t.id);
|
||||
toast("Lyrics saved to the song", "ok");
|
||||
loadLyrics(true);
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
function nudge(ms) {
|
||||
Lyr.offset += ms;
|
||||
renderLyricsPanel();
|
||||
}
|
||||
|
||||
async function saveLrc() {
|
||||
try {
|
||||
await invoke("lyrics_save", { id: Player.current.id, lyrics: Lyr.data });
|
||||
toast("Saved lyrics next to the song", "ok");
|
||||
} catch (e) {
|
||||
toast(errText(e), "err");
|
||||
}
|
||||
}
|
||||
|
||||
function openLyrics() {
|
||||
if ($("#lyricsPanel").hidden) $("#lyricsBtn").click();
|
||||
}
|
||||
|
||||
function renderLyricsAll() {
|
||||
renderLyricsPanel();
|
||||
if (Lyr.tv) renderTv();
|
||||
}
|
||||
|
||||
function tick() {
|
||||
Lyr.raf = 0;
|
||||
const visible = !$("#lyricsPanel").hidden || Lyr.tv;
|
||||
if (!visible) return;
|
||||
const l = Lyr.data;
|
||||
if (l?.synced) {
|
||||
const now = Player.audio.currentTime * 1000 + Lyr.offset;
|
||||
let idx = -1;
|
||||
for (let i = 0; i < l.lines.length; i++) {
|
||||
if (l.lines[i].t != null && l.lines[i].t <= now) idx = i;
|
||||
else if (l.lines[i].t != null && l.lines[i].t > now) break;
|
||||
}
|
||||
const boxes = $$(".lyr.synced");
|
||||
if (idx !== Lyr.active) {
|
||||
Lyr.active = idx;
|
||||
for (const box of boxes) {
|
||||
$$(".lyr-line", box).forEach((el, i) => {
|
||||
el.classList.toggle("on", i === idx);
|
||||
el.classList.toggle("past", i < idx);
|
||||
});
|
||||
const cur = box.querySelector(".lyr-line.on");
|
||||
if (cur) cur.scrollIntoView({ block: "center", behavior: reduced.matches ? "auto" : "smooth" });
|
||||
}
|
||||
}
|
||||
const line = l.lines[idx];
|
||||
if (line?.words?.length > 1) {
|
||||
for (const box of boxes) {
|
||||
const el = box.querySelector(".lyr-line.on");
|
||||
el && $$(".w", el).forEach((w, j) => w.classList.toggle("sung", line.words[j].t <= now));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Lyr.tv) drawViz();
|
||||
Lyr.raf = requestAnimationFrame(tick);
|
||||
}
|
||||
|
||||
function startTick() {
|
||||
if (!Lyr.raf) Lyr.raf = requestAnimationFrame(tick);
|
||||
}
|
||||
|
||||
/* TV mode */
|
||||
function renderTv() {
|
||||
const tv = $("#tv");
|
||||
const t = Player.current;
|
||||
const l = Lyr.data;
|
||||
const hasLyrics = !!(l && !l.instrumental && l.lines?.length);
|
||||
const showCol = !!t && (Lyr.loading || hasLyrics);
|
||||
tv.classList.toggle("no-lyrics", !showCol);
|
||||
const note = !t ? null : Lyr.loading ? null : l?.instrumental ? "Instrumental" : !hasLyrics ? (Lyr.error ? "Lyrics sources unreachable" : "No lyrics found for this song") : `Lyrics · ${l.provider}`;
|
||||
const bg = t?.art ? `background-image:url("${artUrl(t.art)}")` : "";
|
||||
tv.replaceChildren(
|
||||
h("div", { class: "tv-bg", style: bg }),
|
||||
h("button", { class: "icon-btn tv-close", "aria-label": "Exit TV mode", onclick: closeTv }, icon("minimize")),
|
||||
h("div", { class: "tv-stage" },
|
||||
h("div", { class: "tv-now" },
|
||||
t ? cover(t.art, "tv-cover", t.album || t.title) : h("div", { class: "tv-cover ph" }, icon("music")),
|
||||
h("div", { class: "tv-title" }, t?.title || "Nothing playing"),
|
||||
h("div", { class: "tv-artist" }, t?.artist || ""),
|
||||
note ? h("div", { class: "tv-note" }, note) : null,
|
||||
h("div", { class: "tv-bar" }, h("i", { id: "tvProg" })),
|
||||
h("div", { class: "tv-controls" },
|
||||
h("button", { class: "icon-btn", "aria-label": "Previous", onclick: () => Player.prev() }, icon("player-skip-back-filled")),
|
||||
h("button", { class: "icon-btn tv-play", "aria-label": "Play or pause", onclick: () => Player.toggle() }, icon(Player.audio.paused ? "player-play-filled" : "player-pause-filled")),
|
||||
h("button", { class: "icon-btn", "aria-label": "Next", onclick: () => Player.next() }, icon("player-skip-forward-filled")))),
|
||||
showCol ? h("div", { class: "tv-lyrics" }, Lyr.loading ? h("div", { class: "tv-finding" }, h("span", { class: "skeleton w60" }), h("span", { class: "skeleton w30" }), h("p", {}, "Finding lyrics…")) : lyricsBody(true)) : null),
|
||||
h("canvas", { class: "tv-viz", id: "tvViz", width: "1600", height: "220", "aria-hidden": "true" })
|
||||
);
|
||||
Lyr.active = -1;
|
||||
startTick();
|
||||
}
|
||||
|
||||
function drawViz() {
|
||||
const bar = $("#tvProg");
|
||||
const a = Player.audio;
|
||||
if (bar && isFinite(a.duration)) bar.style.transform = `scaleX(${a.currentTime / a.duration})`;
|
||||
const c = $("#tvViz");
|
||||
const an = Player.nodes?.analyser;
|
||||
if (!c || !an) return;
|
||||
const g = c.getContext("2d");
|
||||
const data = new Uint8Array(an.frequencyBinCount);
|
||||
an.getByteFrequencyData(data);
|
||||
g.clearRect(0, 0, c.width, c.height);
|
||||
const n = 64;
|
||||
const w = c.width / n;
|
||||
const accent = getComputedStyle(document.documentElement).getPropertyValue("--accent").trim() || "#9aa4ff";
|
||||
g.fillStyle = accent;
|
||||
g.globalAlpha = 0.55;
|
||||
for (let i = 0; i < n; i++) {
|
||||
const v = data[Math.floor((i / n) * data.length * 0.75)] / 255;
|
||||
const hgt = Math.max(4, v * c.height * 0.9);
|
||||
const x = i * w + w * 0.3;
|
||||
g.beginPath();
|
||||
g.roundRect(x, c.height - hgt, w * 0.4, hgt, w * 0.2);
|
||||
g.fill();
|
||||
}
|
||||
}
|
||||
|
||||
function wakeTv() {
|
||||
const tv = $("#tv");
|
||||
tv.classList.remove("idle");
|
||||
clearTimeout(Lyr.idleTimer);
|
||||
Lyr.idleTimer = setTimeout(() => tv.classList.add("idle"), 2800);
|
||||
}
|
||||
|
||||
const winApi = () => window.__TAURI__?.window;
|
||||
|
||||
async function monitors() {
|
||||
try {
|
||||
return (await winApi()?.availableMonitors?.()) || [];
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
async function moveToMonitor(m) {
|
||||
const api = winApi();
|
||||
const dpi = window.__TAURI__?.dpi;
|
||||
if (!api || !dpi || !m) return;
|
||||
const win = api.getCurrentWindow();
|
||||
Lyr.restore = { pos: await win.outerPosition(), size: await win.outerSize(), max: await win.isMaximized() };
|
||||
if (Lyr.restore.max) await win.unmaximize();
|
||||
await win.setPosition(new dpi.PhysicalPosition(m.position.x + 40, m.position.y + 40));
|
||||
}
|
||||
|
||||
async function restoreWindow() {
|
||||
const r = Lyr.restore;
|
||||
Lyr.restore = null;
|
||||
const api = winApi();
|
||||
const dpi = window.__TAURI__?.dpi;
|
||||
if (!r || !api || !dpi) return;
|
||||
const win = api.getCurrentWindow();
|
||||
await win.setPosition(new dpi.PhysicalPosition(r.pos.x, r.pos.y));
|
||||
await win.setSize(new dpi.PhysicalSize(r.size.width, r.size.height));
|
||||
if (r.max) await win.maximize();
|
||||
}
|
||||
|
||||
async function chooseTvScreen(anchor) {
|
||||
if (Lyr.tv) return closeTv();
|
||||
const list = await monitors();
|
||||
if (list.length < 2) return openTv();
|
||||
const here = await winApi().currentMonitor().catch(() => null);
|
||||
const label = (m, i) => `${m.name && !/^\\\\.\\/.test(m.name) ? m.name : `Display ${i + 1}`} · ${m.size.width}×${m.size.height}`;
|
||||
const r = anchor.getBoundingClientRect();
|
||||
const m = menuAt(r.left, r.top - 10, [
|
||||
{ label: "This screen", run: () => openTv() },
|
||||
"-",
|
||||
...list.map((mon, i) => ({ label: `${label(mon, i)}${here && mon.position.x === here.position.x && mon.position.y === here.position.y ? " (current)" : ""}`, run: () => openTv(mon) })),
|
||||
]);
|
||||
m.style.top = `${Math.max(8, r.top - m.offsetHeight - 10)}px`;
|
||||
}
|
||||
|
||||
async function openTv(monitor = null) {
|
||||
if (Lyr.tv) return closeTv();
|
||||
Lyr.tv = true;
|
||||
closeFx();
|
||||
closeMenus();
|
||||
if (monitor) await moveToMonitor(monitor).catch(() => {});
|
||||
$("#tv").hidden = false;
|
||||
if (Player.current) loadLyrics();
|
||||
renderTv();
|
||||
wakeTv();
|
||||
invoke("set_fullscreen", { on: true }).catch(() => {});
|
||||
}
|
||||
|
||||
async function closeTv() {
|
||||
if (!Lyr.tv) return;
|
||||
Lyr.tv = false;
|
||||
$("#tv").hidden = true;
|
||||
await invoke("set_fullscreen", { on: false }).catch(() => {});
|
||||
await restoreWindow().catch(() => {});
|
||||
}
|
||||
|
||||
/* lyrics settings */
|
||||
function providerName(id) {
|
||||
if (id.startsWith("custom:")) return (state.settings.customLyrics || []).find((c) => `custom:${c.id}` === id)?.name || "Custom provider";
|
||||
return PROVIDER_INFO[id]?.[0] || id;
|
||||
}
|
||||
|
||||
async function saveLyricsSettings(patchObj) {
|
||||
state.settings = await invoke("save_settings", { patch: patchObj });
|
||||
Lyr.cache.clear();
|
||||
renderLyricsSettings();
|
||||
}
|
||||
|
||||
function renderLyricsSettings() {
|
||||
const s = state.settings;
|
||||
const box = $("#lyricsProviders");
|
||||
if (!s || !box) return;
|
||||
const list = s.lyricsProviders.filter((p) => !p.id.startsWith("custom:") || (s.customLyrics || []).some((c) => `custom:${c.id}` === p.id));
|
||||
const move = (i, d) => {
|
||||
const next = [...list];
|
||||
const [x] = next.splice(i, 1);
|
||||
next.splice(i + d, 0, x);
|
||||
saveLyricsSettings({ lyricsProviders: next });
|
||||
};
|
||||
box.replaceChildren(...list.map((p, i) => {
|
||||
const sw = h("input", { type: "checkbox", class: "switch", "aria-label": `Use ${providerName(p.id)}` });
|
||||
sw.checked = p.enabled;
|
||||
sw.addEventListener("change", () => saveLyricsSettings({ lyricsProviders: list.map((x) => (x.id === p.id ? { ...x, enabled: sw.checked } : x)) }));
|
||||
const needsKey = p.id === "musixmatch" && !s.musixmatchKey;
|
||||
return h("div", { class: "setting" },
|
||||
h("div", {}, h("strong", {}, `${i + 1}. ${providerName(p.id)}`), h("span", {}, needsKey ? "Add your Musixmatch API key below to use it." : PROVIDER_INFO[p.id]?.[1] || "Your custom source.")),
|
||||
h("div", { class: "row" },
|
||||
h("button", { class: "icon-btn", "aria-label": "Move up", disabled: i === 0, onclick: () => move(i, -1) }, "↑"),
|
||||
h("button", { class: "icon-btn", "aria-label": "Move down", disabled: i === list.length - 1, onclick: () => move(i, 1) }, "↓"),
|
||||
sw));
|
||||
}));
|
||||
const customs = s.customLyrics || [];
|
||||
$("#customProviders").replaceChildren(
|
||||
...customs.map((c) => {
|
||||
const field = (key, label, attrs = {}) => {
|
||||
const el = attrs.multiline ? h("textarea", { class: "text area", rows: "2", spellcheck: "false", placeholder: attrs.placeholder || "" }, c[key] || "") : h("input", { class: "text", value: c[key] || "", type: attrs.type || "text", spellcheck: "false", placeholder: attrs.placeholder || "" });
|
||||
el.addEventListener("change", () => saveLyricsSettings({ customLyrics: customs.map((x) => (x.id === c.id ? { ...x, [key]: el.value } : x)) }));
|
||||
return h("label", { class: "field" }, h("span", {}, label), el);
|
||||
};
|
||||
const fmt = h("select", { "aria-label": "Response format" }, h("option", { value: "lrc", selected: c.format !== "json" }, "LRC or plain text"), h("option", { value: "json", selected: c.format === "json" }, "JSON"));
|
||||
fmt.addEventListener("change", () => saveLyricsSettings({ customLyrics: customs.map((x) => (x.id === c.id ? { ...x, format: fmt.value } : x)) }));
|
||||
return h("div", { class: "setting stack custom" },
|
||||
h("div", { class: "fields two" }, field("name", "Name", { placeholder: "e.g. QQ Music via my proxy" }), field("key", "Key or token", { type: "password" }), h("div", { class: "field full" }, field("url", "URL template", { placeholder: "https://example.com/lyrics?track={title}&artist={artist}&key={key}" })), h("div", { class: "field full" }, field("headers", "Headers (one per line)", { multiline: true, placeholder: "Authorization: Bearer {key}" })), h("label", { class: "field" }, h("span", {}, "Response"), fmt), c.format === "json" ? field("jsonPath", "Path to lyrics", { placeholder: "data.lyrics.lrc" }) : h("span")),
|
||||
h("div", { class: "row end" }, h("button", { class: "btn ghost danger", onclick: () => saveLyricsSettings({ customLyrics: customs.filter((x) => x.id !== c.id), lyricsProviders: s.lyricsProviders.filter((p) => p.id !== `custom:${c.id}`) }) }, "Remove")));
|
||||
}),
|
||||
h("div", { class: "setting" }, h("div", {}, h("strong", {}, "Add a custom source"), h("span", {}, "For QQ Music, Spicy Lyrics, BiniLyrics, a self-hosted server, or any service you have access to. Use {title}, {artist}, {album}, {duration} and {key} in the URL or headers.")),
|
||||
h("button", { class: "btn", onclick: () => { const id = String(Date.now()); saveLyricsSettings({ customLyrics: [...customs, { id, name: "", url: "", headers: "", format: "lrc", jsonPath: "", key: "" }], lyricsProviders: [...s.lyricsProviders, { id: `custom:${id}`, enabled: true }] }); } }, icon("plus"), "Add source"))
|
||||
);
|
||||
}
|
||||
|
||||
function bindLyrics() {
|
||||
window.addEventListener("player", (e) => {
|
||||
if (e.detail.type === "track") {
|
||||
Lyr.offset = 0;
|
||||
if (!$("#lyricsPanel").hidden || Lyr.tv) loadLyrics();
|
||||
}
|
||||
if (e.detail.type === "state" && Lyr.tv) $(".tv-play")?.replaceChildren(icon(Player.audio.paused ? "player-play-filled" : "player-pause-filled"));
|
||||
});
|
||||
$("#tv").addEventListener("mousemove", wakeTv);
|
||||
document.addEventListener("keydown", (e) => { if (Lyr.tv && e.key === "Escape") closeTv(); });
|
||||
}
|
||||
@@ -0,0 +1,331 @@
|
||||
/* atmosphere · nowplaying.js · Player bar, effects panel (presets, EQ, filters, pitch, tempo), queue drawer and playback shortcuts. */
|
||||
const LOG = (v, min, max) => Math.round(min * Math.pow(max / min, v / 100));
|
||||
const UNLOG = (f, min, max) => Math.round((Math.log(f / min) / Math.log(max / min)) * 100);
|
||||
const fmtHz = (f) => (f >= 1000 ? `${nf.format(f / 1000)}k` : String(f));
|
||||
|
||||
function rangeFill(el) {
|
||||
const p = ((el.value - el.min) / (el.max - el.min)) * 100;
|
||||
el.style.setProperty("--p", `${p}%`);
|
||||
}
|
||||
|
||||
function updatePlayerBar() {
|
||||
const t = Player.current;
|
||||
$("#player").classList.toggle("idle", !t);
|
||||
$("#npArt").replaceChildren(t ? cover(t.art, "np-cover", t.album || t.title) : h("div", { class: "np-cover ph" }, icon("music")));
|
||||
$("#npTitle").textContent = t ? t.title : "Nothing playing";
|
||||
$("#npArtist").replaceChildren(t ? artistLinks(t) : h("span", { class: "muted" }, "Pick something from your library"));
|
||||
$("#npLike").replaceChildren(t ? likeBtn(t) : "");
|
||||
const paused = Player.audio.paused;
|
||||
document.body.classList.toggle("is-paused", paused || !t);
|
||||
$("#playBtn").innerHTML = svg(paused ? "player-play-filled" : "player-pause-filled");
|
||||
$("#playBtn").setAttribute("aria-label", paused ? "Play" : "Pause");
|
||||
$("#shuffleBtn").setAttribute("aria-pressed", String(Player.shuffle));
|
||||
$("#repeatBtn").setAttribute("aria-pressed", String(Player.repeat !== "off"));
|
||||
$("#repeatBtn").replaceChildren(icon(Player.repeat === "one" ? "repeat-once" : "repeat"));
|
||||
$("#repeatBtn").title = { off: "Repeat off", all: "Repeat all", one: "Repeat one" }[Player.repeat];
|
||||
$("#fxBtn").setAttribute("aria-pressed", String(fxActive()));
|
||||
document.title = t ? `${t.title} · ${t.artist || "Atmosphere"}` : "Atmosphere";
|
||||
}
|
||||
|
||||
function updateTime() {
|
||||
const a = Player.audio;
|
||||
const dur = isFinite(a.duration) ? a.duration : (Player.current?.durationMs || 0) / 1000;
|
||||
$("#tCur").textContent = fmtDur(a.currentTime * 1000);
|
||||
$("#tDur").textContent = fmtDur(dur * 1000);
|
||||
const seek = $("#seek");
|
||||
if (!seek.matches(":active")) {
|
||||
seek.value = dur ? Math.round((a.currentTime / dur) * 1000) : 0;
|
||||
rangeFill(seek);
|
||||
}
|
||||
}
|
||||
|
||||
function updateVolume() {
|
||||
const v = $("#volume");
|
||||
v.value = Math.round(Player.volume * 100);
|
||||
rangeFill(v);
|
||||
$("#muteBtn").replaceChildren(icon(Player.muted || Player.volume === 0 ? "volume-off" : "volume"));
|
||||
}
|
||||
|
||||
function fxActive() {
|
||||
const f = Player.fx;
|
||||
return !Player.bypass && (f.tempo !== 1 || f.pitch !== 0 || f.reverb > 0 || f.wide8d || f.lowpass < 20000 || f.highpass > 20 || f.eq.some((g) => g !== 0));
|
||||
}
|
||||
|
||||
/* effects panel */
|
||||
const Fx = { tab: "presets" };
|
||||
|
||||
function userPresets() {
|
||||
return (state.settings?.fxPresets || []).filter((p) => p && p.id && p.fx);
|
||||
}
|
||||
|
||||
function smoothPath(pts) {
|
||||
let d = `M${pts[0][0]},${pts[0][1]}`;
|
||||
for (let i = 0; i < pts.length - 1; i++) {
|
||||
const p0 = pts[i - 1] || pts[i], p1 = pts[i], p2 = pts[i + 1], p3 = pts[i + 2] || p2;
|
||||
const c1 = [p1[0] + (p2[0] - p0[0]) / 6, p1[1] + (p2[1] - p0[1]) / 6];
|
||||
const c2 = [p2[0] - (p3[0] - p1[0]) / 6, p2[1] - (p3[1] - p1[1]) / 6];
|
||||
d += ` C${c1[0].toFixed(1)},${c1[1].toFixed(1)} ${c2[0].toFixed(1)},${c2[1].toFixed(1)} ${p2[0].toFixed(1)},${p2[1].toFixed(1)}`;
|
||||
}
|
||||
return d;
|
||||
}
|
||||
|
||||
function miniCurve(eq) {
|
||||
const W = 120, H = 34;
|
||||
const pts = (eq || EQ_BANDS.map(() => 0)).map((g, i) => [4 + (i * (W - 8)) / 9, H / 2 - (Math.max(-7, Math.min(7, g)) / 7) * (H / 2 - 3)]);
|
||||
const el = h("span", { class: "mini-curve", "aria-hidden": "true" });
|
||||
el.innerHTML = `<svg viewBox="0 0 ${W} ${H}" preserveAspectRatio="none"><path class="zero" d="M0,${H / 2} H${W}"/><path class="line" d="${smoothPath(pts)}"/></svg>`;
|
||||
return el;
|
||||
}
|
||||
|
||||
function presetTile(p, removable = false) {
|
||||
const on = Player.fx.preset === p.id && !Player.bypass;
|
||||
const tag = p.fx.tempo && p.fx.tempo !== 1 ? `${p.fx.tempo}×` : p.fx.wide8d ? "8D" : p.fx.reverb ? "Reverb" : null;
|
||||
const tile = h("button", { class: `preset ${on ? "on" : ""}`, "aria-pressed": String(on), onclick: () => { if (Player.bypass) Player.setBypass(false); Player.usePreset(p); renderFx(); } },
|
||||
miniCurve(p.fx.eq),
|
||||
h("span", { class: "preset-name" }, p.name, tag ? h("span", { class: "preset-tag" }, tag) : null),
|
||||
h("span", { class: "preset-desc" }, p.desc || "Your preset"));
|
||||
if (!removable) return tile;
|
||||
return h("div", { class: "preset-wrap" }, tile, h("button", { class: "icon-btn preset-x", "aria-label": `Delete ${p.name}`, onclick: async () => { state.settings = await invoke("save_settings", { patch: { fxPresets: userPresets().filter((x) => x.id !== p.id) } }); renderFx(); } }, icon("x")));
|
||||
}
|
||||
|
||||
function eqEditor() {
|
||||
const W = 600, H = 170, PX = 28, PY = 16;
|
||||
const xs = EQ_BANDS.map((_, i) => PX + (i * (W - PX * 2)) / 9);
|
||||
const yOf = (g) => H / 2 - (g / 12) * (H / 2 - PY);
|
||||
const gOf = (y) => Math.max(-12, Math.min(12, Math.round((((H / 2 - y) / (H / 2 - PY)) * 12) * 2) / 2));
|
||||
const wrap = h("div", { class: "eq-editor" });
|
||||
const grid = [12, 6, 0, -6, -12].map((g) => `<path class="${g === 0 ? "zero" : "grid"}" d="M${PX - 8},${yOf(g)} H${W - PX + 8}"/><text x="${PX - 12}" y="${yOf(g) + 3.5}" text-anchor="end">${g > 0 ? "+" : ""}${g}</text>`).join("");
|
||||
wrap.innerHTML = `<svg viewBox="0 0 ${W} ${H + 22}" role="group" aria-label="Equalizer">${grid}<path class="area"/><path class="curve"/>${EQ_BANDS.map((f, i) => `<text class="hz" x="${xs[i]}" y="${H + 16}" text-anchor="middle">${fmtHz(f)}</text>`).join("")}${EQ_BANDS.map((f, i) => `<g class="node" data-i="${i}" tabindex="0" role="slider" aria-label="${fmtHz(f)} hertz" aria-valuemin="-12" aria-valuemax="12"><circle class="hit" r="16"/><circle class="dot" r="7"/><text class="val" y="-14" text-anchor="middle"></text></g>`).join("")}</svg>`;
|
||||
const svgEl = wrap.firstChild;
|
||||
const draw = () => {
|
||||
const eq = Player.fx.eq;
|
||||
const pts = eq.map((g, i) => [xs[i], yOf(g)]);
|
||||
const line = smoothPath(pts);
|
||||
svgEl.querySelector(".curve").setAttribute("d", line);
|
||||
svgEl.querySelector(".area").setAttribute("d", `${line} L${xs[9]},${H / 2} L${xs[0]},${H / 2} Z`);
|
||||
svgEl.querySelectorAll(".node").forEach((n, i) => {
|
||||
n.setAttribute("transform", `translate(${xs[i]},${yOf(eq[i])})`);
|
||||
n.setAttribute("aria-valuenow", eq[i]);
|
||||
n.querySelector(".val").textContent = eq[i] ? `${eq[i] > 0 ? "+" : ""}${eq[i]}` : "0";
|
||||
});
|
||||
};
|
||||
const set = (i, g) => {
|
||||
const eq = [...Player.fx.eq];
|
||||
eq[i] = g;
|
||||
if (Player.bypass) Player.setBypass(false);
|
||||
Player.applyFx({ eq }, "custom");
|
||||
draw();
|
||||
};
|
||||
svgEl.querySelectorAll(".node").forEach((n) => {
|
||||
const i = Number(n.dataset.i);
|
||||
n.addEventListener("pointerdown", (e) => {
|
||||
n.setPointerCapture(e.pointerId);
|
||||
n.classList.add("drag");
|
||||
const move = (ev) => {
|
||||
const r = svgEl.getBoundingClientRect();
|
||||
set(i, gOf(((ev.clientY - r.top) / r.height) * (H + 22)));
|
||||
};
|
||||
const up = () => { n.classList.remove("drag"); n.removeEventListener("pointermove", move); n.removeEventListener("pointerup", up); };
|
||||
n.addEventListener("pointermove", move);
|
||||
n.addEventListener("pointerup", up);
|
||||
});
|
||||
n.addEventListener("dblclick", () => set(i, 0));
|
||||
n.addEventListener("keydown", (e) => {
|
||||
const step = e.shiftKey ? 2 : 0.5;
|
||||
const g = Player.fx.eq[i];
|
||||
if (e.key === "ArrowUp") { e.preventDefault(); set(i, Math.min(12, g + step)); }
|
||||
if (e.key === "ArrowDown") { e.preventDefault(); set(i, Math.max(-12, g - step)); }
|
||||
if (e.key === "Home" || e.key === "0") { e.preventDefault(); set(i, 0); }
|
||||
});
|
||||
});
|
||||
draw();
|
||||
return wrap;
|
||||
}
|
||||
|
||||
function fxRange(value, min, max, step, onInput) {
|
||||
const input = h("input", { type: "range", class: "range strong", min, max, step, value });
|
||||
rangeFill(input);
|
||||
input.addEventListener("input", () => { rangeFill(input); if (Player.bypass) Player.setBypass(false); onInput(Number(input.value)); });
|
||||
return input;
|
||||
}
|
||||
|
||||
function adjustTab() {
|
||||
const fx = Player.fx;
|
||||
const tempoOut = h("output", { class: "big-val" }, `${fx.tempo.toFixed(2)}×`);
|
||||
const tempo = fxRange(fx.tempo, 0.5, 2, 0.01, (v) => { tempoOut.textContent = `${v.toFixed(2)}×`; Player.applyFx({ tempo: v }, "custom"); syncSteps(); });
|
||||
const steps = h("div", { class: "chips tight" }, ...[0.75, 1, 1.25, 1.5].map((v) => h("button", { class: "chip", "data-v": v, onclick: () => { Player.applyFx({ tempo: v }, "custom"); renderFx(); } }, v === 1 ? "Normal" : `${v}×`)));
|
||||
const syncSteps = () => $$(".chip", steps).forEach((c) => c.setAttribute("aria-pressed", String(Number(c.dataset.v) === Player.fx.tempo)));
|
||||
syncSteps();
|
||||
const pitchDisabled = fx.vinyl || (!!Player.ctx && !Player.pitchReady);
|
||||
const pitchVal = h("output", { class: "big-val" }, fx.vinyl ? "Follows speed" : `${fx.pitch > 0 ? "+" : ""}${fx.pitch} st`);
|
||||
const bump = (d) => { Player.applyFx({ pitch: Math.max(-12, Math.min(12, Player.fx.pitch + d)) }, "custom"); renderFx(); };
|
||||
const mode = h("div", { class: "seg wide", role: "radiogroup", "aria-label": "How speed affects pitch" },
|
||||
h("button", { type: "button", role: "radio", "aria-pressed": String(!fx.vinyl), onclick: () => { Player.applyFx({ vinyl: false }, "custom"); renderFx(); } }, "Keep pitch"),
|
||||
h("button", { type: "button", role: "radio", "aria-pressed": String(fx.vinyl), onclick: () => { Player.applyFx({ vinyl: true }, "custom"); renderFx(); } }, "Vinyl"));
|
||||
const wide = h("input", { type: "checkbox", class: "switch", "aria-label": "8D audio" });
|
||||
wide.checked = fx.wide8d;
|
||||
wide.addEventListener("change", () => Player.applyFx({ wide8d: wide.checked }, "custom"));
|
||||
const row = (label, control, value) => h("div", { class: "fx-row" }, h("span", { class: "fx-row-label" }, label), control, value ? h("output", { class: "fx-row-val" }, value) : null);
|
||||
const lpOut = h("output", { class: "fx-row-val" }, fx.lowpass >= 20000 ? "Off" : `${fmtHz(fx.lowpass)}Hz`);
|
||||
const hpOut = h("output", { class: "fx-row-val" }, fx.highpass <= 20 ? "Off" : `${fmtHz(fx.highpass)}Hz`);
|
||||
const rvOut = h("output", { class: "fx-row-val" }, `${Math.round(fx.reverb * 100)}%`);
|
||||
return h("div", { class: "fx-adjust" },
|
||||
h("section", { class: "fx-card" }, h("div", { class: "fx-card-head" }, h("h3", {}, "Equalizer"), h("span", { class: "muted small" }, "Drag the points. Double-click to reset one.")), eqEditor()),
|
||||
h("div", { class: "fx-split" },
|
||||
h("section", { class: "fx-card" },
|
||||
h("h3", {}, "Speed"),
|
||||
h("div", { class: "val-row" }, tempoOut, steps),
|
||||
tempo,
|
||||
h("h3", { class: "gap" }, "Pitch"),
|
||||
h("div", { class: "val-row" }, pitchVal, h("div", { class: "stepper" }, h("button", { type: "button", disabled: pitchDisabled, "aria-label": "Lower pitch", onclick: () => bump(-1) }, "−"), h("button", { type: "button", disabled: pitchDisabled || fx.pitch === 0, "aria-label": "Reset pitch", onclick: () => { Player.applyFx({ pitch: 0 }, "custom"); renderFx(); } }, "0"), h("button", { type: "button", disabled: pitchDisabled, "aria-label": "Raise pitch", onclick: () => bump(1) }, "+"))),
|
||||
mode,
|
||||
h("p", { class: "muted small" }, fx.vinyl ? "Speed changes pitch too, like a turntable." : !Player.pitchReady && Player.ctx ? "Pitch shifting isn't supported by this system's web engine." : "Change speed and pitch separately.")),
|
||||
h("section", { class: "fx-card" },
|
||||
h("h3", {}, "Space"),
|
||||
row("Reverb", fxRange(Math.round(fx.reverb * 100), 0, 100, 1, (v) => { rvOut.textContent = `${v}%`; Player.applyFx({ reverb: v / 100 }, "custom"); }), null), rvOut,
|
||||
h("label", { class: "fx-toggle" }, wide, h("span", {}, h("strong", {}, "8D audio"), h("small", {}, "Circles the sound around you. Best with headphones."))),
|
||||
h("h3", { class: "gap" }, "Filters"),
|
||||
row("High cut", fxRange(UNLOG(fx.lowpass, 400, 20000), 0, 100, 1, (v) => { const f = LOG(v, 400, 20000); lpOut.textContent = f >= 20000 ? "Off" : `${fmtHz(f)}Hz`; Player.applyFx({ lowpass: f }, "custom"); }), null), lpOut,
|
||||
row("Low cut", fxRange(UNLOG(fx.highpass, 20, 1200), 0, 100, 1, (v) => { const f = LOG(v, 20, 1200); hpOut.textContent = f <= 20 ? "Off" : `${fmtHz(f)}Hz`; Player.applyFx({ highpass: f }, "custom"); }), null), hpOut))
|
||||
);
|
||||
}
|
||||
|
||||
function presetsTab() {
|
||||
const mine = userPresets();
|
||||
return h("div", { class: "fx-presets" },
|
||||
h("h3", {}, "Tone"), h("div", { class: "preset-grid" }, ...PRESETS.filter((p) => p.group === "Tone").map((p) => presetTile(p))),
|
||||
h("h3", {}, "Mood"), h("div", { class: "preset-grid" }, ...PRESETS.filter((p) => p.group === "Mood").map((p) => presetTile(p))),
|
||||
h("h3", {}, "Yours"), h("div", { class: "preset-grid" }, ...mine.map((p) => presetTile(p, true)), h("button", { class: "preset add", onclick: savePreset }, icon("plus"), h("span", { class: "preset-name" }, "Save current sound"), h("span", { class: "preset-desc" }, "Keep your tweaks as a preset"))));
|
||||
}
|
||||
|
||||
function renderFx() {
|
||||
const panel = $("#fxPanel");
|
||||
if (panel.hidden) return;
|
||||
const y = panel.querySelector(".fx-scroll")?.scrollTop || 0;
|
||||
const onSw = h("input", { type: "checkbox", class: "switch", "aria-label": "Effects on" });
|
||||
onSw.checked = !Player.bypass;
|
||||
onSw.addEventListener("change", () => { Player.setBypass(!onSw.checked); renderFx(); });
|
||||
const tabs = h("div", { class: "seg", role: "tablist" }, ...[["presets", "Presets"], ["adjust", "Adjust"]].map(([id, label]) => h("button", { type: "button", role: "tab", "aria-pressed": String(Fx.tab === id), "aria-selected": String(Fx.tab === id), onclick: () => { Fx.tab = id; renderFx(); } }, label)));
|
||||
const current = Player.bypass ? "Effects off: original sound" : PRESETS.concat(userPresets()).find((p) => p.id === Player.fx.preset)?.name || (fxActive() ? "Custom" : "Flat");
|
||||
panel.replaceChildren(
|
||||
h("div", { class: "fx-head" },
|
||||
h("div", { class: "fx-title" }, h("h2", {}, "Sound"), h("span", { class: "muted small" }, current)),
|
||||
tabs,
|
||||
h("div", { class: "row" }, h("label", { class: "fx-power", title: "Compare with the original sound" }, h("span", {}, "Effects"), onSw), h("button", { class: "btn small ghost", onclick: () => { Player.resetFx(); renderFx(); } }, "Reset"), h("button", { class: "icon-btn", "aria-label": "Close", onclick: closeFx }, icon("x")))),
|
||||
h("div", { class: `fx-scroll ${Player.bypass ? "bypassed" : ""}` }, Fx.tab === "presets" ? presetsTab() : adjustTab())
|
||||
);
|
||||
panel.querySelector(".fx-scroll").scrollTop = y;
|
||||
$("#fxBtn").setAttribute("aria-pressed", String(fxActive()));
|
||||
}
|
||||
|
||||
async function savePreset() {
|
||||
const input = h("input", { class: "text wide", placeholder: "Preset name", "aria-label": "Preset name" });
|
||||
const ok = await modal("Save sound preset", input, [{ label: "Cancel", value: false }, { label: "Save", value: true, primary: true }]);
|
||||
const name = input.value.trim();
|
||||
if (!ok || !name) return;
|
||||
const { preset, ...fx } = Player.fx;
|
||||
const id = `user-${Date.now()}`;
|
||||
const presets = [...userPresets(), { id, name, group: "Yours", desc: "Your preset", fx }];
|
||||
state.settings = await invoke("save_settings", { patch: { fxPresets: presets } });
|
||||
Player.applyFx({}, id);
|
||||
renderFx();
|
||||
}
|
||||
|
||||
function openFx() {
|
||||
closeDrawers();
|
||||
$("#fxPanel").hidden = false;
|
||||
$("#fxBtn").setAttribute("aria-expanded", "true");
|
||||
renderFx();
|
||||
}
|
||||
|
||||
function closeFx() {
|
||||
$("#fxPanel").hidden = true;
|
||||
$("#fxBtn").setAttribute("aria-expanded", "false");
|
||||
}
|
||||
|
||||
/* queue drawer */
|
||||
function renderQueue() {
|
||||
const panel = $("#queuePanel");
|
||||
if (panel.hidden) return;
|
||||
const now = Player.current;
|
||||
const next = Player.queue.slice(Player.index + 1);
|
||||
const row = (t, i, isNow) => h("div", { class: `q-row ${isNow ? "now" : ""}`, "data-qi": i, ondblclick: () => !isNow && Player.load(i) },
|
||||
cover(t.art, "lt-cover"), h("div", { class: "lt-main" }, h("span", { class: "lt-title" }, t.title), h("span", { class: "lt-sub" }, t.artist)),
|
||||
isNow ? h("span", { class: "flag" }, "Now") : h("button", { class: "icon-btn", "aria-label": `Remove ${t.title}`, onclick: () => Player.removeAt(i) }, icon("x")));
|
||||
panel.replaceChildren(
|
||||
h("div", { class: "drawer-head" }, h("h2", {}, "Queue"), h("div", { class: "row" }, next.length ? h("button", { class: "btn small ghost", onclick: () => Player.clearUpNext() }, "Clear") : null, h("button", { class: "icon-btn", "aria-label": "Close", onclick: closeDrawers }, icon("x")))),
|
||||
h("div", { class: "drawer-body" },
|
||||
now ? row(now, Player.index, true) : h("p", { class: "muted pad" }, "Nothing playing."),
|
||||
next.length ? h("h3", { class: "q-sub" }, `Up next · ${next.length}`) : null,
|
||||
...next.slice(0, 300).map((t, k) => row(t, Player.index + 1 + k, false)))
|
||||
);
|
||||
}
|
||||
|
||||
function closeDrawers() {
|
||||
$$(".drawer-panel").forEach((p) => (p.hidden = true));
|
||||
$$("#lyricsBtn, #queueBtn").forEach((b) => b.setAttribute("aria-pressed", "false"));
|
||||
}
|
||||
|
||||
function toggleDrawer(id, btn, render) {
|
||||
const panel = $(id);
|
||||
const open = panel.hidden;
|
||||
closeDrawers();
|
||||
closeFx();
|
||||
panel.hidden = !open;
|
||||
$(btn).setAttribute("aria-pressed", String(open));
|
||||
if (open) render();
|
||||
}
|
||||
|
||||
/* wiring */
|
||||
function bindPlayer() {
|
||||
$("#playBtn").addEventListener("click", () => Player.toggle());
|
||||
$("#prevBtn").addEventListener("click", () => Player.prev());
|
||||
$("#nextBtn").addEventListener("click", () => Player.next());
|
||||
$("#shuffleBtn").addEventListener("click", () => Player.toggleShuffle());
|
||||
$("#repeatBtn").addEventListener("click", () => Player.cycleRepeat());
|
||||
$("#muteBtn").addEventListener("click", () => Player.toggleMute());
|
||||
$("#npTitle").addEventListener("click", () => {
|
||||
const t = Player.current;
|
||||
if (t?.album) openLib("album", `${lnorm(t.albumArtist || primaryArtist(t.artist))}|${lnorm(t.album)}`);
|
||||
});
|
||||
const seek = $("#seek");
|
||||
seek.addEventListener("input", () => {
|
||||
rangeFill(seek);
|
||||
const dur = Player.audio.duration;
|
||||
if (isFinite(dur)) $("#tCur").textContent = fmtDur((seek.value / 1000) * dur * 1000);
|
||||
});
|
||||
seek.addEventListener("change", () => Player.seek((seek.value / 1000) * Player.audio.duration));
|
||||
const vol = $("#volume");
|
||||
vol.addEventListener("input", () => { Player.muted = false; Player.setVolume(vol.value / 100); });
|
||||
$("#fxBtn").addEventListener("click", () => ($("#fxPanel").hidden ? openFx() : closeFx()));
|
||||
$("#queueBtn").addEventListener("click", () => toggleDrawer("#queuePanel", "#queueBtn", renderQueue));
|
||||
$("#lyricsBtn").addEventListener("click", () => toggleDrawer("#lyricsPanel", "#lyricsBtn", renderLyricsPanel));
|
||||
$("#tvBtn").addEventListener("click", (e) => chooseTvScreen(e.currentTarget));
|
||||
document.addEventListener("click", (e) => { if (e.target.isConnected && !$("#fxPanel").hidden && !e.target.closest("#fxPanel, #fxBtn, .modal-wrap")) closeFx(); });
|
||||
window.addEventListener("player", (e) => {
|
||||
const type = e.detail.type;
|
||||
if (type === "time") return updateTime();
|
||||
if (type === "volume") return updateVolume();
|
||||
if (type === "fx") return $("#fxBtn").setAttribute("aria-pressed", String(fxActive()));
|
||||
updatePlayerBar();
|
||||
updateTime();
|
||||
if (type === "queue" || type === "track") renderQueue();
|
||||
});
|
||||
document.addEventListener("keydown", (e) => {
|
||||
if (e.target.closest("input, textarea, select, [contenteditable]") || e.altKey) return;
|
||||
const mod = e.ctrlKey || e.metaKey;
|
||||
const k = e.key;
|
||||
if (k === " " && !mod) { e.preventDefault(); Player.toggle(); }
|
||||
else if (k === "ArrowRight" && mod) { e.preventDefault(); Player.next(); }
|
||||
else if (k === "ArrowLeft" && mod) { e.preventDefault(); Player.prev(); }
|
||||
else if (k === "ArrowRight" && !mod) Player.seek(Player.audio.currentTime + 5);
|
||||
else if (k === "ArrowLeft" && !mod) Player.seek(Player.audio.currentTime - 5);
|
||||
else if (k.toLowerCase() === "m" && !mod) Player.toggleMute();
|
||||
else if (k.toLowerCase() === "l" && !mod) $("#lyricsBtn").click();
|
||||
else if (k.toLowerCase() === "q" && !mod) $("#queueBtn").click();
|
||||
else if (k.toLowerCase() === "f" && !mod) openTv();
|
||||
});
|
||||
updatePlayerBar();
|
||||
updateTime();
|
||||
updateVolume();
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/* atmosphere · pitch-worklet.js · Real-time pitch shifter (dual crossfaded delay taps) that changes pitch without changing tempo. */
|
||||
class PitchShifter extends AudioWorkletProcessor {
|
||||
static get parameterDescriptors() {
|
||||
return [{ name: "ratio", defaultValue: 1, minValue: 0.25, maxValue: 4, automationRate: "k-rate" }];
|
||||
}
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.size = 1 << 16;
|
||||
this.mask = this.size - 1;
|
||||
this.buffers = [];
|
||||
this.write = 0;
|
||||
this.phase = 0;
|
||||
this.window = Math.round(sampleRate * 0.07);
|
||||
}
|
||||
|
||||
tap(buf, pos) {
|
||||
const i = Math.floor(pos);
|
||||
const f = pos - i;
|
||||
const a = buf[i & this.mask];
|
||||
const b = buf[(i + 1) & this.mask];
|
||||
return a + (b - a) * f;
|
||||
}
|
||||
|
||||
process(inputs, outputs, params) {
|
||||
const input = inputs[0];
|
||||
const output = outputs[0];
|
||||
if (!input || input.length === 0) return true;
|
||||
const channels = Math.min(input.length, output.length);
|
||||
while (this.buffers.length < channels) this.buffers.push(new Float32Array(this.size));
|
||||
const n = input[0].length;
|
||||
const ratio = params.ratio[0];
|
||||
const bypass = Math.abs(ratio - 1) < 0.001;
|
||||
const win = this.window;
|
||||
const step = (1 - ratio) / win;
|
||||
for (let i = 0; i < n; i++) {
|
||||
for (let c = 0; c < channels; c++) this.buffers[c][this.write] = input[c][i];
|
||||
if (bypass) {
|
||||
for (let c = 0; c < channels; c++) output[c][i] = input[c][i];
|
||||
} else {
|
||||
const p1 = this.phase;
|
||||
const p2 = (p1 + 0.5) % 1;
|
||||
const s1 = Math.sin(Math.PI * p1);
|
||||
const g1 = s1 * s1;
|
||||
const g2 = 1 - g1;
|
||||
const r1 = this.write - p1 * win;
|
||||
const r2 = this.write - p2 * win;
|
||||
for (let c = 0; c < channels; c++) {
|
||||
const buf = this.buffers[c];
|
||||
output[c][i] = this.tap(buf, r1) * g1 + this.tap(buf, r2) * g2;
|
||||
}
|
||||
this.phase += step;
|
||||
this.phase -= Math.floor(this.phase);
|
||||
}
|
||||
this.write = (this.write + 1) & this.mask;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
registerProcessor("pitch-shifter", PitchShifter);
|
||||
@@ -0,0 +1,428 @@
|
||||
/* atmosphere · player.js · Audio engine: queue, shuffle/repeat, EQ presets, filters, reverb, 8D, pitch and tempo, media keys and resume. */
|
||||
const MEDIA_BASE = /Windows/.test(navigator.userAgent) ? "http://atmo.localhost/" : "atmo://localhost/";
|
||||
const mediaUrl = (kind, id) => `${MEDIA_BASE}${kind}/${encodeURIComponent(id)}`;
|
||||
const artUrl = (key) => (key ? mediaUrl("a", key) : null);
|
||||
|
||||
const EQ_BANDS = [31, 62, 125, 250, 500, 1000, 2000, 4000, 8000, 16000];
|
||||
const FX_DEFAULT = { preset: "flat", eq: EQ_BANDS.map(() => 0), tempo: 1, pitch: 0, vinyl: false, lowpass: 20000, highpass: 20, reverb: 0, wide8d: false };
|
||||
|
||||
const PRESETS = [
|
||||
{ id: "flat", name: "Flat", desc: "No changes", group: "Tone", fx: {} },
|
||||
{ id: "bass", name: "Bass boost", desc: "Fuller low end", group: "Tone", fx: { eq: [7, 6, 4, 2, 0, 0, 0, 0, 0, 0] } },
|
||||
{ id: "treble", name: "Treble boost", desc: "Crisper highs", group: "Tone", fx: { eq: [0, 0, 0, 0, 0, 1, 2, 4, 5, 6] } },
|
||||
{ id: "vocal", name: "Vocal", desc: "Voices up front", group: "Tone", fx: { eq: [-3, -2, -1, 1, 3, 4, 3, 1, 0, -1] } },
|
||||
{ id: "loud", name: "Loudness", desc: "Punchy at low volume", group: "Tone", fx: { eq: [5, 4, 2, 0, -1, 0, 1, 3, 4, 4] } },
|
||||
{ id: "rock", name: "Rock", desc: "Big edges, scooped mids", group: "Tone", fx: { eq: [4, 3, 2, 0, -1, -1, 1, 2, 3, 4] } },
|
||||
{ id: "hiphop", name: "Hip-hop", desc: "Deep kick, clear vocals", group: "Tone", fx: { eq: [5, 4, 1, 2, -1, -1, 1, 0, 1, 2] } },
|
||||
{ id: "electronic", name: "Electronic", desc: "Sub bass and sparkle", group: "Tone", fx: { eq: [4, 3, 1, 0, -2, 1, 0, 1, 3, 4] } },
|
||||
{ id: "acoustic", name: "Acoustic", desc: "Warm and natural", group: "Tone", fx: { eq: [3, 3, 2, 1, 1, 1, 2, 2, 2, 1] } },
|
||||
{ id: "nightcore", name: "Nightcore", desc: "Faster and higher", group: "Mood", fx: { tempo: 1.25, vinyl: true, eq: [2, 1, 0, 0, 0, 0, 1, 2, 2, 2] } },
|
||||
{ id: "slowed", name: "Slowed + reverb", desc: "Slower, deeper, roomy", group: "Mood", fx: { tempo: 0.85, vinyl: true, reverb: 0.38, eq: [3, 2, 1, 0, 0, 0, -1, -2, -2, -3] } },
|
||||
{ id: "vaporwave", name: "Vaporwave", desc: "Slow, dreamy, muffled", group: "Mood", fx: { tempo: 0.8, vinyl: true, lowpass: 9000, reverb: 0.22 } },
|
||||
{ id: "lofi", name: "Lo-fi", desc: "Warm, dusty, soft", group: "Mood", fx: { lowpass: 3600, highpass: 140, reverb: 0.14, eq: [2, 2, 1, 0, 0, -1, -2, -3, -4, -5] } },
|
||||
{ id: "8d", name: "8D audio", desc: "Sound circles your head", group: "Mood", fx: { wide8d: true, reverb: 0.16 } },
|
||||
{ id: "hall", name: "Concert hall", desc: "A big, live room", group: "Mood", fx: { reverb: 0.45, eq: [1, 1, 0, 0, 0, 0, 0, 1, 1, 0] } },
|
||||
];
|
||||
|
||||
const Player = {
|
||||
audio: new Audio(),
|
||||
ctx: null,
|
||||
nodes: null,
|
||||
pitchReady: false,
|
||||
queue: [],
|
||||
index: -1,
|
||||
shuffle: false,
|
||||
repeat: "off",
|
||||
volume: 0.85,
|
||||
muted: false,
|
||||
fx: structuredClone(FX_DEFAULT),
|
||||
bypass: false,
|
||||
countedPlay: false,
|
||||
lookup: () => null,
|
||||
listenId: null,
|
||||
listenMs: 0,
|
||||
lastTick: 0,
|
||||
|
||||
flushListen() {
|
||||
if (this.listenId && this.listenMs >= 1000) invoke("track_listened", { id: this.listenId, ms: Math.round(this.listenMs) }).catch(() => {});
|
||||
this.listenMs = 0;
|
||||
this.listenId = this.current?.id || null;
|
||||
},
|
||||
|
||||
emit(type, extra = {}) {
|
||||
window.dispatchEvent(new CustomEvent("player", { detail: { type, ...extra } }));
|
||||
},
|
||||
|
||||
get current() {
|
||||
return this.queue[this.index] || null;
|
||||
},
|
||||
|
||||
async ensureGraph() {
|
||||
if (this.ctx) {
|
||||
if (this.ctx.state === "suspended") await this.ctx.resume();
|
||||
return;
|
||||
}
|
||||
const AC = window.AudioContext || window.webkitAudioContext;
|
||||
const ctx = new AC();
|
||||
this.ctx = ctx;
|
||||
const src = ctx.createMediaElementSource(this.audio);
|
||||
let pitch = null;
|
||||
try {
|
||||
await ctx.audioWorklet.addModule("pitch-worklet.js");
|
||||
pitch = new AudioWorkletNode(ctx, "pitch-shifter", { outputChannelCount: [2] });
|
||||
this.pitchReady = true;
|
||||
} catch {
|
||||
this.pitchReady = false;
|
||||
}
|
||||
const hp = ctx.createBiquadFilter();
|
||||
hp.type = "highpass";
|
||||
const lp = ctx.createBiquadFilter();
|
||||
lp.type = "lowpass";
|
||||
const eq = EQ_BANDS.map((f, i) => {
|
||||
const b = ctx.createBiquadFilter();
|
||||
b.type = i === 0 ? "lowshelf" : i === EQ_BANDS.length - 1 ? "highshelf" : "peaking";
|
||||
b.frequency.value = f;
|
||||
b.Q.value = 1.1;
|
||||
return b;
|
||||
});
|
||||
const dry = ctx.createGain();
|
||||
const wet = ctx.createGain();
|
||||
const verb = ctx.createConvolver();
|
||||
verb.buffer = this.impulse(ctx, 2.6, 2.4);
|
||||
const sum = ctx.createGain();
|
||||
const pan = ctx.createStereoPanner();
|
||||
const lfo = ctx.createOscillator();
|
||||
lfo.frequency.value = 0.11;
|
||||
const lfoDepth = ctx.createGain();
|
||||
lfoDepth.gain.value = 0;
|
||||
lfo.connect(lfoDepth).connect(pan.pan);
|
||||
lfo.start();
|
||||
const vol = ctx.createGain();
|
||||
const analyser = ctx.createAnalyser();
|
||||
analyser.fftSize = 256;
|
||||
let head = src;
|
||||
if (pitch) head = head.connect(pitch);
|
||||
head = head.connect(hp).connect(lp);
|
||||
for (const b of eq) head = head.connect(b);
|
||||
head.connect(dry).connect(sum);
|
||||
head.connect(verb).connect(wet).connect(sum);
|
||||
sum.connect(pan).connect(vol).connect(analyser).connect(ctx.destination);
|
||||
this.nodes = { pitch, hp, lp, eq, dry, wet, lfoDepth, vol, analyser };
|
||||
this.applyFx({});
|
||||
this.setVolume(this.volume);
|
||||
},
|
||||
|
||||
impulse(ctx, seconds, decay) {
|
||||
const len = Math.floor(ctx.sampleRate * seconds);
|
||||
const buf = ctx.createBuffer(2, len, ctx.sampleRate);
|
||||
for (let c = 0; c < 2; c++) {
|
||||
const d = buf.getChannelData(c);
|
||||
for (let i = 0; i < len; i++) d[i] = (Math.random() * 2 - 1) * Math.pow(1 - i / len, decay);
|
||||
}
|
||||
return buf;
|
||||
},
|
||||
|
||||
applyFx(partial, presetId) {
|
||||
this.fx = { ...this.fx, ...partial };
|
||||
if (presetId !== undefined) this.fx.preset = presetId;
|
||||
const fx = this.bypass ? FX_DEFAULT : this.fx;
|
||||
this.audio.playbackRate = fx.tempo;
|
||||
this.audio.preservesPitch = !fx.vinyl;
|
||||
this.audio.webkitPreservesPitch = !fx.vinyl;
|
||||
const n = this.nodes;
|
||||
if (n) {
|
||||
const t = this.ctx.currentTime;
|
||||
const ratio = fx.vinyl ? 1 : Math.pow(2, fx.pitch / 12);
|
||||
n.pitch?.parameters.get("ratio").setValueAtTime(ratio, t);
|
||||
n.hp.frequency.setTargetAtTime(fx.highpass, t, 0.02);
|
||||
n.lp.frequency.setTargetAtTime(fx.lowpass, t, 0.02);
|
||||
n.eq.forEach((b, i) => b.gain.setTargetAtTime(fx.eq[i] || 0, t, 0.02));
|
||||
n.wet.gain.setTargetAtTime(fx.reverb * 0.9, t, 0.05);
|
||||
n.dry.gain.setTargetAtTime(1 - fx.reverb * 0.45, t, 0.05);
|
||||
n.lfoDepth.gain.setTargetAtTime(fx.wide8d ? 0.85 : 0, t, 0.1);
|
||||
}
|
||||
this.persist();
|
||||
this.emit("fx");
|
||||
},
|
||||
|
||||
setBypass(on) {
|
||||
this.bypass = on;
|
||||
this.applyFx({});
|
||||
},
|
||||
|
||||
usePreset(p) {
|
||||
this.applyFx({ ...structuredClone(FX_DEFAULT), ...structuredClone(p.fx) }, p.id);
|
||||
},
|
||||
|
||||
resetFx() {
|
||||
this.applyFx(structuredClone(FX_DEFAULT), "flat");
|
||||
},
|
||||
|
||||
setVolume(v) {
|
||||
this.volume = Math.max(0, Math.min(1, v));
|
||||
const level = this.muted ? 0 : this.volume * this.volume;
|
||||
if (this.nodes) {
|
||||
this.audio.volume = 1;
|
||||
this.nodes.vol.gain.setTargetAtTime(level, this.ctx.currentTime, 0.015);
|
||||
} else {
|
||||
this.audio.volume = level;
|
||||
}
|
||||
this.persist();
|
||||
this.emit("volume");
|
||||
},
|
||||
|
||||
toggleMute() {
|
||||
this.muted = !this.muted;
|
||||
this.setVolume(this.volume);
|
||||
},
|
||||
|
||||
async load(i, autoplay = true, startAt = 0) {
|
||||
if (i < 0 || i >= this.queue.length) return;
|
||||
this.flushListen();
|
||||
this.index = i;
|
||||
const t = this.current;
|
||||
this.listenId = t.id;
|
||||
this.countedPlay = false;
|
||||
this.audio.src = mediaUrl("t", t.id);
|
||||
if (startAt) this.audio.addEventListener("loadedmetadata", () => (this.audio.currentTime = startAt), { once: true });
|
||||
this.updateSession();
|
||||
this.emit("track");
|
||||
this.persist();
|
||||
if (autoplay) await this.play();
|
||||
},
|
||||
|
||||
async play() {
|
||||
if (!this.current) return;
|
||||
try {
|
||||
await this.ensureGraph();
|
||||
await this.audio.play();
|
||||
} catch (e) {
|
||||
if (e?.name === "NotAllowedError") toast("Click play to start audio.", "err");
|
||||
}
|
||||
},
|
||||
|
||||
pause() {
|
||||
this.audio.pause();
|
||||
},
|
||||
|
||||
toggle() {
|
||||
if (!this.current) return;
|
||||
this.audio.paused ? this.play() : this.pause();
|
||||
},
|
||||
|
||||
async setQueue(tracks, start = 0, shuffle = null) {
|
||||
if (!tracks.length) return;
|
||||
if (shuffle !== null) this.shuffle = shuffle;
|
||||
let list = [...tracks];
|
||||
let first = start;
|
||||
if (this.shuffle) {
|
||||
const pick = list.splice(start, 1)[0];
|
||||
for (let i = list.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[list[i], list[j]] = [list[j], list[i]];
|
||||
}
|
||||
list = [pick, ...list];
|
||||
first = 0;
|
||||
}
|
||||
this.queue = list;
|
||||
this.emit("queue");
|
||||
await this.load(first);
|
||||
},
|
||||
|
||||
playNext(tracks) {
|
||||
if (!this.current) return this.setQueue(tracks);
|
||||
this.queue.splice(this.index + 1, 0, ...tracks);
|
||||
this.emit("queue");
|
||||
this.persist();
|
||||
},
|
||||
|
||||
addToQueue(tracks) {
|
||||
if (!this.current) return this.setQueue(tracks);
|
||||
this.queue.push(...tracks);
|
||||
this.emit("queue");
|
||||
this.persist();
|
||||
},
|
||||
|
||||
removeAt(i) {
|
||||
if (i === this.index) return;
|
||||
this.queue.splice(i, 1);
|
||||
if (i < this.index) this.index--;
|
||||
this.emit("queue");
|
||||
this.persist();
|
||||
},
|
||||
|
||||
clearUpNext() {
|
||||
this.queue = this.current ? [this.current] : [];
|
||||
this.index = this.current ? 0 : -1;
|
||||
this.emit("queue");
|
||||
this.persist();
|
||||
},
|
||||
|
||||
async next(auto = false) {
|
||||
if (!this.queue.length) return;
|
||||
if (auto && this.repeat === "one") {
|
||||
this.audio.currentTime = 0;
|
||||
return this.play();
|
||||
}
|
||||
if (this.index + 1 < this.queue.length) return this.load(this.index + 1);
|
||||
if (this.repeat === "all") return this.load(0);
|
||||
if (auto) {
|
||||
this.audio.currentTime = 0;
|
||||
this.pause();
|
||||
this.emit("state");
|
||||
}
|
||||
},
|
||||
|
||||
async prev() {
|
||||
if (this.audio.currentTime > 3 || this.index === 0) {
|
||||
this.audio.currentTime = 0;
|
||||
return;
|
||||
}
|
||||
await this.load(this.index - 1);
|
||||
},
|
||||
|
||||
seek(seconds) {
|
||||
if (!isFinite(this.audio.duration)) return;
|
||||
this.audio.currentTime = Math.max(0, Math.min(this.audio.duration, seconds));
|
||||
},
|
||||
|
||||
toggleShuffle() {
|
||||
this.shuffle = !this.shuffle;
|
||||
if (this.current && this.shuffle) {
|
||||
const cur = this.current;
|
||||
const rest = this.queue.filter((_, i) => i !== this.index);
|
||||
for (let i = rest.length - 1; i > 0; i--) {
|
||||
const j = Math.floor(Math.random() * (i + 1));
|
||||
[rest[i], rest[j]] = [rest[j], rest[i]];
|
||||
}
|
||||
this.queue = [cur, ...rest];
|
||||
this.index = 0;
|
||||
this.emit("queue");
|
||||
}
|
||||
this.persist();
|
||||
this.emit("state");
|
||||
},
|
||||
|
||||
cycleRepeat() {
|
||||
this.repeat = { off: "all", all: "one", one: "off" }[this.repeat];
|
||||
this.persist();
|
||||
this.emit("state");
|
||||
},
|
||||
|
||||
updateSession() {
|
||||
const t = this.current;
|
||||
if (!t || !("mediaSession" in navigator)) return;
|
||||
const art = artUrl(t.art);
|
||||
navigator.mediaSession.metadata = new MediaMetadata({ title: t.title, artist: t.artist, album: t.album, artwork: art ? [{ src: art, sizes: "600x600", type: "image/jpeg" }] : [] });
|
||||
},
|
||||
|
||||
persist() {
|
||||
clearTimeout(this._persist);
|
||||
this._persist = setTimeout(() => {
|
||||
try {
|
||||
localStorage.setItem("atmo.player", JSON.stringify({ queue: this.queue.map((t) => t.id), index: this.index, time: this.audio.currentTime || 0, volume: this.volume, shuffle: this.shuffle, repeat: this.repeat, fx: this.fx, bypass: this.bypass }));
|
||||
} catch {}
|
||||
}, 400);
|
||||
},
|
||||
|
||||
restore(lookup) {
|
||||
this.lookup = lookup;
|
||||
let saved = null;
|
||||
try {
|
||||
saved = JSON.parse(localStorage.getItem("atmo.player") || "null");
|
||||
} catch {}
|
||||
if (!saved) return;
|
||||
this.volume = saved.volume ?? this.volume;
|
||||
this.shuffle = !!saved.shuffle;
|
||||
this.repeat = saved.repeat || "off";
|
||||
this.fx = { ...structuredClone(FX_DEFAULT), ...(saved.fx || {}) };
|
||||
this.bypass = !!saved.bypass;
|
||||
this.queue = (saved.queue || []).map(lookup).filter(Boolean);
|
||||
if (this.queue.length) this.load(Math.min(Math.max(0, saved.index), this.queue.length - 1), false, saved.time || 0);
|
||||
this.applyFx({});
|
||||
this.setVolume(this.volume);
|
||||
this.emit("queue");
|
||||
},
|
||||
|
||||
refreshTracks(lookup) {
|
||||
this.lookup = lookup;
|
||||
const cur = this.current?.id;
|
||||
const gone = cur && !lookup(cur);
|
||||
const before = this.index;
|
||||
const kept = [];
|
||||
let nextIndex = -1;
|
||||
this.queue.forEach((t, i) => {
|
||||
const fresh = lookup(t.id);
|
||||
if (fresh) {
|
||||
if (i === before) nextIndex = kept.length;
|
||||
if (gone && nextIndex < 0 && i > before) nextIndex = kept.length;
|
||||
kept.push(fresh);
|
||||
}
|
||||
});
|
||||
this.queue = kept;
|
||||
if (gone) {
|
||||
const wasPlaying = !this.audio.paused;
|
||||
this.audio.pause();
|
||||
this.audio.removeAttribute("src");
|
||||
this.audio.load();
|
||||
if (nextIndex >= 0) this.load(nextIndex, wasPlaying);
|
||||
else this.index = -1;
|
||||
} else {
|
||||
this.index = cur ? this.queue.findIndex((t) => t.id === cur) : this.index;
|
||||
}
|
||||
this.emit("queue");
|
||||
this.emit("track");
|
||||
this.persist();
|
||||
},
|
||||
};
|
||||
|
||||
(() => {
|
||||
const a = Player.audio;
|
||||
a.preload = "auto";
|
||||
a.crossOrigin = "anonymous";
|
||||
a.addEventListener("play", () => Player.emit("state"));
|
||||
a.addEventListener("pause", () => Player.emit("state"));
|
||||
a.addEventListener("ended", () => { Player.flushListen(); Player.next(true); });
|
||||
a.addEventListener("playing", () => (Player.lastTick = performance.now()));
|
||||
document.addEventListener("visibilitychange", () => { if (document.visibilityState === "hidden") { Player.flushListen(); } });
|
||||
window.addEventListener("beforeunload", () => Player.flushListen());
|
||||
let streak = 0;
|
||||
a.addEventListener("playing", () => (streak = 0));
|
||||
a.addEventListener("error", () => {
|
||||
if (!a.src || !Player.current) return;
|
||||
streak++;
|
||||
if (streak === 1) toast(`Couldn't play “${Player.current.title}”. The file may have moved or be unreadable.`, "err");
|
||||
if (streak >= 3) {
|
||||
toast("Several songs in a row couldn't be played, so playback stopped. Try Settings → Library → Rescan.", "err");
|
||||
return;
|
||||
}
|
||||
if (Player.index + 1 < Player.queue.length) Player.next(true);
|
||||
});
|
||||
a.addEventListener("timeupdate", () => {
|
||||
Player.emit("time");
|
||||
const nowTick = performance.now();
|
||||
if (!a.paused && Player.lastTick) {
|
||||
const d = nowTick - Player.lastTick;
|
||||
if (d > 0 && d < 2000) Player.listenMs += d;
|
||||
}
|
||||
Player.lastTick = nowTick;
|
||||
const t = Player.current;
|
||||
if (t && !Player.countedPlay && a.currentTime > Math.min(30, (a.duration || 60) * 0.5)) {
|
||||
Player.countedPlay = true;
|
||||
invoke("track_played", { id: t.id }).catch(() => {});
|
||||
window.dispatchEvent(new CustomEvent("played", { detail: t.id }));
|
||||
}
|
||||
if (Math.floor(a.currentTime) % 5 === 0) Player.persist();
|
||||
});
|
||||
a.addEventListener("loadedmetadata", () => Player.emit("time"));
|
||||
if ("mediaSession" in navigator) {
|
||||
const ms = navigator.mediaSession;
|
||||
ms.setActionHandler("play", () => Player.play());
|
||||
ms.setActionHandler("pause", () => Player.pause());
|
||||
ms.setActionHandler("previoustrack", () => Player.prev());
|
||||
ms.setActionHandler("nexttrack", () => Player.next());
|
||||
try {
|
||||
ms.setActionHandler("seekto", (d) => Player.seek(d.seekTime));
|
||||
} catch {}
|
||||
}
|
||||
})();
|
||||
@@ -0,0 +1,291 @@
|
||||
/* atmosphere · stats.js · Listening stats (week/month/year/all), top songs/artists/albums, and shareable social-size stat cards. */
|
||||
const Stats = { period: "month", offset: 0, data: null };
|
||||
const DAY = 86400000;
|
||||
|
||||
function periodRange(period, offset) {
|
||||
const now = new Date();
|
||||
if (period === "week") {
|
||||
const d = new Date(now.getFullYear(), now.getMonth(), now.getDate());
|
||||
d.setDate(d.getDate() - ((d.getDay() + 6) % 7) + offset * 7);
|
||||
const end = new Date(d);
|
||||
end.setDate(end.getDate() + 7);
|
||||
const fmt = new Intl.DateTimeFormat(undefined, { month: "short", day: "numeric" });
|
||||
return { start: d.getTime(), end: end.getTime(), label: offset === 0 ? "This week" : `${fmt.format(d)} – ${fmt.format(new Date(end.getTime() - DAY))}`, title: offset === 0 ? "My week" : `My week of ${fmt.format(d)}` };
|
||||
}
|
||||
if (period === "month") {
|
||||
const d = new Date(now.getFullYear(), now.getMonth() + offset, 1);
|
||||
const end = new Date(d.getFullYear(), d.getMonth() + 1, 1);
|
||||
const label = new Intl.DateTimeFormat(undefined, { month: "long", year: "numeric" }).format(d);
|
||||
return { start: d.getTime(), end: end.getTime(), label, title: `My ${label}` };
|
||||
}
|
||||
if (period === "year") {
|
||||
const y = now.getFullYear() + offset;
|
||||
return { start: new Date(y, 0, 1).getTime(), end: new Date(y + 1, 0, 1).getTime(), label: String(y), title: `My ${y}` };
|
||||
}
|
||||
return { start: 0, end: Infinity, label: "All time", title: "My all time" };
|
||||
}
|
||||
|
||||
function buckets(period, range) {
|
||||
if (period === "week") return [...Array(7)].map((_, i) => { const d = new Date(range.start + i * DAY); return { start: d.getTime(), end: d.getTime() + DAY, label: new Intl.DateTimeFormat(undefined, { weekday: "short" }).format(d) }; });
|
||||
if (period === "month") {
|
||||
const d = new Date(range.start);
|
||||
const days = new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
|
||||
return [...Array(days)].map((_, i) => { const s = new Date(d.getFullYear(), d.getMonth(), i + 1); return { start: s.getTime(), end: s.getTime() + DAY, label: String(i + 1) }; });
|
||||
}
|
||||
if (period === "year") {
|
||||
const y = new Date(range.start).getFullYear();
|
||||
return [...Array(12)].map((_, i) => ({ start: new Date(y, i, 1).getTime(), end: new Date(y, i + 1, 1).getTime(), label: new Intl.DateTimeFormat(undefined, { month: "short" }).format(new Date(y, i, 1)) }));
|
||||
}
|
||||
const years = [...new Set((Stats.data?.listens || []).map((l) => new Date(l.at).getFullYear()))].sort();
|
||||
return (years.length ? years : [new Date().getFullYear()]).map((y) => ({ start: new Date(y, 0, 1).getTime(), end: new Date(y + 1, 0, 1).getTime(), label: String(y) }));
|
||||
}
|
||||
|
||||
const isPlay = (l, t) => l.ms >= 30000 || (t?.durationMs && l.ms >= t.durationMs * 0.5);
|
||||
const artistOf = (t) => t.albumArtist || primaryArtist(t.artist);
|
||||
const dayKey = (d) => `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
|
||||
|
||||
function fmtHours(ms) {
|
||||
const m = Math.round(ms / 60000);
|
||||
if (m < 60) return `${m} min`;
|
||||
const hh = Math.floor(m / 60);
|
||||
return m % 60 ? `${hh}h ${m % 60}m` : `${hh}h`;
|
||||
}
|
||||
|
||||
function aggregate() {
|
||||
const range = periodRange(Stats.period, Stats.offset);
|
||||
const listens = (Stats.data?.listens || []).filter((l) => l.at >= range.start && l.at < range.end && Lib.byId.has(l.id));
|
||||
const songs = new Map(), artists = new Map(), albums = new Map();
|
||||
let ms = 0, plays = 0;
|
||||
for (const l of listens) {
|
||||
const t = Lib.byId.get(l.id);
|
||||
const p = isPlay(l, t) ? 1 : 0;
|
||||
ms += l.ms;
|
||||
plays += p;
|
||||
const bump = (map, key, extra) => { const e = map.get(key) || { key, plays: 0, ms: 0, ...extra }; e.plays += p; e.ms += l.ms; map.set(key, e); };
|
||||
bump(songs, t.id, { track: t });
|
||||
bump(artists, lnorm(artistOf(t)), { name: artistOf(t) });
|
||||
if (t.album) bump(albums, `${lnorm(artistOf(t))}|${lnorm(t.album)}`, { title: t.album, artist: artistOf(t), art: t.art });
|
||||
}
|
||||
const rank = (m) => [...m.values()].filter((e) => e.ms > 0).sort((a, b) => b.plays - a.plays || b.ms - a.ms);
|
||||
const bars = buckets(Stats.period, range).map((b) => ({ ...b, ms: listens.filter((l) => l.at >= b.start && l.at < b.end).reduce((n, l) => n + l.ms, 0) }));
|
||||
let appSecs = 0;
|
||||
for (const [day, secs] of Object.entries(Stats.data?.appTime || {})) {
|
||||
const t = new Date(`${day}T12:00:00`).getTime();
|
||||
if (t >= range.start && t < range.end) appSecs += secs;
|
||||
}
|
||||
return { range, ms, plays, songs: rank(songs), artists: rank(artists), albums: rank(albums), bars, appMs: appSecs * 1000 };
|
||||
}
|
||||
|
||||
async function loadStats() {
|
||||
Stats.data = await invoke("stats_get").catch(() => ({ listens: [], appTime: {} }));
|
||||
}
|
||||
|
||||
function statsView(root) {
|
||||
if (!Stats.data) {
|
||||
root.append(libHead("Stats", "Loading…"));
|
||||
loadStats().then(() => Lib.route.name === "stats" && renderLib(true));
|
||||
return;
|
||||
}
|
||||
const a = aggregate();
|
||||
const seg = h("div", { class: "seg", role: "tablist", "aria-label": "Period" }, ...[["week", "Week"], ["month", "Month"], ["year", "Year"], ["all", "All time"]].map(([id, label]) => h("button", { type: "button", role: "tab", "aria-pressed": String(Stats.period === id), onclick: () => { Stats.period = id; Stats.offset = 0; renderLib(true); } }, label)));
|
||||
const nav = Stats.period === "all" ? null : h("div", { class: "period-nav" },
|
||||
h("button", { class: "icon-btn", "aria-label": "Previous period", onclick: () => { Stats.offset--; renderLib(true); } }, icon("chevron-left")),
|
||||
h("span", { class: "period-label" }, a.range.label),
|
||||
h("button", { class: "icon-btn", "aria-label": "Next period", disabled: Stats.offset >= 0, onclick: () => { Stats.offset++; renderLib(true); } }, icon("chevron-right")));
|
||||
root.append(libHead("Stats", "Only songs still in your library are counted.", [seg, h("button", { class: "btn", disabled: !a.ms, onclick: () => shareStats(a) }, icon("share"), "Share")]));
|
||||
const body = h("div", { class: "pad-x stats" });
|
||||
if (nav) body.append(nav);
|
||||
if (!a.ms) {
|
||||
body.append(h("div", { class: "lib-empty slim" }, icon("chart-bar"), h("h2", {}, "Nothing played yet"), h("p", {}, Stats.offset ? "No listening in this period." : "Play some music and your stats will build up here.")));
|
||||
return root.append(body);
|
||||
}
|
||||
const card = (label, value, sub) => h("div", { class: "stat-card" }, h("span", { class: "stat-label" }, label), h("strong", { class: "stat-value" }, value), sub ? h("span", { class: "stat-sub" }, sub) : null);
|
||||
body.append(h("div", { class: "stat-cards" },
|
||||
card("Listening time", fmtHours(a.ms), `${Math.round(a.ms / 60000).toLocaleString()} minutes`),
|
||||
card("Plays", a.plays.toLocaleString(), a.plays ? `${fmtDur(a.ms / Math.max(1, a.plays))} average` : null),
|
||||
card("Songs", a.songs.length.toLocaleString(), `${a.artists.length.toLocaleString()} artists`),
|
||||
card("Time in Atmosphere", a.appMs ? fmtHours(a.appMs) : "—", "while the app was open")));
|
||||
const max = Math.max(...a.bars.map((b) => b.ms), 1);
|
||||
const chart = h("div", { class: "chart", role: "img", "aria-label": `Listening time per ${Stats.period === "year" ? "month" : Stats.period === "all" ? "year" : "day"}` },
|
||||
...a.bars.map((b) => h("div", { class: "chart-col", title: `${b.label}: ${fmtHours(b.ms)}` }, h("div", { class: "chart-bar", style: `transform: scaleY(${(b.ms / max).toFixed(3)})` }), h("span", { class: "chart-x" }, a.bars.length > 16 && Number(b.label) % 5 !== 1 && b.label !== "1" ? "" : b.label))));
|
||||
body.append(h("section", { class: "stat-panel" }, h("h2", { class: "sec" }, "When you listened"), chart));
|
||||
const songRows = a.songs.slice(0, 10).map((e, i) => h("div", { class: "rank-row", role: "button", tabindex: "0", ondblclick: () => playList(a.songs.map((x) => x.track), i) },
|
||||
h("span", { class: "rank" }, String(i + 1)), cover(e.track.art, "lt-cover"),
|
||||
h("div", { class: "lt-main" }, h("span", { class: "lt-title" }, e.track.title), h("span", { class: "lt-sub" }, e.track.artist)),
|
||||
h("span", { class: "rank-meta" }, `${plural(e.plays, "play")} · ${fmtHours(e.ms)}`)));
|
||||
const artistRows = a.artists.slice(0, 8).map((e, i) => {
|
||||
const ar = Lib.artists.get(e.key);
|
||||
return h("div", { class: "rank-row", role: "button", tabindex: "0", onclick: () => ar && openLib("artist", ar.key) },
|
||||
h("span", { class: "rank" }, String(i + 1)), cover(ar ? artistImage(ar) : null, "lt-cover round"),
|
||||
h("div", { class: "lt-main" }, h("span", { class: "lt-title" }, e.name), h("span", { class: "lt-sub" }, `${plural(e.plays, "play")} · ${fmtHours(e.ms)}`)));
|
||||
});
|
||||
body.append(h("div", { class: "stat-split" },
|
||||
h("section", { class: "stat-panel" }, h("h2", { class: "sec" }, "Top songs"), ...songRows),
|
||||
h("section", { class: "stat-panel" }, h("h2", { class: "sec" }, "Top artists"), ...artistRows)));
|
||||
if (a.albums.length) {
|
||||
body.append(h("section", { class: "stat-panel" }, h("h2", { class: "sec" }, "Top albums"),
|
||||
h("div", { class: "grid tight" }, ...a.albums.slice(0, 6).map((e) => { const al = Lib.albums.get(e.key); return al ? albumCard(al) : null; }).filter(Boolean))));
|
||||
}
|
||||
root.append(body);
|
||||
}
|
||||
|
||||
/* share cards */
|
||||
const SHARE_SIZES = [
|
||||
{ id: "story", label: "Story", hint: "Instagram, TikTok, Snapchat", w: 1080, h: 1920 },
|
||||
{ id: "square", label: "Square", hint: "Instagram post, Discord", w: 1080, h: 1080 },
|
||||
{ id: "portrait", label: "Portrait", hint: "Instagram, Threads", w: 1080, h: 1350 },
|
||||
{ id: "wide", label: "Wide", hint: "X, Bluesky, Reddit", w: 1600, h: 900 },
|
||||
];
|
||||
const Share = { size: "story", theme: "cover" };
|
||||
|
||||
function loadImg(src) {
|
||||
return new Promise((resolve) => {
|
||||
if (!src) return resolve(null);
|
||||
const img = new Image();
|
||||
img.crossOrigin = "anonymous";
|
||||
img.onload = () => resolve(img);
|
||||
img.onerror = () => resolve(null);
|
||||
img.src = src;
|
||||
});
|
||||
}
|
||||
|
||||
function roundRect(g, x, y, w, hgt, r) {
|
||||
g.beginPath();
|
||||
g.roundRect(x, y, w, hgt, r);
|
||||
}
|
||||
|
||||
function fitText(g, text, maxW) {
|
||||
if (g.measureText(text).width <= maxW) return text;
|
||||
let t = text;
|
||||
while (t.length > 1 && g.measureText(`${t}…`).width > maxW) t = t.slice(0, -1);
|
||||
return `${t}…`;
|
||||
}
|
||||
|
||||
async function drawCard(canvas, a) {
|
||||
const size = SHARE_SIZES.find((s) => s.id === Share.size);
|
||||
canvas.width = size.w;
|
||||
canvas.height = size.h;
|
||||
const g = canvas.getContext("2d");
|
||||
const W = size.w, H = size.h, u = Math.min(W, H) / 1080, wide = W > H;
|
||||
const font = getComputedStyle(document.documentElement).getPropertyValue("--font-display").trim() || "system-ui";
|
||||
const topArt = a.albums[0]?.art || a.songs[0]?.track.art;
|
||||
const [bgImg, lockup, ...covers] = await Promise.all([Share.theme === "cover" ? loadImg(artUrl(topArt)) : null, loadImg("assets/lockup-light.svg"), ...a.songs.slice(0, 5).map((e) => loadImg(artUrl(e.track.art)))]);
|
||||
const sky = g.createRadialGradient(W * 0.5, H * 1.05, 0, W * 0.5, H * 1.05, Math.max(W, H) * 1.1);
|
||||
sky.addColorStop(0, "#3a1f9a");
|
||||
sky.addColorStop(0.38, "#1b1248");
|
||||
sky.addColorStop(0.75, "#0c0b22");
|
||||
sky.addColorStop(1, "#06070f");
|
||||
g.fillStyle = sky;
|
||||
g.fillRect(0, 0, W, H);
|
||||
if (bgImg) {
|
||||
g.save();
|
||||
g.filter = "blur(70px) saturate(1.4) brightness(0.55)";
|
||||
const s = Math.max(W / bgImg.width, H / bgImg.height) * 1.25;
|
||||
g.drawImage(bgImg, (W - bgImg.width * s) / 2, (H - bgImg.height * s) / 2, bgImg.width * s, bgImg.height * s);
|
||||
g.restore();
|
||||
const shade = g.createLinearGradient(0, 0, 0, H);
|
||||
shade.addColorStop(0, "rgba(6,7,15,0.25)");
|
||||
shade.addColorStop(1, "rgba(6,7,15,0.7)");
|
||||
g.fillStyle = shade;
|
||||
g.fillRect(0, 0, W, H);
|
||||
}
|
||||
const pad = 80 * u;
|
||||
if (lockup) {
|
||||
const lh = 64 * u;
|
||||
g.drawImage(lockup, pad, pad, (lockup.width / lockup.height) * lh, lh);
|
||||
}
|
||||
g.fillStyle = "#fff";
|
||||
g.textBaseline = "alphabetic";
|
||||
const colW = wide ? W * 0.42 : W - pad * 2;
|
||||
let y = pad + 64 * u + (wide ? 120 : 150) * u;
|
||||
g.font = `700 ${(wide ? 76 : 92) * u}px ${font}`;
|
||||
g.fillText(fitText(g, a.range.title, colW), pad, y);
|
||||
g.font = `500 ${34 * u}px ${font}`;
|
||||
g.fillStyle = "rgba(255,255,255,0.65)";
|
||||
y += 56 * u;
|
||||
g.fillText("on Atmosphere", pad, y);
|
||||
const stat = (label, value, x, yy) => {
|
||||
g.fillStyle = "rgba(255,255,255,0.6)";
|
||||
g.font = `600 ${26 * u}px ${font}`;
|
||||
g.fillText(label.toUpperCase(), x, yy);
|
||||
g.fillStyle = "#fff";
|
||||
g.font = `700 ${68 * u}px ${font}`;
|
||||
g.fillText(value, x, yy + 74 * u);
|
||||
};
|
||||
y += (wide ? 90 : 120) * u;
|
||||
stat("Listened", fmtHours(a.ms), pad, y);
|
||||
stat("Plays", a.plays.toLocaleString(), pad + colW * 0.55, y);
|
||||
y += 160 * u;
|
||||
if (a.artists[0]) {
|
||||
g.fillStyle = "rgba(255,255,255,0.6)";
|
||||
g.font = `600 ${26 * u}px ${font}`;
|
||||
g.fillText("TOP ARTIST", pad, y);
|
||||
g.fillStyle = "#fff";
|
||||
g.font = `700 ${56 * u}px ${font}`;
|
||||
g.fillText(fitText(g, a.artists[0].name, colW), pad, y + 66 * u);
|
||||
y += 140 * u;
|
||||
}
|
||||
const listX = wide ? W * 0.52 : pad;
|
||||
const listW = wide ? W - listX - pad : W - pad * 2;
|
||||
const n = wide ? 5 : Share.size === "square" ? 3 : 5;
|
||||
const rowH = wide ? 132 * u : Share.size === "square" ? 104 * u : Share.size === "story" ? 168 * u : 124 * u;
|
||||
const block = 30 * u + n * rowH;
|
||||
let ly = wide ? Math.max(pad + 40 * u, (H - block) / 2) : y + Math.max(20 * u, (H - pad - 60 * u - y - block) / 2);
|
||||
const coverS = rowH - 24 * u;
|
||||
g.fillStyle = "rgba(255,255,255,0.6)";
|
||||
g.font = `600 ${26 * u}px ${font}`;
|
||||
g.fillText("TOP SONGS", listX, ly);
|
||||
ly += 30 * u;
|
||||
a.songs.slice(0, n).forEach((e, i) => {
|
||||
const top = ly + i * rowH;
|
||||
g.fillStyle = "rgba(255,255,255,0.5)";
|
||||
g.font = `700 ${34 * u}px ${font}`;
|
||||
g.fillText(String(i + 1), listX, top + rowH / 2 + 12 * u);
|
||||
const cx = listX + 56 * u;
|
||||
g.save();
|
||||
roundRect(g, cx, top + 12 * u, coverS, coverS, 14 * u);
|
||||
g.clip();
|
||||
if (covers[i]) g.drawImage(covers[i], cx, top + 12 * u, coverS, coverS);
|
||||
else {
|
||||
g.fillStyle = "rgba(255,255,255,0.12)";
|
||||
g.fill();
|
||||
}
|
||||
g.restore();
|
||||
const tx = cx + coverS + 28 * u;
|
||||
const tw = listW - (tx - listX);
|
||||
g.fillStyle = "#fff";
|
||||
g.font = `650 ${38 * u}px ${font}`;
|
||||
g.fillText(fitText(g, e.track.title, tw), tx, top + rowH / 2 - 2 * u);
|
||||
g.fillStyle = "rgba(255,255,255,0.62)";
|
||||
g.font = `500 ${28 * u}px ${font}`;
|
||||
g.fillText(fitText(g, `${e.track.artist} · ${plural(e.plays, "play")}`, tw), tx, top + rowH / 2 + 38 * u);
|
||||
});
|
||||
g.fillStyle = "rgba(255,255,255,0.45)";
|
||||
g.font = `500 ${24 * u}px ${font}`;
|
||||
g.fillText(a.range.label, pad, H - pad + 10 * u);
|
||||
}
|
||||
|
||||
async function shareStats(a) {
|
||||
const canvas = h("canvas", { class: "share-canvas", "aria-label": "Share card preview" });
|
||||
const redraw = async () => {
|
||||
await drawCard(canvas, a);
|
||||
sizeRow.querySelectorAll(".chip").forEach((c) => c.setAttribute("aria-pressed", String(c.dataset.id === Share.size)));
|
||||
themeRow.querySelectorAll(".chip").forEach((c) => c.setAttribute("aria-pressed", String(c.dataset.id === Share.theme)));
|
||||
};
|
||||
const sizeRow = h("div", { class: "chips" }, ...SHARE_SIZES.map((s) => h("button", { class: "chip", "data-id": s.id, title: `${s.w}×${s.h} · ${s.hint}`, onclick: () => { Share.size = s.id; redraw(); } }, s.label)));
|
||||
const themeRow = h("div", { class: "chips" }, h("button", { class: "chip", "data-id": "cover", onclick: () => { Share.theme = "cover"; redraw(); } }, "Cover art"), h("button", { class: "chip", "data-id": "night", onclick: () => { Share.theme = "night"; redraw(); } }, "Night sky"));
|
||||
const actions = h("div", { class: "row" },
|
||||
h("button", { class: "btn primary", onclick: async () => { try { const p = await invoke("image_save", { data: canvas.toDataURL("image/png"), name: `atmosphere-${Stats.period}-${Share.size}.png` }); if (p) toast("Saved your stats image", "ok"); } catch (e) { toast(errText(e), "err"); } } }, icon("photo-down"), "Save image…"),
|
||||
h("button", { class: "btn", onclick: async () => { try { await invoke("image_copy", { data: canvas.toDataURL("image/png") }); toast("Copied. Paste it anywhere", "ok"); } catch (e) { toast(errText(e), "err"); } } }, icon("copy"), "Copy"));
|
||||
const body = h("div", { class: "share" }, h("div", { class: "share-preview" }, canvas), h("div", { class: "share-side" }, h("h3", {}, "Size"), sizeRow, h("p", { class: "muted small" }, "Story 1080×1920 · Square 1080×1080 · Portrait 1080×1350 · Wide 1600×900"), h("h3", {}, "Look"), themeRow, actions));
|
||||
redraw();
|
||||
await modal("Share your stats", body, [{ label: "Done", value: true }]);
|
||||
}
|
||||
|
||||
function bindStats() {
|
||||
window.addEventListener("played", () => { Stats.data = null; });
|
||||
listen("atmosphere://library", (e) => { if (e.payload.type === "changed") Stats.data = null; });
|
||||
setInterval(() => {
|
||||
if (document.visibilityState === "visible") invoke("app_heartbeat", { day: dayKey(new Date()), secs: 60 }).catch(() => {});
|
||||
}, 60000);
|
||||
}
|
||||
@@ -0,0 +1,884 @@
|
||||
/* atmosphere · styles.css · Visual system for the Atmosphere window (tokens locked in .tastemaker/style-lock.md). */
|
||||
/* tastemaker stamp: surface=app-shell · lane=calm-native, cover-art-tinted · palette=hand-tuned, matrix-verified (style-lock) · critique show5 phil4 hier4 spec5 restraint5 variety4 */
|
||||
:root {
|
||||
--bg: #0f1117;
|
||||
--sidebar: #0b0d12;
|
||||
--surface: #171a23;
|
||||
--surface-2: #1d212c;
|
||||
--hover: rgba(236, 238, 244, 0.05);
|
||||
--press: rgba(236, 238, 244, 0.09);
|
||||
--border: #2a2f3d;
|
||||
--hairline: rgba(236, 238, 244, 0.07);
|
||||
--text: #eceef4;
|
||||
--text-2: #a1a7b8;
|
||||
--text-3: #80869a;
|
||||
--primary: #5b63e6;
|
||||
--primary-hover: #6970ee;
|
||||
--on-primary: #ffffff;
|
||||
--accent: #9aa4ff;
|
||||
--accent-soft: rgba(154, 164, 255, 0.14);
|
||||
--ok: #3ecf8e;
|
||||
--warn: #e7b34f;
|
||||
--err: #ef6b6b;
|
||||
--art-opacity: 0.42;
|
||||
--shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.65);
|
||||
--ease: cubic-bezier(0.2, 0.8, 0.2, 1);
|
||||
--font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, "Cantarell", "Ubuntu", "Noto Sans", sans-serif;
|
||||
--font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, system-ui, "Cantarell", "Ubuntu", "Noto Sans", sans-serif;
|
||||
--mono: "Cascadia Mono", Consolas, "SF Mono", Menlo, ui-monospace, "DejaVu Sans Mono", monospace;
|
||||
--s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
|
||||
--r-chip: 6px; --r-ctl: 8px; --r-card: 12px;
|
||||
color-scheme: dark;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] {
|
||||
--bg: #f6f7fa;
|
||||
--sidebar: #eceef3;
|
||||
--surface: #ffffff;
|
||||
--surface-2: #f1f2f6;
|
||||
--hover: rgba(20, 22, 29, 0.045);
|
||||
--press: rgba(20, 22, 29, 0.08);
|
||||
--border: #d9dce5;
|
||||
--hairline: rgba(20, 22, 29, 0.08);
|
||||
--text: #14161d;
|
||||
--text-2: #565c6e;
|
||||
--text-3: #676d80;
|
||||
--primary: #4b52d6;
|
||||
--primary-hover: #565de0;
|
||||
--accent: #3c43c2;
|
||||
--accent-soft: rgba(75, 82, 214, 0.1);
|
||||
--ok: #127a4c;
|
||||
--warn: #9a6a12;
|
||||
--err: #c8423f;
|
||||
--art-opacity: 0.3;
|
||||
--shadow: 0 18px 44px -22px rgba(30, 34, 60, 0.35);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root:not([data-theme="dark"]):not([data-theme="light"]) {
|
||||
--bg: #f6f7fa; --sidebar: #eceef3; --surface: #ffffff; --surface-2: #f1f2f6;
|
||||
--hover: rgba(20, 22, 29, 0.045); --press: rgba(20, 22, 29, 0.08);
|
||||
--border: #d9dce5; --hairline: rgba(20, 22, 29, 0.08);
|
||||
--text: #14161d; --text-2: #565c6e; --text-3: #676d80;
|
||||
--primary: #4b52d6; --primary-hover: #565de0; --accent: #3c43c2; --accent-soft: rgba(75, 82, 214, 0.1);
|
||||
--ok: #127a4c; --warn: #9a6a12; --err: #c8423f;
|
||||
--art-opacity: 0.3; --shadow: 0 18px 44px -22px rgba(30, 34, 60, 0.35);
|
||||
color-scheme: light;
|
||||
}
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html, body { height: 100%; margin: 0; overflow: clip; }
|
||||
body { background: var(--bg); color: var(--text); font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; user-select: none; }
|
||||
input, textarea, [contenteditable] { user-select: text; }
|
||||
button, input, select { font: inherit; color: inherit; }
|
||||
button { cursor: pointer; background: none; border: 0; padding: 0; }
|
||||
h1, h2, h3 { margin: 0; font-weight: 600; }
|
||||
p { margin: 0; }
|
||||
code, kbd { font-family: var(--mono); font-size: 11.5px; }
|
||||
kbd { padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-3); background: var(--surface); }
|
||||
[hidden] { display: none !important; }
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
.i { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
|
||||
.i svg { width: 100%; height: 100%; display: block; }
|
||||
|
||||
html, body { height: 100%; }
|
||||
body { display: flex; flex-direction: column; }
|
||||
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); flex: 1; min-height: 0; }
|
||||
|
||||
/* sidebar */
|
||||
.sidebar { background: var(--sidebar); border-right: 1px solid var(--hairline); display: flex; flex-direction: column; min-height: 0; padding: var(--s4) var(--s3) var(--s3); gap: var(--s4); }
|
||||
.brand { padding: var(--s1) var(--s2) var(--s2); }
|
||||
.lockup { height: 30px; width: auto; display: block; }
|
||||
.lockup-dark { display: none; }
|
||||
:root[data-theme="light"] .lockup-light { display: none; }
|
||||
:root[data-theme="light"] .lockup-dark { display: block; }
|
||||
@media (prefers-color-scheme: light) {
|
||||
:root:not([data-theme]) .lockup-light, :root[data-theme="system"] .lockup-light { display: none; }
|
||||
:root:not([data-theme]) .lockup-dark, :root[data-theme="system"] .lockup-dark { display: block; }
|
||||
}
|
||||
.nav { display: grid; gap: 2px; }
|
||||
.nav-item { position: relative; display: flex; align-items: center; gap: var(--s3); height: 36px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--text-2); font-weight: 500; width: 100%; text-align: left; transition: background-color 120ms var(--ease), color 120ms var(--ease); }
|
||||
.nav-item:hover { background: var(--hover); color: var(--text); }
|
||||
.nav-item:active { background: var(--press); }
|
||||
.nav-item[aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.nav-item[aria-current="page"]::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); }
|
||||
.nav-item kbd { margin-left: auto; opacity: 0; transition: opacity 120ms var(--ease); }
|
||||
.nav-item:hover kbd { opacity: 1; }
|
||||
.nav-item .count { margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: var(--primary); color: var(--on-primary); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
|
||||
.nav-ring { position: relative; width: 18px; height: 18px; display: grid; place-items: center; }
|
||||
.nav-ring > svg { position: absolute; inset: -3px; width: 24px; height: 24px; transform: rotate(-90deg); opacity: 0; transition: opacity 160ms var(--ease); }
|
||||
.nav-ring .track { fill: none; stroke: var(--border); stroke-width: 2; }
|
||||
.nav-ring .fill { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 53.4; stroke-dashoffset: 53.4; transition: stroke-dashoffset 300ms var(--ease); }
|
||||
.nav-item.busy .nav-ring > svg { opacity: 1; }
|
||||
.nav-item.busy .nav-ring .i { transform: scale(0.72); }
|
||||
.nav-item.landed { animation: landed 300ms var(--ease); }
|
||||
@keyframes landed { 30% { background: var(--accent-soft); } }
|
||||
|
||||
.fetched-head { display: flex; align-items: center; justify-content: space-between; padding: 0 var(--s3) var(--s2); }
|
||||
.fetched-head h2 { font-size: 12px; font-weight: 600; color: var(--text-3); }
|
||||
.fetched-strip { display: flex; align-items: center; gap: var(--s2); }
|
||||
.fetched-list { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
|
||||
.fetched-list li { flex: none; max-width: 240px; }
|
||||
.fetched-empty { padding: 0 var(--s3); color: var(--text-3); font-size: 12px; }
|
||||
.fetched-item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--s2); align-items: center; padding: 4px 10px 4px 4px; border-radius: var(--r-ctl); width: 100%; text-align: left; border: 1px solid var(--hairline); transition: background-color 120ms var(--ease); }
|
||||
.fetched-item .thumb { width: 28px; height: 28px; }
|
||||
.fetched-item:hover { background: var(--hover); }
|
||||
.fetched-item[aria-current="true"] { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.fetched-item .t { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.fetched-item .m { color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.thumb { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: block; }
|
||||
.thumb.ph { display: grid; place-items: center; color: var(--text-3); }
|
||||
.thumb.ph .i { width: 16px; height: 16px; }
|
||||
.spin-sm .i { animation: spin 900ms linear infinite; }
|
||||
|
||||
.sidebar-foot { display: grid; gap: 2px; border-top: 1px solid var(--hairline); padding-top: var(--s2); }
|
||||
.engine-state { display: flex; align-items: center; gap: var(--s2); padding: 6px var(--s3); border-radius: var(--r-ctl); color: var(--text-3); font-size: 11.5px; text-align: left; }
|
||||
.engine-state:hover { background: var(--hover); color: var(--text-2); }
|
||||
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
|
||||
.dot.ok { background: var(--ok); }
|
||||
.dot.warn { background: var(--warn); }
|
||||
|
||||
/* main + views */
|
||||
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
|
||||
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: viewIn 160ms var(--ease); }
|
||||
@keyframes viewIn { from { opacity: 0; transform: translateY(4px); } }
|
||||
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); padding: var(--s8) var(--s8) var(--s5); }
|
||||
.view-head h1 { font: 600 20px/1.2 var(--font-display); letter-spacing: -0.01em; }
|
||||
.view-sub { color: var(--text-2); margin-top: 2px; }
|
||||
.row { display: flex; align-items: center; gap: var(--s2); }
|
||||
.row.end { justify-content: flex-end; }
|
||||
|
||||
/* buttons + controls */
|
||||
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 32px; padding: 0 var(--s4); border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); font-weight: 500; white-space: nowrap; transition: background-color 120ms var(--ease), border-color 120ms var(--ease), transform 120ms var(--ease); }
|
||||
.btn:hover { background: var(--surface-2); }
|
||||
.btn:active { transform: translateY(1px); }
|
||||
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
|
||||
.btn .i { width: 16px; height: 16px; color: currentColor; }
|
||||
.btn.primary .i { color: var(--on-primary); }
|
||||
.btn.primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
|
||||
.btn.primary:hover:not(:disabled) { background: var(--primary-hover); }
|
||||
.btn.big { height: 38px; padding: 0 var(--s5); font-size: 13.5px; }
|
||||
.btn.small { height: 26px; padding: 0 var(--s3); font-size: 12px; }
|
||||
.btn.wide { width: 100%; }
|
||||
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
|
||||
.btn.ghost:hover { background: var(--hover); color: var(--text); }
|
||||
.btn.danger-ghost { background: transparent; color: var(--err); border-color: transparent; }
|
||||
.btn.danger-ghost:hover { background: var(--hover); }
|
||||
.btn .spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
|
||||
.btn.loading .spin { display: inline-block; }
|
||||
.btn.loading .label { opacity: 0.8; }
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: var(--r-ctl); color: var(--text-3); transition: background-color 120ms var(--ease), color 120ms var(--ease); }
|
||||
.icon-btn:hover { background: var(--hover); color: var(--text); }
|
||||
.icon-btn .i { width: 16px; height: 16px; }
|
||||
.link-btn { color: var(--text-3); font-size: 12px; padding: 2px 4px; border-radius: 4px; }
|
||||
.link-btn:hover { color: var(--text); }
|
||||
|
||||
input[type="checkbox"].box, .attest input, .pledge input, .tl-check { appearance: none; width: 16px; height: 16px; margin: 0; border-radius: 4px; border: 1.5px solid var(--text-3); background: transparent; display: inline-grid; place-items: center; flex: none; cursor: pointer; transition: background-color 100ms var(--ease), border-color 100ms var(--ease); }
|
||||
.attest input:checked, .pledge input:checked, .tl-check:checked { background: var(--primary); border-color: var(--primary); }
|
||||
.attest input:checked::after, .pledge input:checked::after, .tl-check:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: translate(0, -1px) rotate(-45deg); }
|
||||
.tl-check:indeterminate { background: var(--primary); border-color: var(--primary); }
|
||||
.tl-check:indeterminate::after { content: ""; width: 8px; height: 2px; background: var(--on-primary); border-radius: 1px; }
|
||||
.tl-check:disabled { opacity: 0.35; cursor: not-allowed; }
|
||||
|
||||
.switch { appearance: none; width: 34px; height: 20px; border-radius: 10px; background: var(--border); position: relative; flex: none; cursor: pointer; margin: 0; transition: background-color 140ms var(--ease); }
|
||||
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--on-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 160ms var(--ease); }
|
||||
.switch:checked { background: var(--primary); }
|
||||
.switch:checked::after { transform: translateX(14px); }
|
||||
|
||||
.text, select { height: 32px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--bg); padding: 0 var(--s3); min-width: 0; outline: none; transition: border-color 120ms var(--ease); }
|
||||
.text:focus, select:focus { border-color: var(--accent); }
|
||||
.text.short { width: 140px; }
|
||||
select { padding-right: var(--s6); cursor: pointer; }
|
||||
|
||||
/* command bar */
|
||||
.command { padding: var(--s5) var(--s8) var(--s3); display: grid; gap: var(--s2); border-bottom: 1px solid var(--hairline); }
|
||||
.command-bar { display: flex; align-items: center; gap: var(--s3); height: 46px; padding: 0 6px 0 var(--s4); border-radius: 10px; background: var(--surface); border: 1px solid var(--border); transition: border-color 120ms var(--ease); }
|
||||
.command-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
||||
.command-glyph { color: var(--text-3); transition: color 120ms var(--ease); }
|
||||
.command-glyph.known { color: var(--text); }
|
||||
.command-bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; height: 100%; }
|
||||
.command-bar input::placeholder { color: var(--text-3); }
|
||||
.scope { display: flex; padding: 2px; border-radius: 7px; background: var(--bg); border: 1px solid var(--hairline); }
|
||||
.scope button { height: 26px; padding: 0 10px; border-radius: 5px; color: var(--text-2); font-size: 12px; font-weight: 500; }
|
||||
.scope button[aria-checked="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.clip { display: flex; align-items: center; gap: var(--s2); padding: 6px 6px 6px var(--s3); border-radius: var(--r-ctl); background: var(--accent-soft); color: var(--text-2); font-size: 12.5px; animation: viewIn 180ms var(--ease); }
|
||||
.clip > .i { width: 16px; height: 16px; color: var(--accent); }
|
||||
.clip code { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
|
||||
|
||||
.get-scroll { flex: 1; min-height: 0; overflow-y: auto; }
|
||||
.banner { display: flex; align-items: center; gap: var(--s3); margin: var(--s5) var(--s8) 0; padding: var(--s3) var(--s4); border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface); }
|
||||
.banner > .i { color: var(--warn); }
|
||||
.banner div { flex: 1; color: var(--text-2); }
|
||||
.banner strong { color: var(--text); font-weight: 600; }
|
||||
|
||||
/* empty state */
|
||||
.empty-get { max-width: 560px; margin: 0 auto; padding: 72px var(--s8) var(--s12); display: grid; justify-items: start; gap: var(--s4); }
|
||||
.empty-art img { width: 120px; height: auto; display: block; }
|
||||
.empty-get h1 { font: 600 26px/1.2 var(--font-display); letter-spacing: -0.015em; }
|
||||
.empty-get > p { color: var(--text-2); font-size: 14px; max-width: 46ch; }
|
||||
.examples { list-style: none; margin: var(--s2) 0 0; padding: 0; display: grid; gap: 1px; width: 100%; border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--hairline); background: var(--hairline); }
|
||||
.examples li { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); background: var(--surface); }
|
||||
.examples li > .i { color: var(--accent); margin-top: 1px; }
|
||||
.examples strong { display: block; font-weight: 600; }
|
||||
.examples span:not(.i) { color: var(--text-2); }
|
||||
.empty-get .hint { color: var(--text-3); font-size: 12.5px; }
|
||||
|
||||
/* release sheet */
|
||||
.sheet { position: relative; padding-bottom: var(--s6); }
|
||||
.sheet-head { position: relative; isolation: isolate; display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: var(--s8); align-items: end; padding: var(--s8) var(--s8) var(--s6); overflow: hidden; }
|
||||
.sheet-art-bg { position: absolute; inset: -60px; z-index: -2; background-size: cover; background-position: center; filter: blur(56px) saturate(1.35); opacity: var(--art-opacity); transform: scale(1.15); }
|
||||
.sheet-head::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 30%, var(--bg)); }
|
||||
.cover { width: 176px; height: 176px; border-radius: 10px; object-fit: cover; display: block; background: var(--surface-2); box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--hairline); }
|
||||
.cover.ph { display: grid; place-items: center; color: var(--text-3); }
|
||||
.cover.ph .i { width: 44px; height: 44px; }
|
||||
.cover-wrap { position: relative; }
|
||||
.cover-edit { position: absolute; right: 8px; bottom: 8px; height: 26px; padding: 0 10px; border-radius: 6px; background: rgba(10, 12, 18, 0.72); color: #fff; font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; opacity: 0; transition: opacity 140ms var(--ease); }
|
||||
.cover-edit .i { width: 14px; height: 14px; }
|
||||
.cover-wrap:hover .cover-edit, .cover-edit:focus-visible { opacity: 1; }
|
||||
.head-meta { min-width: 0; display: grid; gap: 6px; padding-bottom: 4px; }
|
||||
.kind-line { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; flex-wrap: wrap; }
|
||||
.kind-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 8px; border-radius: var(--r-chip); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 12px; box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.kind-btn .i { width: 13px; height: 13px; color: var(--text-3); }
|
||||
.kind-btn:hover { background: var(--surface); }
|
||||
.kind-src { color: var(--text-3); }
|
||||
.sep { color: var(--text-3); }
|
||||
.editable { border-radius: 6px; padding: 0 4px; margin: 0 -4px; outline: none; transition: background-color 120ms var(--ease); }
|
||||
.editable:hover { background: var(--hover); }
|
||||
.editable:focus { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
|
||||
.editable:empty::before { content: attr(data-placeholder); color: var(--text-3); }
|
||||
.head-title { font: 650 30px/1.15 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
|
||||
.head-artist { font-size: 15px; color: var(--text); font-weight: 500; }
|
||||
.head-facts { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); color: var(--text-2); margin-top: 6px; }
|
||||
.fact { display: inline-flex; align-items: baseline; gap: 6px; }
|
||||
.fact b { font-weight: 500; color: var(--text-3); font-size: 12px; }
|
||||
.fact .editable { color: var(--text); min-width: 2ch; }
|
||||
.head-actions { display: flex; gap: var(--s2); margin-top: var(--s3); }
|
||||
|
||||
.sheet-body { position: relative; padding: 0 var(--s8); }
|
||||
.sheet-body.inspecting { padding-right: calc(var(--s8) + 352px); }
|
||||
.tl-tools { display: flex; align-items: center; gap: var(--s3); height: 40px; color: var(--text-2); font-size: 12.5px; border-bottom: 1px solid var(--hairline); padding: 0 var(--s2); }
|
||||
.tl-tools .grow { flex: 1; }
|
||||
.tl-tools .warn-note { color: var(--warn); }
|
||||
.tracklist { list-style: none; margin: 0; padding: var(--s1) 0 0; }
|
||||
.tl-row { display: grid; grid-template-columns: 20px 28px minmax(0, 1fr) auto 52px 28px; gap: var(--s3); align-items: center; height: 44px; padding: 0 var(--s2); border-radius: var(--r-ctl); cursor: default; transition: background-color 100ms var(--ease); }
|
||||
.tl-row:hover { background: var(--hover); }
|
||||
.tl-row[aria-selected="true"] { background: var(--accent-soft); }
|
||||
.tl-row.off .tl-main, .tl-row.off .tl-num, .tl-row.off .tl-dur { opacity: 0.45; }
|
||||
.tl-num { color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
|
||||
.tl-main { min-width: 0; display: grid; }
|
||||
.tl-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.tl-sub { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.tl-dur { color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
|
||||
.tl-row .icon-btn { opacity: 0; }
|
||||
.tl-row:hover .icon-btn, .tl-row[aria-selected="true"] .icon-btn, .tl-row .icon-btn:focus-visible { opacity: 1; }
|
||||
.flag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: var(--r-chip); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); white-space: nowrap; }
|
||||
.flag.warn { color: var(--warn); }
|
||||
.flag.edited { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-soft); background: var(--accent-soft); }
|
||||
.skeleton { display: block; height: 10px; border-radius: 5px; background: var(--surface-2); animation: pulse 1.4s cubic-bezier(0.45, 0, 0.55, 1) infinite; }
|
||||
.skeleton.w60 { width: 60%; } .skeleton.w30 { width: 30%; margin-top: 6px; height: 8px; }
|
||||
@keyframes pulse { 50% { opacity: 0.45; } }
|
||||
|
||||
/* inspector */
|
||||
.inspector { position: absolute; top: 0; right: var(--s8); width: 336px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--hairline); box-shadow: var(--shadow); animation: slideIn 200ms var(--ease); max-height: calc(100vh - 220px); display: flex; flex-direction: column; }
|
||||
.inspector.inline { position: static; width: auto; max-width: 720px; box-shadow: none; animation: none; max-height: none; }
|
||||
@keyframes slideIn { from { opacity: 0; transform: translateX(12px); } }
|
||||
.ins-head { display: flex; align-items: center; gap: var(--s3); padding: var(--s4); border-bottom: 1px solid var(--hairline); }
|
||||
.ins-head .t { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.ins-body { padding: var(--s4); overflow-y: auto; display: grid; gap: var(--s4); }
|
||||
.ins-cover { display: flex; gap: var(--s3); align-items: center; }
|
||||
.ins-cover img, .ins-cover .ph { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
|
||||
.ins-cover .stack { display: grid; gap: 4px; }
|
||||
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
|
||||
.inspector.inline .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
|
||||
.field { display: grid; gap: 4px; min-width: 0; }
|
||||
.field.full { grid-column: 1 / -1; }
|
||||
.inspector.inline .field.half { grid-column: span 2; }
|
||||
.field > span { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
|
||||
.field input { height: 30px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg); padding: 0 var(--s2); outline: none; min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }
|
||||
.field input:focus { border-color: var(--accent); }
|
||||
.field input.changed { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.ins-section { display: grid; gap: var(--s2); }
|
||||
.ins-section h3 { font-size: 12px; color: var(--text-2); font-weight: 600; }
|
||||
.avail { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.avail .flag { font-weight: 500; }
|
||||
.ins-foot { display: flex; justify-content: space-between; gap: var(--s2); padding: var(--s3) var(--s4); border-top: 1px solid var(--hairline); }
|
||||
|
||||
/* commit bar */
|
||||
.commit { display: flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s8); border-top: 1px solid var(--hairline); background: var(--bg); }
|
||||
.save-as { display: flex; align-items: center; gap: var(--s2); height: 38px; padding: 0 var(--s3); border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); transition: background-color 120ms var(--ease); }
|
||||
.save-as:hover, .save-as[aria-expanded="true"] { background: var(--surface-2); }
|
||||
.save-as-label { color: var(--text-3); font-size: 12px; }
|
||||
.save-as-value { font-weight: 600; }
|
||||
.save-as .i { width: 14px; height: 14px; color: var(--text-3); }
|
||||
.dest { display: flex; align-items: center; gap: var(--s2); min-width: 0; flex: 1; height: 38px; padding: 0 var(--s3); border-radius: var(--r-ctl); color: var(--text-2); transition: background-color 120ms var(--ease), color 120ms var(--ease); }
|
||||
.dest:hover { background: var(--hover); color: var(--text); }
|
||||
.dest .i { width: 16px; height: 16px; }
|
||||
.dest-path { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
|
||||
.attest { display: flex; align-items: center; gap: var(--s2); color: var(--text-2); cursor: pointer; white-space: nowrap; }
|
||||
.attest.nudge { animation: nudge 300ms var(--ease); color: var(--text); }
|
||||
@keyframes nudge { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
|
||||
|
||||
/* save-as menu */
|
||||
.save-menu { position: fixed; z-index: 40; width: 380px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 6px; animation: menuIn 150ms var(--ease); }
|
||||
@keyframes menuIn { from { opacity: 0; transform: translateY(6px); } }
|
||||
.opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--s3); padding: 10px var(--s3); border-radius: var(--r-ctl); width: 100%; text-align: left; }
|
||||
.opt:hover:not(:disabled) { background: var(--hover); }
|
||||
.opt:disabled { opacity: 0.45; cursor: not-allowed; }
|
||||
.opt .radio { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--text-3); margin-top: 2px; display: grid; place-items: center; }
|
||||
.opt[aria-checked="true"] .radio { border-color: var(--primary); }
|
||||
.opt[aria-checked="true"] .radio::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
|
||||
.opt strong { display: block; font-weight: 600; }
|
||||
.opt small { display: block; color: var(--text-2); font-size: 12px; margin-top: 1px; }
|
||||
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s2); }
|
||||
.chip { height: 26px; padding: 0 10px; border-radius: var(--r-chip); border: 1px solid var(--border); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--text-2); }
|
||||
.chip:hover { color: var(--text); background: var(--hover); }
|
||||
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
|
||||
.menu-divider { height: 1px; background: var(--hairline); margin: 4px 6px; }
|
||||
.menu-note { padding: var(--s2) var(--s3) 6px; color: var(--text-3); font-size: 11.5px; }
|
||||
|
||||
.menu { position: fixed; z-index: 40; min-width: 200px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 6px; animation: menuIn 150ms var(--ease); }
|
||||
.menu button { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); width: 100%; height: 32px; padding: 0 var(--s3); border-radius: 6px; text-align: left; }
|
||||
.menu button:hover { background: var(--hover); }
|
||||
.menu button[aria-checked="true"]::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--accent); border-top: 0; border-right: 0; transform: translateY(-2px) rotate(-45deg); }
|
||||
|
||||
/* downloads */
|
||||
.downloads-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 var(--s8) var(--s8); display: grid; align-content: start; gap: var(--s6); }
|
||||
.groups { display: grid; gap: var(--s3); }
|
||||
.group-card { border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; animation: viewIn 200ms var(--ease); }
|
||||
.gc-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); }
|
||||
.gc-head .thumb { width: 44px; height: 44px; border-radius: 8px; }
|
||||
.gc-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.gc-sub { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.bar { height: 3px; background: var(--surface-2); border-radius: 2px; overflow: hidden; }
|
||||
.bar > i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 2px; transform-origin: left; transform: scaleX(0); transition: transform 260ms var(--ease); }
|
||||
.bar.ok > i { background: var(--ok); }
|
||||
.bar.err > i { background: var(--err); }
|
||||
.bar.indet > i { width: 30%; transform: none; animation: indet 1.2s linear infinite; }
|
||||
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
|
||||
.gc-bar { margin: 0 var(--s4) var(--s3); }
|
||||
.jobs { list-style: none; margin: 0; padding: 0 0 6px; border-top: 1px solid var(--hairline); }
|
||||
.job { display: grid; grid-template-columns: 28px minmax(0, 1fr) minmax(120px, 220px) 28px; gap: var(--s3); align-items: center; padding: 6px var(--s4); }
|
||||
.job .tl-num { font-size: 12px; }
|
||||
.job-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
|
||||
.job-status { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
|
||||
.job-status.ok { color: var(--ok); }
|
||||
.job-status.err { color: var(--err); white-space: normal; }
|
||||
.job-note { grid-column: 2 / -1; font-size: 11.5px; color: var(--text-2); margin-top: -2px; }
|
||||
.job-right { display: grid; gap: 4px; }
|
||||
|
||||
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s2); }
|
||||
.history-head h2 { font-size: 14px; }
|
||||
.day { font-size: 12px; font-weight: 600; color: var(--text-3); margin: var(--s4) 0 var(--s1); }
|
||||
.hist { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; gap: var(--s3); align-items: center; padding: 6px var(--s2); border-radius: var(--r-ctl); }
|
||||
.hist:hover { background: var(--hover); }
|
||||
.hist .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
|
||||
.hist .m { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.hist .when { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
|
||||
.hist.missing .t, .hist.missing .m { color: var(--text-3); }
|
||||
.hist .acts { display: flex; gap: 2px; opacity: 0; }
|
||||
.hist:hover .acts, .hist .acts:focus-within { opacity: 1; }
|
||||
.empty-downloads { display: grid; justify-items: center; text-align: center; gap: var(--s2); padding: 80px 0; color: var(--text-2); }
|
||||
.empty-downloads > .i { width: 32px; height: 32px; color: var(--text-3); }
|
||||
.empty-downloads h2 { font-size: 15px; color: var(--text); }
|
||||
|
||||
/* settings */
|
||||
.settings-scroll { flex: 1; min-height: 0; overflow-y: auto; }
|
||||
.settings { max-width: 760px; padding: 0 var(--s8) var(--s12); }
|
||||
.settings h2 { font-size: 13px; font-weight: 600; color: var(--text-2); margin: var(--s6) 0 var(--s2) var(--s1); }
|
||||
.settings h2:first-child { margin-top: 0; }
|
||||
.group { border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--hairline); overflow: hidden; }
|
||||
.setting { display: flex; align-items: center; justify-content: space-between; gap: var(--s6); min-height: 56px; padding: var(--s3) var(--s4); border-top: 1px solid var(--hairline); }
|
||||
.setting:first-child { border-top: 0; }
|
||||
label.setting { cursor: pointer; }
|
||||
.setting > div:first-child { display: grid; gap: 2px; min-width: 0; }
|
||||
.setting strong { font-weight: 500; }
|
||||
.setting span { color: var(--text-2); font-size: 12px; }
|
||||
.setting.stack { display: grid; justify-content: stretch; gap: var(--s2); }
|
||||
.setting.stack .text { width: 100%; font-family: var(--mono); font-size: 12.5px; }
|
||||
.setting code { color: var(--text); }
|
||||
.tokens { display: flex; flex-wrap: wrap; gap: 6px; }
|
||||
.tokens button { height: 24px; padding: 0 8px; border-radius: var(--r-chip); background: var(--surface-2); color: var(--text-2); font: 11.5px var(--mono); box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.tokens button:hover { color: var(--text); }
|
||||
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-ctl); overflow: hidden; }
|
||||
.stepper button { width: 30px; height: 30px; color: var(--text-2); font-size: 16px; }
|
||||
.stepper button:hover { background: var(--hover); color: var(--text); }
|
||||
.stepper output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 600; }
|
||||
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-ctl); background: var(--bg); border: 1px solid var(--hairline); }
|
||||
.seg button { height: 26px; padding: 0 12px; border-radius: 6px; color: var(--text-2); font-weight: 500; font-size: 12px; }
|
||||
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--hairline); }
|
||||
.saved { color: var(--ok); font-size: 12px; opacity: 0; transition: opacity 200ms var(--ease); }
|
||||
.saved.on { opacity: 1; }
|
||||
.tool { align-items: center; }
|
||||
.tool .name { display: flex; align-items: center; gap: var(--s2); }
|
||||
.tool .acts { display: flex; gap: var(--s2); align-items: center; }
|
||||
.tool .bar { width: 140px; }
|
||||
.advanced { display: block; }
|
||||
.advanced summary { list-style: none; display: grid; gap: 2px; cursor: pointer; }
|
||||
.advanced summary::-webkit-details-marker { display: none; }
|
||||
.adv-fields { display: grid; gap: var(--s3); margin-top: var(--s3); }
|
||||
.adv-fields label { display: grid; gap: 4px; }
|
||||
.adv-fields .text { font-family: var(--mono); font-size: 12px; }
|
||||
|
||||
/* onboarding */
|
||||
.onboarding { position: fixed; inset: 0; z-index: 60; background: var(--bg); display: grid; place-items: center; padding: var(--s8); overflow-y: auto; animation: viewIn 200ms var(--ease); }
|
||||
.ob-card { width: 100%; max-width: 560px; display: grid; gap: var(--s5); }
|
||||
.ob-mark { width: 96px; height: auto; }
|
||||
.ob-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s5); color: var(--text-3); font-size: 12px; font-weight: 600; counter-reset: step; }
|
||||
.ob-steps li { display: flex; align-items: center; gap: 6px; counter-increment: step; }
|
||||
.ob-steps li::before { content: counter(step); width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; font-size: 10.5px; }
|
||||
.ob-steps li.on { color: var(--text); }
|
||||
.ob-steps li.done { color: var(--ok); }
|
||||
.ob-step { display: grid; gap: var(--s3); }
|
||||
.ob-step h1 { font: 650 26px/1.2 var(--font-display); letter-spacing: -0.015em; }
|
||||
.lede { color: var(--text-2); font-size: 14px; margin-bottom: var(--s2); }
|
||||
.pledge { display: flex; gap: var(--s3); padding: var(--s3) var(--s4); border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text-2); line-height: 1.5; transition: border-color 120ms var(--ease); }
|
||||
.pledge input { margin-top: 2px; }
|
||||
.pledge b { color: var(--text); font-weight: 600; }
|
||||
.pledge:has(input:checked) { border-color: var(--primary); }
|
||||
.fine { color: var(--text-3); font-size: 12px; margin: var(--s1) 0 var(--s2); }
|
||||
.ob-tools { display: grid; gap: var(--s2); margin-bottom: var(--s2); }
|
||||
.ob-tool { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: center; padding: var(--s3) var(--s4); border-radius: var(--r-card); border: 1px solid var(--border); background: var(--surface); }
|
||||
.ob-tool strong { font-weight: 600; }
|
||||
.ob-tool > div > span { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }
|
||||
.ob-tool .bar { grid-column: 1 / -1; }
|
||||
|
||||
/* cover flight + toasts */
|
||||
.flyer { position: fixed; z-index: 80; border-radius: 8px; object-fit: cover; pointer-events: none; box-shadow: var(--shadow); }
|
||||
.toasts { position: fixed; bottom: 100px; left: calc(50% + 118px); transform: translateX(-50%); z-index: 90; display: grid; gap: var(--s2); justify-items: center; pointer-events: none; }
|
||||
.toast { pointer-events: auto; display: flex; align-items: center; gap: var(--s3); max-width: 560px; padding: 10px var(--s4); border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); animation: menuIn 180ms var(--ease); }
|
||||
.toast .i { width: 16px; height: 16px; }
|
||||
.toast.err .i { color: var(--err); }
|
||||
.toast.ok .i { color: var(--ok); }
|
||||
.toast.out { opacity: 0; transition: opacity 200ms var(--ease); }
|
||||
|
||||
::-webkit-scrollbar { width: 10px; height: 10px; }
|
||||
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.shell { grid-template-columns: 200px minmax(0, 1fr); }
|
||||
.sheet-head { grid-template-columns: 128px minmax(0, 1fr); gap: var(--s5); }
|
||||
.cover { width: 128px; height: 128px; }
|
||||
.sheet-body.inspecting { padding-right: var(--s8); }
|
||||
.inspector { position: fixed; top: 80px; right: 16px; }
|
||||
.commit { flex-wrap: wrap; }
|
||||
.attest { order: 3; }
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { animation-duration: 120ms !important; animation-iteration-count: 1 !important; transition-duration: 120ms !important; }
|
||||
.view, .inspector, .save-menu, .menu, .toast, .group-card { animation-name: fadeOnly !important; }
|
||||
.skeleton, .bar.indet > i, .btn .spin { animation: none !important; }
|
||||
}
|
||||
@keyframes fadeOnly { from { opacity: 0; } }
|
||||
|
||||
/* sidebar groups */
|
||||
.sidebar { overflow: hidden; }
|
||||
.nav-group { display: grid; gap: 2px; min-height: 0; }
|
||||
.nav-group.grow { flex: 1; display: flex; flex-direction: column; }
|
||||
.nav-heading { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 0 var(--s3) var(--s1); }
|
||||
.nav-heading-row { display: flex; align-items: center; justify-content: space-between; padding-right: var(--s1); }
|
||||
.nav-heading-row .nav-heading { padding-bottom: 0; }
|
||||
.playlist-nav { overflow-y: auto; min-height: 0; align-content: start; }
|
||||
.nav-item.small { height: 32px; font-size: 12.5px; }
|
||||
.nav-item .nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.nav-item .nav-meta { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
|
||||
.nav-item.drop { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); }
|
||||
.dest-playlist { height: 38px; max-width: 170px; }
|
||||
|
||||
/* library */
|
||||
.lib-scroll { flex: 1; min-height: 0; overflow-y: auto; }
|
||||
.lib-head { display: flex; align-items: flex-end; gap: var(--s4); padding: var(--s8) var(--s8) var(--s4); position: sticky; top: 0; z-index: 3; background: var(--bg); }
|
||||
.lib-titles { flex: 1; min-width: 0; }
|
||||
.lib-head h1 { font: 650 24px/1.2 var(--font-display); letter-spacing: -0.015em; }
|
||||
.lib-search { width: 220px; }
|
||||
.icon-btn.back { align-self: center; }
|
||||
.pad-x { padding: 0 var(--s8) var(--s8); }
|
||||
.pad { padding: var(--s4); }
|
||||
.muted { color: var(--text-2); }
|
||||
.small { font-size: 12px; }
|
||||
.lt-head, .lt-row { display: grid; grid-template-columns: 36px minmax(0, 2.2fr) minmax(0, 1.4fr) 32px 52px 32px; gap: var(--s3); align-items: center; padding: 0 var(--s3); }
|
||||
.lt-head.with-cover, .lt-row.with-cover { grid-template-columns: 36px 40px minmax(0, 2.2fr) minmax(0, 1.4fr) 32px 52px 32px; }
|
||||
.lt-head { height: 32px; margin: 0 var(--s8); border-bottom: 1px solid var(--hairline); color: var(--text-3); font-size: 11.5px; font-weight: 600; position: sticky; top: 92px; z-index: 2; background: var(--bg); }
|
||||
.lt-head .r, .lt-head .i { justify-self: end; width: 14px; height: 14px; }
|
||||
.lt-row { height: 52px; border-radius: var(--r-ctl); transition: background-color 100ms var(--ease); }
|
||||
.lt-row:hover, .lt-row:focus-within { background: var(--hover); }
|
||||
.lt-row.playing .lt-title { color: var(--accent); }
|
||||
.lt-num { position: relative; display: grid; place-items: center; color: var(--text-3); font-size: 12.5px; font-variant-numeric: tabular-nums; }
|
||||
.lt-num .i { width: 16px; height: 16px; color: var(--accent); }
|
||||
.lt-play { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text); opacity: 0; border-radius: 6px; }
|
||||
.lt-play .i { width: 15px; height: 15px; color: var(--text); }
|
||||
.lt-row:hover .lt-play, .lt-play:focus-visible { opacity: 1; background: var(--surface-2); }
|
||||
.lt-cover { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); }
|
||||
.lt-cover .i { width: 16px; height: 16px; }
|
||||
.lt-main { min-width: 0; display: grid; }
|
||||
.lt-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.lt-sub, .lt-album { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
||||
.lt-dur { color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }
|
||||
.lt-row .icon-btn { opacity: 0; }
|
||||
.lt-row:hover .icon-btn, .lt-row .icon-btn:focus-visible, .lt-row .like.on { opacity: 1; }
|
||||
.like.on { color: var(--accent); }
|
||||
.link { color: inherit; text-align: left; border-radius: 3px; }
|
||||
.link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
|
||||
.links { display: inline; }
|
||||
.vlist { padding: 0 var(--s8) var(--s8); }
|
||||
.vspacer { position: relative; }
|
||||
.vspacer .lt-row { position: absolute; left: 0; right: 0; top: 0; }
|
||||
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: var(--s5) var(--s4); padding: 0 var(--s8) var(--s8); }
|
||||
.sections .grid { padding: 0; }
|
||||
.card-tile { display: grid; gap: 6px; padding: var(--s2); margin: calc(var(--s2) * -1); border-radius: var(--r-card); cursor: pointer; transition: background-color 120ms var(--ease); min-width: 0; }
|
||||
.card-tile:hover, .card-tile:focus-visible { background: var(--hover); }
|
||||
.tile-art { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 1px var(--hairline); }
|
||||
.tile-art.round { border-radius: 50%; }
|
||||
.tile-img { width: 100%; height: 100%; object-fit: cover; display: grid; place-items: center; color: var(--text-3); }
|
||||
.tile-img .i { width: 36px; height: 36px; }
|
||||
.tile-play { position: absolute; right: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; opacity: 0; transform: translateY(4px); transition: opacity 140ms var(--ease), transform 140ms var(--ease); box-shadow: var(--shadow); }
|
||||
.tile-play .i { width: 18px; height: 18px; }
|
||||
.card-tile:hover .tile-play, .tile-play:focus-visible { opacity: 1; transform: none; }
|
||||
.tile-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.tile-sub { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
|
||||
.card-tile.artist { text-align: center; }
|
||||
.hero { position: relative; isolation: isolate; display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--s8); align-items: end; padding: var(--s10) var(--s8) var(--s6); overflow: hidden; margin-bottom: var(--s2); }
|
||||
.hero-bg { position: absolute; inset: -60px; z-index: -2; background-size: cover; background-position: center; filter: blur(60px) saturate(1.35); opacity: var(--art-opacity); transform: scale(1.15); }
|
||||
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 25%, var(--bg)); }
|
||||
.hero-cover { width: 200px; height: 200px; border-radius: 12px; object-fit: cover; background: var(--surface-2); box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--hairline); display: grid; place-items: center; color: var(--text-3); }
|
||||
.hero-cover.ph .i { width: 52px; height: 52px; }
|
||||
.hero-cover.mosaic { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
|
||||
.hero-cover.mosaic img { width: 100%; height: 100%; object-fit: cover; }
|
||||
.hero-meta { display: grid; gap: var(--s2); min-width: 0; }
|
||||
.hero-title { font: 700 34px/1.12 var(--font-display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
|
||||
.hero-title.big { font-size: 48px; letter-spacing: -0.03em; }
|
||||
.hero-artist { font-size: 15px; font-weight: 600; justify-self: start; }
|
||||
.hero .row { margin-top: var(--s2); flex-wrap: wrap; }
|
||||
.hero .path { color: var(--text-3); font: 11.5px var(--mono); justify-self: start; }
|
||||
.on-hero { position: absolute; top: var(--s4); left: var(--s4); background: rgba(10, 12, 18, 0.4); color: #fff; }
|
||||
.artist-hero { grid-template-columns: 180px minmax(0, 1fr); }
|
||||
.avatar { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; background: var(--surface-2); box-shadow: 0 18px 44px -18px rgba(0, 0, 0, 0.6); display: grid; place-items: center; color: var(--text-3); }
|
||||
.avatar .i { width: 52px; height: 52px; }
|
||||
.avatar.sm { width: 64px; height: 64px; }
|
||||
.sections { display: grid; gap: var(--s8); }
|
||||
.sec { font-size: 18px; font-weight: 650; margin-bottom: var(--s3); letter-spacing: -0.01em; }
|
||||
.bio { color: var(--text-2); max-width: 70ch; white-space: pre-wrap; line-height: 1.6; }
|
||||
.disc { display: flex; align-items: center; gap: var(--s2); font-size: 13px; color: var(--text-2); margin: var(--s5) 0 var(--s2) var(--s3); }
|
||||
.disc .i { width: 16px; height: 16px; }
|
||||
.hint-line { margin: 0 0 var(--s2) var(--s3); }
|
||||
.lib-empty { display: grid; justify-items: center; text-align: center; gap: var(--s3); padding: 72px var(--s8); color: var(--text-2); }
|
||||
.lib-empty h2 { font: 600 20px/1.3 var(--font-display); color: var(--text); }
|
||||
.lib-empty p { max-width: 46ch; }
|
||||
.lib-empty .bar { width: 260px; }
|
||||
.lib-empty.slim { padding: var(--s10) var(--s8); }
|
||||
.lib-empty > .i { width: 28px; height: 28px; color: var(--text-3); }
|
||||
.lib-empty .row { margin-top: var(--s2); }
|
||||
|
||||
/* context menu + modal */
|
||||
.menu.ctx { position: fixed; z-index: 70; }
|
||||
.menu.ctx button.has-sub .i { width: 14px; height: 14px; transform: rotate(-90deg); color: var(--text-3); }
|
||||
.menu button:disabled { opacity: 0.45; }
|
||||
.modal-wrap { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; background: rgba(5, 6, 12, 0.5); padding: var(--s6); animation: fadeOnly 150ms var(--ease); }
|
||||
.modal { width: 100%; max-width: 480px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: var(--s6); display: grid; gap: var(--s4); animation: menuIn 180ms var(--ease); }
|
||||
.modal h2 { font-size: 17px; }
|
||||
.stack { display: grid; gap: var(--s3); }
|
||||
.text.wide { width: 100%; }
|
||||
.text.area { height: auto; padding: var(--s2) var(--s3); resize: vertical; font: inherit; line-height: 1.5; width: 100%; }
|
||||
.fields.two { grid-template-columns: 1fr 1fr; }
|
||||
|
||||
/* player bar */
|
||||
.player { flex: none; display: grid; grid-template-columns: minmax(200px, 1fr) minmax(320px, 1.6fr) minmax(200px, 1fr); gap: var(--s4); align-items: center; height: 78px; padding: 0 var(--s4); background: var(--sidebar); border-top: 1px solid var(--hairline); position: relative; z-index: 30; }
|
||||
.np { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
|
||||
.np-cover { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; color: var(--text-3); box-shadow: 0 0 0 1px var(--hairline); }
|
||||
.np-cover .i { width: 20px; height: 20px; }
|
||||
.np-text { min-width: 0; display: grid; }
|
||||
.np-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.np-artist { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.player.idle .np-title { color: var(--text-3); font-weight: 500; }
|
||||
.transport { display: grid; gap: 4px; justify-items: center; }
|
||||
.controls { display: flex; align-items: center; gap: var(--s2); }
|
||||
.controls .icon-btn { width: 32px; height: 32px; color: var(--text-2); }
|
||||
.controls .icon-btn:hover { color: var(--text); }
|
||||
.icon-btn[aria-pressed="true"] { color: var(--accent); }
|
||||
.play-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: transform 120ms var(--ease); }
|
||||
.play-btn svg { width: 18px; height: 18px; }
|
||||
.play-btn:active { transform: scale(0.95); }
|
||||
.seek-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: var(--s2); align-items: center; width: 100%; max-width: 620px; }
|
||||
.time { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; text-align: center; }
|
||||
.np-tools { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
|
||||
.np-tools .icon-btn { width: 32px; height: 32px; }
|
||||
.range { appearance: none; height: 16px; background: transparent; cursor: pointer; width: 100%; margin: 0; --p: 0%; }
|
||||
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--text-2) var(--p), var(--border) var(--p)); }
|
||||
.range:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), var(--border) var(--p)); }
|
||||
.range::-webkit-slider-thumb { appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--text); margin-top: -4px; opacity: 0; transition: opacity 120ms var(--ease); }
|
||||
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb, .range:active::-webkit-slider-thumb { opacity: 1; }
|
||||
.range.vol { width: 96px; flex: none; }
|
||||
|
||||
/* drawers */
|
||||
.drawer-panel { position: fixed; right: 12px; top: 12px; bottom: 90px; width: 380px; z-index: 40; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: slideIn 200ms var(--ease); overflow: hidden; }
|
||||
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); border-bottom: 1px solid var(--hairline); }
|
||||
.drawer-head h2 { font-size: 15px; }
|
||||
.drawer-body { flex: 1; overflow-y: auto; padding: var(--s2) var(--s2) var(--s4); }
|
||||
.q-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 6px var(--s2); border-radius: var(--r-ctl); }
|
||||
.q-row:hover { background: var(--hover); }
|
||||
.q-row.now .lt-title { color: var(--accent); }
|
||||
.q-row .icon-btn { opacity: 0; }
|
||||
.q-row:hover .icon-btn, .q-row .icon-btn:focus-visible { opacity: 1; }
|
||||
.q-sub { font-size: 12px; color: var(--text-3); margin: var(--s4) var(--s2) var(--s1); }
|
||||
.offset { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--r-ctl); }
|
||||
.offset .icon-btn { width: 26px; height: 26px; font-size: 15px; }
|
||||
.offset output { font-size: 11px; min-width: 46px; text-align: center; color: var(--text-2); font-variant-numeric: tabular-nums; }
|
||||
|
||||
/* lyrics */
|
||||
.lyr { display: grid; gap: 10px; padding: var(--s6) var(--s4) 40vh; }
|
||||
.lyr.plain { padding-bottom: var(--s6); }
|
||||
.lyr-line { font: 650 20px/1.35 var(--font-display); color: var(--text-3); letter-spacing: -0.01em; transition: color 180ms var(--ease), opacity 180ms var(--ease); border-radius: 6px; cursor: default; }
|
||||
.lyr.synced .lyr-line { cursor: pointer; opacity: 0.55; }
|
||||
.lyr.synced .lyr-line:hover { opacity: 0.85; }
|
||||
.lyr.synced .lyr-line.past { opacity: 0.42; }
|
||||
.lyr.synced .lyr-line.on { color: var(--text); opacity: 1; }
|
||||
.lyr-line .w { transition: color 120ms var(--ease); }
|
||||
.lyr-line.on .w { color: var(--text-3); }
|
||||
.lyr-line.on .w.sung { color: var(--text); }
|
||||
.lyr.plain .lyr-line { color: var(--text); font-size: 16px; font-weight: 500; }
|
||||
.lyr-tr { display: block; font: 500 14px/1.4 var(--font); color: var(--text-2); margin-top: 2px; }
|
||||
.lyr-state { display: grid; gap: var(--s3); justify-items: start; padding: var(--s6) var(--s4); color: var(--text-2); }
|
||||
.lyr-state .skeleton { height: 16px; }
|
||||
.lyr-copy { padding: 0 var(--s4) var(--s4); font-size: 11px; color: var(--text-3); }
|
||||
.lyr.big .lyr-line { font-size: clamp(26px, 3.4vw, 52px); line-height: 1.2; color: rgba(255, 255, 255, 0.4); }
|
||||
.lyr.big.synced .lyr-line.on, .lyr.big .lyr-line.on .w.sung { color: #fff; }
|
||||
.lyr.big .lyr-line.on .w { color: rgba(255, 255, 255, 0.45); }
|
||||
.lyr.big.plain .lyr-line { color: rgba(255, 255, 255, 0.85); font-size: clamp(20px, 2.2vw, 32px); }
|
||||
.lyr.big .lyr-tr { color: rgba(255, 255, 255, 0.6); font-size: 0.45em; }
|
||||
|
||||
/* effects panel */
|
||||
.fx { position: fixed; right: 16px; bottom: 90px; z-index: 45; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 120px); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); animation: menuIn 180ms var(--ease); }
|
||||
.fx-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s4) var(--s5) var(--s2); position: sticky; top: 0; background: var(--surface); z-index: 1; }
|
||||
.fx-head h2 { font-size: 16px; }
|
||||
.fx-body { display: grid; gap: var(--s5); padding: var(--s2) var(--s5) var(--s5); }
|
||||
.fx-body h3 { font-size: 12px; color: var(--text-2); font-weight: 600; margin-bottom: var(--s2); }
|
||||
.fx-group { display: grid; grid-template-columns: 72px 1fr; gap: var(--s3); align-items: start; margin-bottom: var(--s2); }
|
||||
.fx-group .chips { margin-top: 0; }
|
||||
.fx-label { font-size: 12px; color: var(--text-3); font-weight: 600; padding-top: 5px; }
|
||||
.fx-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s6); }
|
||||
.fx-slider { display: grid; grid-template-columns: 104px minmax(0, 1fr) 72px; gap: var(--s3); align-items: center; height: 34px; }
|
||||
.fx-slider .fx-label { padding-top: 0; color: var(--text-2); font-weight: 500; }
|
||||
.fx-slider output { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text); text-align: right; }
|
||||
.fx-slider input { appearance: none; height: 16px; background: transparent; cursor: pointer; width: 100%; margin: 0; }
|
||||
.fx-slider input::-webkit-slider-runnable-track, .eq input::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p, 50%), var(--border) var(--p, 50%)); }
|
||||
.fx-slider input::-webkit-slider-thumb, .eq input::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--text); margin-top: -5px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); }
|
||||
.fx-slider.off { opacity: 0.45; }
|
||||
.fx-toggle { display: flex; gap: var(--s3); align-items: flex-start; margin-top: var(--s2); cursor: pointer; }
|
||||
.fx-toggle strong { display: block; font-weight: 500; }
|
||||
.fx-toggle small { display: block; color: var(--text-2); font-size: 12px; }
|
||||
.eq { display: grid; grid-template-columns: repeat(10, 1fr); gap: var(--s2); height: 168px; align-items: stretch; padding: var(--s2) 0; }
|
||||
.band { display: grid; grid-template-rows: 1fr auto; justify-items: center; gap: 6px; }
|
||||
.band span { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
|
||||
.eq input.vert { appearance: none; writing-mode: vertical-lr; direction: rtl; width: 16px; height: 100%; background: linear-gradient(var(--border), var(--border)) center / 4px 100% no-repeat; border-radius: 2px; cursor: pointer; margin: 0; }
|
||||
.eq input.vert::-webkit-slider-runnable-track { width: 16px; height: auto; background: transparent; }
|
||||
.eq input.vert::-webkit-slider-thumb { margin-top: 0; margin-left: -5px; }
|
||||
|
||||
/* TV mode */
|
||||
.tv { position: fixed; inset: 0; z-index: 90; background: #06070d; color: #fff; overflow: hidden; display: grid; animation: fadeOnly 240ms var(--ease); }
|
||||
.tv-bg { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(80px) saturate(1.5) brightness(0.55); transform: scale(1.2); }
|
||||
.tv::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 50%, transparent, rgba(4, 5, 10, 0.65)); pointer-events: none; }
|
||||
.tv-stage { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr); gap: 6vw; align-items: center; padding: 6vh 6vw; height: 100%; min-height: 0; }
|
||||
.tv.no-lyrics .tv-stage { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
|
||||
.tv-now { display: grid; gap: 12px; justify-items: start; }
|
||||
.tv.no-lyrics .tv-now { justify-items: center; }
|
||||
.tv-cover { width: min(38vh, 34vw); height: min(38vh, 34vw); border-radius: 14px; object-fit: cover; box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8); background: rgba(255, 255, 255, 0.08); display: grid; place-items: center; }
|
||||
.tv.no-lyrics .tv-cover { width: min(52vh, 60vw); height: min(52vh, 60vw); }
|
||||
.tv-title { font: 700 clamp(24px, 2.6vw, 40px)/1.15 var(--font-display); letter-spacing: -0.02em; margin-top: 12px; }
|
||||
.tv-artist { font-size: clamp(15px, 1.4vw, 20px); color: rgba(255, 255, 255, 0.7); }
|
||||
.tv-bar { width: min(38vh, 34vw); height: 4px; background: rgba(255, 255, 255, 0.2); border-radius: 2px; overflow: hidden; margin-top: 10px; }
|
||||
.tv.no-lyrics .tv-bar { width: min(52vh, 60vw); }
|
||||
.tv-bar i { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }
|
||||
.tv-controls { display: flex; gap: 10px; align-items: center; transition: opacity 300ms var(--ease); }
|
||||
.tv-controls .icon-btn { width: 44px; height: 44px; color: #fff; }
|
||||
.tv-controls .icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
|
||||
.tv-controls .i { width: 22px; height: 22px; }
|
||||
.tv-play { background: rgba(255, 255, 255, 0.14) !important; border-radius: 50% !important; }
|
||||
.tv-lyrics { height: 100%; min-height: 0; overflow-y: auto; mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 78%, transparent); scrollbar-width: none; }
|
||||
.tv-lyrics::-webkit-scrollbar { display: none; }
|
||||
.tv-lyrics .lyr { padding: 40vh 0; gap: 18px; }
|
||||
.tv-close { position: absolute; top: 20px; right: 20px; z-index: 2; color: #fff; background: rgba(255, 255, 255, 0.1); transition: opacity 300ms var(--ease); }
|
||||
.tv-viz { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22vh; z-index: 0; opacity: 0; pointer-events: none; }
|
||||
.tv.no-lyrics .tv-viz { opacity: 1; }
|
||||
.tv.idle { cursor: none; }
|
||||
.tv.idle .tv-controls, .tv.idle .tv-close { opacity: 0; }
|
||||
|
||||
/* settings extras */
|
||||
.set-note { color: var(--text-2); font-size: 12.5px; margin: -4px 0 var(--s2) var(--s1); }
|
||||
.settings h2.sub { font-size: 12px; color: var(--text-3); margin-top: var(--s4); }
|
||||
.group.gap-top { margin-top: var(--s2); }
|
||||
.mono-path { font: 500 12.5px var(--mono); overflow-wrap: anywhere; }
|
||||
.setting .size { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.setting.custom .fields { width: 100%; }
|
||||
.setting.custom .text { width: 100%; }
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.player { grid-template-columns: minmax(160px, 1fr) minmax(260px, 1.4fr) auto; }
|
||||
.range.vol { width: 64px; }
|
||||
.lt-head.with-cover, .lt-row.with-cover { grid-template-columns: 36px 40px minmax(0, 1fr) 32px 52px 32px; }
|
||||
.lt-head.with-cover > :nth-child(4), .lt-row.with-cover > .lt-album { display: none; }
|
||||
.fx-cols { grid-template-columns: 1fr; }
|
||||
}
|
||||
|
||||
/* custom title bar */
|
||||
:root { --titlebar: 40px; }
|
||||
.titlebar { flex: none; height: var(--titlebar); display: grid; grid-template-columns: 236px minmax(0, 1fr) auto; align-items: stretch; background: var(--bg); position: relative; z-index: 80; user-select: none; }
|
||||
.tb-brand { display: flex; align-items: center; padding: 0 var(--s5); background: var(--sidebar); border-right: 1px solid var(--hairline); }
|
||||
.tb-brand .lockup { height: 26px; width: auto; pointer-events: none; }
|
||||
.tb-drag { min-width: 0; }
|
||||
.tb-controls { display: flex; }
|
||||
.tb-btn { width: 46px; height: var(--titlebar); display: grid; place-items: center; color: var(--text-2); transition: background-color 100ms var(--ease), color 100ms var(--ease); }
|
||||
.tb-btn svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1; shape-rendering: crispEdges; }
|
||||
.tb-btn:hover { background: var(--hover); color: var(--text); }
|
||||
.tb-btn:active { background: var(--press); }
|
||||
.tb-btn.close:hover { background: #c42b1c; color: #fff; }
|
||||
.tb-btn.close:active { background: #b3271a; color: #fff; }
|
||||
.titlebar.mac { grid-template-columns: 236px minmax(0, 1fr); }
|
||||
.titlebar.mac .tb-controls { display: none; }
|
||||
.titlebar.mac .tb-brand { padding-left: 84px; }
|
||||
.titlebar.mac .tb-brand .lockup { height: 22px; }
|
||||
.titlebar.blur .tb-btn, .titlebar.blur .tb-brand .lockup { opacity: 0.6; }
|
||||
.sidebar { padding-top: var(--s2); }
|
||||
.onboarding { top: var(--titlebar); }
|
||||
.drawer-panel { top: calc(var(--titlebar) + 12px); }
|
||||
.fx { max-height: calc(100vh - 140px); }
|
||||
|
||||
.menu button kbd { margin-left: auto; border: 0; background: none; padding: 0; color: var(--text-3); font: 11.5px var(--font); }
|
||||
.menu button.danger { color: var(--err); }
|
||||
.menu { min-width: 210px; }
|
||||
|
||||
/* sound panel v2 */
|
||||
.fx { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 150px); overflow: hidden; display: flex; flex-direction: column; padding: 0; }
|
||||
.fx-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--hairline); position: static; }
|
||||
.fx-head .row { justify-self: end; }
|
||||
.fx-title { display: grid; gap: 1px; min-width: 0; }
|
||||
.fx-title h2 { font-size: 16px; }
|
||||
.fx-title .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.fx-power { display: flex; align-items: center; gap: var(--s2); font-size: 12.5px; color: var(--text-2); cursor: pointer; margin-right: var(--s2); }
|
||||
.fx-scroll { overflow-y: auto; padding: var(--s4) var(--s5) var(--s5); transition: opacity 160ms var(--ease); }
|
||||
.fx-scroll.bypassed { opacity: 0.5; }
|
||||
.fx-presets h3, .fx-card h3 { font-size: 12px; font-weight: 600; color: var(--text-2); margin: 0 0 var(--s2); }
|
||||
.fx-presets h3:not(:first-child) { margin-top: var(--s5); }
|
||||
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
|
||||
.preset { display: grid; gap: 2px; text-align: left; padding: var(--s3); border-radius: 10px; background: var(--bg); border: 1px solid var(--hairline); transition: border-color 120ms var(--ease), background-color 120ms var(--ease); width: 100%; min-width: 0; }
|
||||
.preset:hover { border-color: var(--border); background: var(--surface-2); }
|
||||
.preset.on { border-color: var(--accent); background: var(--accent-soft); }
|
||||
.preset.add { border-style: dashed; place-content: center; justify-items: center; text-align: center; color: var(--text-2); min-height: 92px; }
|
||||
.preset.add .i { width: 18px; height: 18px; }
|
||||
.preset-name { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin-top: 6px; }
|
||||
.preset.add .preset-name { margin-top: 2px; }
|
||||
.preset-tag { font-size: 10.5px; font-weight: 600; padding: 0 5px; border-radius: 4px; background: var(--surface-2); color: var(--text-2); }
|
||||
.preset.on .preset-tag { background: var(--surface); }
|
||||
.preset-desc { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
.preset-wrap { position: relative; }
|
||||
.preset-x { position: absolute; top: 4px; right: 4px; opacity: 0; }
|
||||
.preset-wrap:hover .preset-x, .preset-x:focus-visible { opacity: 1; }
|
||||
.mini-curve { display: block; height: 30px; }
|
||||
.mini-curve svg { width: 100%; height: 100%; overflow: visible; }
|
||||
.mini-curve .zero { stroke: var(--border); stroke-width: 1; fill: none; }
|
||||
.mini-curve .line { stroke: var(--text-2); stroke-width: 2; fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
|
||||
.preset.on .mini-curve .line { stroke: var(--accent); }
|
||||
.fx-adjust { display: grid; gap: var(--s3); }
|
||||
.fx-card { border-radius: 12px; background: var(--bg); border: 1px solid var(--hairline); padding: var(--s4); display: grid; gap: var(--s2); align-content: start; }
|
||||
.fx-card h3.gap { margin-top: var(--s3); }
|
||||
.fx-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
|
||||
.fx-card-head h3 { margin: 0; }
|
||||
.fx-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); }
|
||||
.eq-editor svg { width: 100%; height: auto; display: block; overflow: visible; touch-action: none; }
|
||||
.eq-editor .grid { stroke: var(--hairline); stroke-width: 1; stroke-dasharray: 3 4; }
|
||||
.eq-editor .zero { stroke: var(--border); stroke-width: 1.2; }
|
||||
.eq-editor text { fill: var(--text-3); font: 11px var(--font); font-variant-numeric: tabular-nums; }
|
||||
.eq-editor .area { fill: var(--accent-soft); stroke: none; }
|
||||
.eq-editor .curve { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round; }
|
||||
.eq-editor .node { cursor: ns-resize; outline: none; }
|
||||
.eq-editor .hit { fill: transparent; }
|
||||
.eq-editor .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2.5; transition: r 120ms var(--ease); }
|
||||
.eq-editor .node:hover .dot, .eq-editor .node.drag .dot, .eq-editor .node:focus-visible .dot { fill: var(--accent); }
|
||||
.eq-editor .node:focus-visible .dot { stroke: var(--text); }
|
||||
.eq-editor .val { fill: var(--text); font-size: 11px; font-weight: 600; opacity: 0; transition: opacity 120ms var(--ease); }
|
||||
.eq-editor .node:hover .val, .eq-editor .node.drag .val, .eq-editor .node:focus-visible .val { opacity: 1; }
|
||||
.val-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; }
|
||||
.big-val { font: 650 22px/1.1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
|
||||
.chips.tight { margin-top: 0; gap: 4px; }
|
||||
.chips.tight .chip { height: 24px; padding: 0 8px; }
|
||||
.range.strong { height: 20px; }
|
||||
.range.strong::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--accent) var(--p), var(--surface-2) var(--p)); }
|
||||
.range.strong:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--p), var(--surface-2) var(--p)); }
|
||||
.range.strong::-webkit-slider-thumb { width: 16px; height: 16px; margin-top: -5px; opacity: 1; background: var(--text); box-shadow: 0 0 0 3px var(--bg), 0 1px 4px rgba(0, 0, 0, 0.5); }
|
||||
.seg.wide { display: grid; grid-template-columns: 1fr 1fr; }
|
||||
.seg.wide button { height: 30px; font-size: 12.5px; }
|
||||
.fx-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--s3); align-items: center; }
|
||||
.fx-row-label { font-size: 12.5px; color: var(--text-2); }
|
||||
.fx-card > output.fx-row-val { justify-self: end; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; margin-top: -6px; }
|
||||
.fx-card .stepper button { width: 34px; height: 30px; }
|
||||
.fx-card .stepper button:disabled { opacity: 0.4; cursor: not-allowed; }
|
||||
@media (max-width: 720px) { .preset-grid { grid-template-columns: 1fr 1fr; } .fx-split { grid-template-columns: 1fr; } }
|
||||
|
||||
.tv-note { font-size: 13px; color: rgba(255, 255, 255, 0.55); margin-top: 2px; }
|
||||
.tv-finding { display: grid; gap: 14px; padding: 40vh 0; }
|
||||
.tv-finding .skeleton { height: 34px; background: rgba(255, 255, 255, 0.14); border-radius: 8px; }
|
||||
.tv-finding p { color: rgba(255, 255, 255, 0.55); font-size: 15px; }
|
||||
|
||||
.tried { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12px; color: var(--text-2); }
|
||||
.tried strong { color: var(--text); font-weight: 600; }
|
||||
|
||||
.eqbars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; width: 14px; }
|
||||
.eqbars i { flex: 1; background: var(--accent); border-radius: 1px; height: 100%; transform-origin: bottom; animation: eqb 900ms ease-in-out infinite alternate; }
|
||||
.eqbars i:nth-child(1) { animation-delay: -300ms; }
|
||||
.eqbars i:nth-child(2) { animation-delay: -600ms; animation-duration: 760ms; }
|
||||
.eqbars i:nth-child(3) { animation-delay: -150ms; animation-duration: 1040ms; }
|
||||
@keyframes eqb { 0% { transform: scaleY(0.25); } 100% { transform: scaleY(1); } }
|
||||
.is-paused .eqbars i { animation-play-state: paused; }
|
||||
@media (prefers-reduced-motion: reduce) { .eqbars i { animation: none !important; } .eqbars i:nth-child(1) { transform: scaleY(0.55); } .eqbars i:nth-child(3) { transform: scaleY(0.75); } }
|
||||
.lt-row:hover .lt-num .eqbars { opacity: 0; }
|
||||
|
||||
.ins-sub { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s2); }
|
||||
.lyr-input { font: 13px/1.55 var(--font); min-height: 120px; }
|
||||
.ins-section.desc summary { cursor: pointer; list-style: none; }
|
||||
.ins-section.desc summary::-webkit-details-marker { display: none; }
|
||||
.ins-section.desc summary h3::after { content: " ▸"; color: var(--text-3); }
|
||||
.ins-section.desc[open] summary h3::after { content: " ▾"; }
|
||||
.desc-text { white-space: pre-wrap; color: var(--text-2); font-size: 12.5px; max-height: 220px; overflow-y: auto; }
|
||||
.modal:has(.lyr-input) { max-width: 620px; }
|
||||
|
||||
.lt-row.sel { background: var(--accent-soft); }
|
||||
.lt-row.sel:hover { background: var(--accent-soft); }
|
||||
.lt-row.sel .lt-title { color: var(--text); }
|
||||
.check-row { display: flex; align-items: center; gap: var(--s3); cursor: pointer; font-size: 13px; }
|
||||
input[type="checkbox"].box:checked { background: var(--primary); border-color: var(--primary); }
|
||||
input[type="checkbox"].box:checked::after { content: ""; width: 8px; height: 4px; border: 2px solid var(--on-primary); border-top: 0; border-right: 0; transform: translate(0, -1px) rotate(-45deg); }
|
||||
|
||||
/* stats */
|
||||
.stats { display: grid; gap: var(--s5); }
|
||||
.period-nav { display: flex; align-items: center; gap: var(--s2); }
|
||||
.period-label { font: 650 17px/1.2 var(--font-display); min-width: 160px; text-align: center; }
|
||||
.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
|
||||
.stat-card { display: grid; gap: 4px; padding: var(--s4) var(--s5); border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); }
|
||||
.stat-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
|
||||
.stat-value { font: 700 30px/1.1 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
|
||||
.stat-sub { font-size: 12px; color: var(--text-3); }
|
||||
.stat-panel { padding: var(--s4) var(--s5); border-radius: 14px; background: var(--surface); border: 1px solid var(--hairline); display: grid; gap: 2px; align-content: start; }
|
||||
.stat-panel .sec { font-size: 15px; margin-bottom: var(--s2); }
|
||||
.stat-split { display: grid; grid-template-columns: 1.3fr 1fr; gap: var(--s3); }
|
||||
.rank-row { display: grid; grid-template-columns: 24px 40px minmax(0, 1fr) auto; gap: var(--s3); align-items: center; padding: 6px var(--s2); border-radius: var(--r-ctl); cursor: default; }
|
||||
.rank-row:hover { background: var(--hover); }
|
||||
.rank { color: var(--text-3); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
|
||||
.rank-meta { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
|
||||
.lt-cover.round { border-radius: 50%; }
|
||||
.chart { display: flex; align-items: flex-end; gap: 4px; height: 160px; padding-top: var(--s2); }
|
||||
.chart-col { flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 6px; min-width: 0; }
|
||||
.chart-bar { align-self: end; height: 100%; background: var(--accent); border-radius: 4px 4px 2px 2px; transform-origin: bottom; min-height: 2px; opacity: 0.85; transition: opacity 120ms var(--ease); }
|
||||
.chart-col:hover .chart-bar { opacity: 1; }
|
||||
.chart-x { font-size: 11px; color: var(--text-3); text-align: center; font-variant-numeric: tabular-nums; height: 14px; overflow: hidden; }
|
||||
.grid.tight { padding: 0; }
|
||||
.modal:has(.share) { max-width: 820px; }
|
||||
.share { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: var(--s5); align-items: start; }
|
||||
.share-preview { display: grid; place-items: center; background: var(--bg); border-radius: 12px; padding: var(--s4); min-height: 420px; border: 1px solid var(--hairline); }
|
||||
.share-canvas { max-width: 100%; max-height: 60vh; width: auto; height: auto; border-radius: 10px; box-shadow: var(--shadow); }
|
||||
.share-side { display: grid; gap: var(--s2); }
|
||||
.share-side h3 { font-size: 12px; color: var(--text-2); margin-top: var(--s2); }
|
||||
.share-side .row { margin-top: var(--s3); flex-wrap: wrap; }
|
||||
@media (max-width: 1100px) { .stat-cards { grid-template-columns: 1fr 1fr; } .stat-split { grid-template-columns: 1fr; } .share { grid-template-columns: 1fr; } }
|
||||