-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
388 lines (376 loc) · 14.9 KB
/
Copy pathindex.html
File metadata and controls
388 lines (376 loc) · 14.9 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
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>GalAssetBox - Galgame 资源整理器</title>
<meta
name="description"
content="本地优先的 galgame 开放素材整理器,把明文图片、音频、视频和文本按类别复制到一个输出文件夹。"
/>
<link
rel="icon"
href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Crect width='64' height='64' rx='10' fill='%23f5f4ef'/%3E%3Cpath d='M13 17h18v14H13zM33 17h18v14H33zM13 33h18v14H13zM33 33h18v14H33z' fill='%23fff' stroke='%2323272e' stroke-width='4'/%3E%3Cpath d='M19 24h6M39 40h6' stroke='%232f8d74' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"
/>
<link rel="stylesheet" href="./src/styles.css" />
</head>
<body>
<a class="skip-link" href="#mainWorkspace">跳到主工作区</a>
<main class="app-shell">
<section id="mainWorkspace" class="workspace" aria-label="GalAssetBox 工作区">
<aside class="control-pane">
<div class="brand-row">
<div class="brand-mark" aria-hidden="true">GAB</div>
<div>
<h1>GalAssetBox</h1>
<p>Galgame 资源整理器</p>
</div>
</div>
<section class="control-group">
<h2>文件夹</h2>
<button id="pickSourceButton" class="primary-action" type="button">
选择游戏文件夹
</button>
<button id="pickOutputButton" type="button">选择输出文件夹</button>
<div
id="sourcePathBox"
class="path-box"
data-state="empty"
role="group"
aria-live="polite"
aria-atomic="true"
aria-label="源目录:未选择,待选择"
>
<span>源目录</span>
<strong id="sourceName">未选择</strong>
<em id="sourceState">待选择</em>
</div>
<div
id="outputPathBox"
class="path-box"
data-state="empty"
role="group"
aria-live="polite"
aria-atomic="true"
aria-label="输出目录:未选择,整理前选择"
>
<span>输出到</span>
<strong id="outputName">未选择</strong>
<em id="outputState">整理前选择</em>
</div>
</section>
<section class="control-group">
<h2>要整理的类型</h2>
<div
id="categoryPresets"
class="category-presets"
role="group"
aria-label="快速选择素材类型"
aria-describedby="categoryPresetHint"
>
<button type="button" data-category-preset="all">全部</button>
<button type="button" data-category-preset="filled">有素材</button>
<button type="button" data-category-preset="images">图片</button>
<button type="button" data-category-preset="audio">音频</button>
<button type="button" data-category-preset="video">视频</button>
<button type="button" data-category-preset="text">文本</button>
</div>
<p id="categoryPresetHint" class="category-preset-hint" data-state="preset" aria-live="polite">
当前预设:全部
</p>
<div
id="categoryOptions"
class="category-options"
role="group"
aria-label="素材类型勾选"
aria-describedby="categorySelectionSummary"
></div>
<p id="categorySelectionSummary" class="category-selection-summary" data-state="empty" aria-live="polite">
扫描后显示当前勾选类型的预计复制量。
</p>
</section>
<section class="control-group">
<h2>模式</h2>
<div id="modeSwitch" class="mode-switch" role="group" aria-label="界面模式" aria-describedby="modeHelp">
<button id="beginnerModeButton" type="button">新手模式</button>
<button id="advancedModeButton" type="button">高级功能</button>
</div>
<p id="modeHelp" class="mode-help">只显示最常用的整理流程。</p>
</section>
<section class="control-group">
<h2>操作</h2>
<button id="scanButton" type="button" aria-describedby="actionHint">扫描素材</button>
<button id="organizeButton" class="primary-action" type="button" aria-describedby="actionHint">开始整理</button>
<div
class="advanced-actions advanced-only"
role="group"
aria-label="高级操作"
aria-describedby="actionHint"
>
<button id="extractCommonArchivesButton" type="button">运行通用解包</button>
<button id="runPluginsButton" type="button">运行授权插件</button>
<button id="importPluginButton" type="button">导入本地插件</button>
<button id="importPluginPackageButton" type="button">导入插件包</button>
<button id="helpSummaryButton" type="button">导出求助摘要</button>
<button id="manifestOnlyButton" type="button">只选文件生成清单</button>
<button id="sampleButton" type="button">载入样例</button>
</div>
<p id="advancedActionHint" class="advanced-action-hint advanced-only" data-state="neutral" aria-live="polite">
高级功能会按当前文件夹状态显示可用性。
</p>
<p
id="actionHint"
class="action-hint"
data-state="blocked"
role="status"
aria-live="polite"
aria-atomic="true"
aria-label="操作提示:先选择游戏文件夹。"
>
先选择游戏文件夹。
</p>
<input id="importPluginInput" type="file" accept=".js,.gabplugin.js,text/javascript,application/javascript" hidden />
<input id="importPluginPackageInput" type="file" webkitdirectory multiple hidden />
<input id="manifestInput" type="file" webkitdirectory multiple hidden />
</section>
<div class="safety-note">
<strong>只处理本地开放文件</strong>
<span>不会上传、运行游戏、破解封包或绕过 DRM。</span>
</div>
</aside>
<section class="result-pane">
<header class="result-header">
<div>
<p class="eyebrow">本地整理器</p>
<h2 id="projectTitle">等待选择文件夹</h2>
</div>
<div
id="statusPill"
class="status-pill neutral"
role="status"
aria-live="polite"
aria-label="当前状态:准备就绪"
title="当前状态:准备就绪"
>
准备就绪
</div>
</header>
<dl
class="summary-strip"
aria-label="整理摘要:将整理 0 个素材,待扫描;预计复制 0 B,待扫描;封包提示 0 个,待扫描;文本脚本 0 个,待扫描"
title="整理摘要:将整理 0 个素材,待扫描;预计复制 0 B,待扫描;封包提示 0 个,待扫描;文本脚本 0 个,待扫描"
aria-live="polite"
aria-atomic="false"
data-state="empty"
>
<div
data-summary-metric="selected"
data-state="empty"
data-summary-note="待扫描"
role="group"
aria-label="将整理 0 个素材,状态:待扫描"
title="将整理 0 个素材,状态:待扫描"
>
<dt>将整理</dt>
<dd><span id="selectedAssetCount">0</span></dd>
</div>
<div
data-summary-metric="copySize"
data-state="empty"
data-summary-note="待扫描"
role="group"
aria-label="预计复制 0 B,状态:待扫描"
title="预计复制 0 B,状态:待扫描"
>
<dt>预计复制</dt>
<dd><span id="copySize">0 B</span></dd>
</div>
<div
data-summary-metric="archives"
data-state="empty"
data-summary-note="待扫描"
role="group"
aria-label="发现 0 个封包提示,状态:待扫描"
title="发现 0 个封包提示,状态:待扫描"
>
<dt>封包提示</dt>
<dd><span id="archiveCount">0</span></dd>
</div>
<div
data-summary-metric="texts"
data-state="empty"
data-summary-note="待扫描"
role="group"
aria-label="文本脚本 0 个,状态:待扫描"
title="文本脚本 0 个,状态:待扫描"
>
<dt>文本脚本</dt>
<dd><span id="textCount">0</span></dd>
</div>
</dl>
<section
id="progressPanel"
class="progress-panel"
aria-label="任务进度:准备就绪,选择游戏文件夹后开始扫描,0%"
aria-live="polite"
aria-atomic="false"
title="准备就绪,选择游戏文件夹后开始扫描,0%"
>
<div>
<strong id="progressTitle">准备就绪</strong>
<span id="progressDetail">选择游戏文件夹后开始扫描。</span>
</div>
<div
id="progressTrack"
class="progress-track"
role="progressbar"
aria-labelledby="progressTitle"
aria-describedby="progressDetail"
aria-valuemin="0"
aria-valuemax="100"
aria-valuenow="0"
aria-valuetext="准备就绪,选择游戏文件夹后开始扫描,0%"
>
<span id="progressBar"></span>
</div>
</section>
<nav class="tabs" aria-label="结果视图" role="tablist" aria-orientation="horizontal">
<button
class="tab active"
id="tab-overview"
data-tab="overview"
type="button"
role="tab"
aria-controls="overviewPanel"
aria-selected="true"
aria-label="总览:等待扫描结果,当前选中"
title="总览:等待扫描结果,当前选中"
>
总览
</button>
<button
class="tab"
id="tab-categories"
data-tab="categories"
type="button"
role="tab"
aria-controls="categoriesPanel"
aria-selected="false"
aria-label="分类:等待扫描分类,未选中"
title="分类:等待扫描分类,未选中"
tabindex="-1"
>
分类
</button>
<button
class="tab"
id="tab-archives"
data-tab="archives"
type="button"
role="tab"
aria-controls="archivesPanel"
aria-selected="false"
aria-label="封包:等待封包提示,未选中"
title="封包:等待封包提示,未选中"
tabindex="-1"
>
封包
</button>
<button
class="tab"
id="tab-authorizedPlugins"
data-tab="authorizedPlugins"
type="button"
role="tab"
aria-controls="authorizedPluginsPanel"
aria-selected="false"
aria-label="插件:等待授权插件状态,未选中"
title="插件:等待授权插件状态,未选中"
tabindex="-1"
>
插件
</button>
<button
class="tab"
id="tab-log"
data-tab="log"
type="button"
role="tab"
aria-controls="logPanel"
aria-selected="false"
aria-label="日志:暂无日志,未选中"
title="日志:暂无日志,未选中"
tabindex="-1"
>
日志
</button>
</nav>
<section
id="overviewPanel"
class="tab-panel active"
role="tabpanel"
aria-labelledby="tab-overview"
aria-description="总览面板,等待扫描结果"
aria-live="polite"
tabindex="0"
></section>
<section
id="categoriesPanel"
class="tab-panel"
role="tabpanel"
aria-labelledby="tab-categories"
aria-description="分类面板,等待扫描分类"
aria-live="polite"
tabindex="0"
hidden
></section>
<section
id="archivesPanel"
class="tab-panel"
role="tabpanel"
aria-labelledby="tab-archives"
aria-description="封包面板,等待封包提示"
aria-live="polite"
tabindex="0"
hidden
></section>
<section
id="authorizedPluginsPanel"
class="tab-panel"
role="tabpanel"
aria-labelledby="tab-authorizedPlugins"
aria-description="插件面板,等待授权插件状态"
aria-live="polite"
tabindex="0"
hidden
></section>
<section
id="logPanel"
class="tab-panel"
role="tabpanel"
aria-labelledby="tab-log"
aria-description="日志面板,暂无日志"
aria-live="polite"
tabindex="0"
hidden
></section>
</section>
</section>
</main>
<template id="emptyTemplate">
<div class="empty-state">
<div class="empty-glyph" aria-hidden="true"></div>
<h3>先选择一个游戏文件夹</h3>
<p>GalAssetBox 会在本地扫描文件名、大小和开放格式,并按分类复制到你指定的输出文件夹。</p>
<div class="empty-state-tags">
<span>本地扫描</span>
<span>开放格式</span>
<span>整理报告</span>
</div>
</div>
</template>
<script src="./src/plugin-host.js"></script>
<script src="./src/authorized-plugins.js"></script>
<script src="./src/app.js"></script>
</body>
</html>