-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
282 lines (259 loc) · 13.1 KB
/
index.html
File metadata and controls
282 lines (259 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>聆境(Soundscape)</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./src/style.css">
<link rel="stylesheet" href="./src/style-word-lyrics.css">
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<body>
<!-- SVG filter for liquid glass distortion effect -->
<svg style="position: absolute; width: 0; height: 0;">
<filter id="liquid-distortion">
<feTurbulence type="turbulence" baseFrequency="0.01 0.03" numOctaves="2" result="turbulence"/>
<feDisplacementMap in="SourceGraphic" in2="turbulence" scale="8" xChannelSelector="R" yChannelSelector="G"/>
</filter>
</svg>
<div id="background-blur"></div>
<canvas id="background-silk"></canvas>
<!-- NEW: Ink Background Canvas -->
<canvas id="background-ink"></canvas>
<!-- NEW: Caustics Background Canvas -->
<canvas id="background-caustics"></canvas>
<!-- NEW: Aurora Background Canvas -->
<canvas id="background-aurora"></canvas>
<!-- NEW: Video element for dynamic background -->
<video id="background-video" autoplay muted loop playsinline></video>
<!-- NEW: Playlist Button (Top Left) -->
<div class="playlist-icon-container" id="playlistBtn">
<!-- Replaced generic fa-list with a modern SVG icon -->
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="8" y1="6" x2="21" y2="6"></line>
<line x1="8" y1="12" x2="21" y2="12"></line>
<line x1="8" y1="18" x2="21" y2="18"></line>
<line x1="3" y1="6" x2="3.01" y2="6"></line>
<line x1="3" y1="12" x2="3.01" y2="12"></line>
<line x1="3" y1="18" x2="3.01" y2="18"></line>
</svg>
</div>
<!-- NEW: Playlist Panel -->
<div class="playlist-panel hidden" id="playlistPanel">
<div class="playlist-header">
<h3>播放列表</h3>
<div class="playlist-controls">
<button id="importFolderBtn" title="导入文件夹"><i class="fas fa-folder-plus"></i></button>
<button id="clearPlaylistBtn" title="清空列表"><i class="fas fa-trash-alt"></i></button>
<button id="playModeBtn" title="播放模式: 列表循环"><i class="fas fa-repeat"></i></button>
</div>
</div>
<div class="playlist-content">
<ul id="playlist-items">
<!-- Playlist items will be injected here -->
</ul>
<div id="playlist-empty-state">
<p>暂无歌曲</p>
<button id="importFolderBtnEmpty" class="small-btn">导入文件夹</button>
</div>
</div>
</div>
<div class="settings-icon-container" id="settingsBtn">
<!-- Replaced generic fa-cog with a modern SVG icon -->
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
</div>
<div class="settings-panel hidden" id="settingsPanel">
<h3>Settings</h3>
<!-- 字体设置 -->
<div class="settings-group-title">歌词字体</div>
<div class="setting-item">
<label for="font-chinese-select">中文字体:</label>
<select id="font-chinese-select">
<option value="">默认</option>
</select>
</div>
<div class="setting-item">
<label for="font-japanese-select">日文字体:</label>
<select id="font-japanese-select">
<option value="">默认</option>
</select>
</div>
<div class="setting-item">
<label for="font-english-select">英文字体:</label>
<select id="font-english-select">
<option value="">默认</option>
</select>
</div>
<!-- 界面文本 -->
<div class="settings-group-title">界面文本</div>
<div class="setting-item">
<label for="font-interface-select">界面字体:</label>
<select id="font-interface-select">
<option value="">默认</option>
</select>
</div>
<div class="setting-item">
<label for="adaptive-color-toggle">自适应颜色:</label>
<input type="checkbox" id="adaptive-color-toggle" checked>
</div>
<div class="setting-item" id="custom-color-container">
<label for="custom-color-picker">自定义颜色:</label>
<input type="color" id="custom-color-picker" value="#ffffff">
</div>
<div class="setting-item">
<label for="text-opacity-range">文本不透明度:</label>
<input type="range" id="text-opacity-range" min="0" max="100" value="100">
</div>
<div class="setting-item">
<label for="text-shadow-toggle">歌曲信息文本阴影:</label>
<input type="checkbox" id="text-shadow-toggle">
</div>
<!-- Appearance Settings -->
<div class="settings-group-title">外观</div>
<div class="setting-item" id="bg-mode-container">
<label>背景模式:</label>
<select id="bg-mode-select">
<option value="static">静态模糊</option>
<option value="silk">流动丝绸</option>
<option value="ink">水墨晕染</option>
<option value="caustics">海波焦散</option>
<option value="aurora">迷幻极光</option>
</select>
</div>
<div class="setting-item" id="album-art-bg-container">
<label for="album-art-bg-toggle">专辑封面背景:</label>
<input type="checkbox" id="album-art-bg-toggle" checked>
</div>
<div class="setting-item">
<label for="player-card-bg-toggle">面板封面背景:</label>
<input type="checkbox" id="player-card-bg-toggle" checked>
</div>
<div class="setting-item" id="player-card-bg-blur-container">
<label for="player-card-bg-blur-range">面板背景模糊度:</label>
<input type="range" id="player-card-bg-blur-range" min="0" max="100" value="0">
</div>
<!-- NEW: Panel Color Settings -->
<div class="setting-item" id="panel-adaptive-color-container">
<label for="panel-adaptive-color-toggle">自适应面板颜色:</label>
<input type="checkbox" id="panel-adaptive-color-toggle" checked>
</div>
<div class="setting-item" id="panel-custom-color-container">
<label for="panel-custom-color-picker">自定义面板颜色:</label>
<input type="color" id="panel-custom-color-picker" value="#ffffff">
</div>
<div class="setting-item" id="custom-bg-container">
<label>自定义背景:</label>
<div class="button-group">
<button id="custom-bg-btn" class="settings-button">选择图片</button>
<!-- NEW: Add button for selecting video background -->
<button id="custom-bg-video-btn" class="settings-button">选择视频</button>
<!-- NEW: Add a button to clear the custom background -->
<button id="clear-custom-bg-btn" class="settings-button">清除背景</button>
</div>
</div>
<div class="setting-item" id="bg-blur-setting">
<label for="bg-blur-range">背景模糊度:</label>
<input type="range" id="bg-blur-range" min="0" max="100" value="50">
</div>
<!-- 歌词样式 -->
<div class="settings-group-title">歌词参数</div>
<div class="setting-item">
<label for="bold-original-toggle">原文加粗:</label>
<input type="checkbox" id="bold-original-toggle">
</div>
<div class="setting-item">
<label for="bold-translation-toggle">译文加粗:</label>
<input type="checkbox" id="bold-translation-toggle">
</div>
<div class="setting-item">
<label for="italic-original-toggle">原文斜体:</label>
<input type="checkbox" id="italic-original-toggle">
</div>
<div class="setting-item">
<label for="italic-translation-toggle">译文斜体:</label>
<input type="checkbox" id="italic-translation-toggle">
</div>
<div class="setting-item">
<label for="lyrics-opacity-range">歌词不透明度:</label>
<input type="range" id="lyrics-opacity-range" min="0" max="100" value="100">
</div>
<div class="setting-item">
<label for="lyrics-text-shadow-toggle">歌词文本阴影:</label>
<input type="checkbox" id="lyrics-text-shadow-toggle">
</div>
</div>
<div class="container">
<div class="file-select-container">
<h1>聆境</h1>
<p>聆听音乐,沉浸于境</p>
<button class="custom-file-upload" id="loadBtn">
<i class="fas fa-cloud-upload-alt"></i> Select Audio File
</button>
<!-- Hidden file input for compatibility (even though we use Tauri file dialog) -->
<input type="file" id="fileInput" accept="audio/*,video/*" style="display: none;">
</div>
<!-- New wrapper for the player to handle the distortion effect -->
<div id="player-wrapper" class="hidden">
<!-- This div will have the distorted background -->
<div id="player-ui-distorted-bg"></div>
<!-- The original player UI, now sits on top -->
<div id="player-ui-glass">
<div class="settings-wrapper">
<!-- Kept for structure -->
</div>
<div id="visual-container">
<img id="albumArt" src="" alt="Album Art" style="display: none;"/>
</div>
<div id="info-wrapper">
<div id="audio-info">
<div id="songTitle" class="info-title">Unknown Title</div>
<div id="artistName" class="info-artist">Unknown Artist</div>
</div>
<div class="player-controls">
<div id="time-info">
<span id="current-time">00:00</span>
<span id="duration">00:00</span>
</div>
<div id="progress-bar-container" class="progress-bar-container simple">
<div id="progress-bar-fill" class="progress-bar-fill"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- NEW: Lyrics display container (MOVED OUTSIDE) -->
<div id="lyrics-container" class="hidden">
<ul id="lyrics-lines"></ul>
<p id="no-lyrics-message" class="hidden">无内置歌词</p>
</div>
<!-- NEW: Cover Mode Lyrics Container -->
<div id="cover-mode-lyrics-container" class="hidden">
<div id="cover-mode-lyrics"></div>
</div>
<!-- NEW: Lyrics Mode Indicator -->
<div id="lyrics-mode-indicator">
<div class="indicator-content">
<span class="indicator-icon"></span>
<span class="indicator-text"></span>
</div>
</div>
<div id="loadingOverlay" class="loading-overlay">
<div class="spinner"></div>
<p>Processing Audio...</p>
</div>
<audio id="audioPlayer" preload="auto" crossorigin="anonymous" style="display: none;"></audio>
<!-- GitHub Link Button -->
<a id="githubLink" class="github-link" href="https://github.com/chyinan/Liquid-Glass-Music-Player-APP" title="View on GitHub">
<i class="fab fa-github"></i>
</a>
<script type="module" src="./src/main.js"></script>
</body>
</html>