-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpage.html
333 lines (319 loc) · 15.5 KB
/
page.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>NSP Indexer</title>
<link rel="icon" type="image/svg+xml" href="img/favicon.svg">
<link rel="icon" type="image/png" href="img/favicon.png">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-icons.css" rel="stylesheet">
<link href="css/jquery-confirm.min.css" rel="stylesheet">
<link href="css/nspindexer.css" rel="stylesheet">
</head>
<body>
<header>
<nav class="navbar navbar-expand-md navbar-dark bg-dark shadow-sm">
<div class="container">
<a class="navbar-brand d-flex align-items-center" href="#">
<i class="bi-controller brandLogo d-none" id="brandLogo"></i>
<div class="spinner-border spinner-border-sm d-inline" id="loadingSpinner" role="status"></div>
<strong> NSP Indexer</strong>
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarContent" aria-controls="navbarContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end mt-2 mt-md-0" id="navbarContent">
<button class="mx-0 mx-md-1 my-2 my-md-0 btn bg-secondary text-light" id="btnRefresh"
title="Refresh List"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-arrow-repeat"></i>
<span class="d-inline-block d-md-none">Refresh List</span>
</button>
<button class="mx-0 mx-md-3 my-2 my-md-0 btn bg-secondary text-light" id="btnMetadata"
title="Update Metadata"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-cloud-download"></i>
<span class="d-inline-block d-md-none">Update Metadata</span>
</button>
<form>
<div class="input-group">
<input class="form-control" id="keyword" type="text" placeholder="Search Titles..."
aria-label="Search">
<span class="input-group-text" id="keywordClear"><i class="bi-x"></i></span>
</div>
</form>
</div>
</div>
</nav>
</header>
<main>
<div class="py-3 bg-light">
<div class="container mb-3 d-none" id="warningUnmatched">
<div class="card text-white bg-danger">
<div class="card-header">
<strong>Unmatched files found!</strong>
</div>
<ul class="list-group list-group-flush" id="unmatchedList"></ul>
</div>
</div>
<div class="container" id="titleList">
</div>
</div>
</main>
<footer class="text-muted py-5">
<div class="container">
<p class="float-end mb-1">
<a href="#">Back to top</a>
</p>
<p class="mb-1">NSP Indexer v<span id="version">0</span></p>
</div>
</footer>
<div class="modal fade" id="modalRomInfo" tabindex="-1" aria-labelledby="modalRomInfoLabel" aria-hidden="true">
<div class="modal-dialog">
<div id="modalRomInfoContent" class="modal-content">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="modalRomInfoLabel">ROM Info</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<div id="modalRomInfoBody"></div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="modalNetInstall" tabindex="-1" aria-labelledby="modalNetInstallLabel" aria-hidden="true">
<div class="modal-dialog">
<div id="netinstallContent" class="modal-content">
<div class="modal-header bg-dark">
<h5 class="modal-title text-white" id="modalNetInstallLabel">Net Install</h5>
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
aria-label="Close"></button>
</div>
<div class="modal-body">
<div class="row mb-3">
<div class="input-group mb-3">
<span class="input-group-text">Switch IP</span>
<input type="text" class="form-control" id="switchIp" placeholder="x.x.x.x">
</div>
</div>
<div class="row">
<div id="listNetInstall"></div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success" id="startNetInstall" disabled>Install</button>
</div>
</div>
</div>
</div>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery.lazy.min.js"></script>
<script src="js/jquery-confirm.min.js"></script>
<script src="js/nspindexer.js?random=<?= uniqid() ?>"></script>
<script id="cardTemplate" type="text/x-template">
<div class="row gx-2 mb-4">
<div class="col col-2 d-none d-md-block">
<div class="card px-0 shadow-sm fill cardThumb">
<img data-src="<%=thumbUrl%>" class="img-fluid rounded d-block lazy"/>
</div>
</div>
<div class="col col-12 col-md-10">
<div class="card shadow-sm">
<div class="cardBanner fill rounded-3">
<img data-src="<%=bannerUrl%>" class="img-fluid lazy">
</div>
<div class="card-body rounded cardBody">
<h5 class="card-title"><strong><%=name%></strong>
<button type="button" title="Net Install"
class="btn btn-sm btn-primary float-end btnNetInstall <%=enableNetInstall%>"
data-title-id="<%=titleId%>" data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-cloud-arrow-up-fill"></i>
</button>
</h5>
<div class="card-text">
<p class="small noWrap"><%=intro%></p>
<p class="small">
<strong>Latest Version:</strong>
<span class="badge <%=updateClass%>">v<%=latestVersion%></span> <span class="text-muted">(<%=latestDate%>)</span>
</p>
<ul class="list-group">
<li class="list-group-item">
<p class="my-1">
<strong>Base Game</strong>
<span class="badge bg-success"><%=fileType%></span>
<span class="float-end">
<span class="badge bg-secondary"><%=size%></span>
<button data-title-id="<%=titleId%>" data-path="<%=path%>"
title="ROM Info"
class="btnRomInfo btn btn-sm bg-primary text-light <%=enableRomInfo%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-binary"></i>
</button>
<button data-title-id="<%=titleId%>" data-path="<%=path%>"
title="Check Filename"
class="btnAnalyze btn btn-sm bg-primary text-light <%=enableRename%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-check"></i>
</button>
<a href="<%=url%>" title="Download" class="btn btn-sm bg-primary text-light"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-download"></i>
</a>
</span>
</p>
</li>
<li class="list-group-item <%=hideUpdates%>">
<p class="my-1 contentListTrigger">
<strong>Updates</strong>
<span class="float-end">
<span class="badge bg-secondary"><%=countUpdates%></span>
<i class="listChevron bi-chevron-down text-dark"></i>
</span>
</p>
<ul class="list-group my-2 contentList">
<%=listUpdates%>
</ul>
</li>
<li class="list-group-item <%=hideDlc%>">
<p class="my-1 contentListTrigger">
<strong>DLC</strong>
<span class="float-end">
<span class="badge bg-secondary"><%=countDlc%></span>
<i class="listChevron bi-chevron-down text-dark"></i>
</span>
</p>
<ul class="list-group my-2 contentList">
<%=listDlc%>
</ul>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</script>
<script id="updateTemplate" type="text/x-template">
<li class="list-group-item">v<%=version%> <small class="text-muted">(#<%=revision%>, <%=date%>)</small>
<span class="float-end">
<span class="badge bg-secondary"><%=size%></span>
<button data-title-id="<%=titleId%>" data-version="<%=version%>" data-path="<%=path%>" title="ROM Info"
class="btnRomInfo btn btn-sm bg-primary text-light <%=enableRomInfo%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-binary"></i>
</button>
<button data-title-id="<%=titleId%>" data-version="<%=version%>" data-path="<%=path%>"
title="Check Filename"
class="btnAnalyze btn btn-sm bg-primary text-light <%=enableRename%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-check"></i>
</button>
<a href="<%=url%>" title="Download" class="btn btn-sm bg-primary text-light" data-bs-toggle="tooltip"
data-bs-placement="left">
<i class="bi-download"></i>
</a>
</span>
</li>
</script>
<script id="dlcTemplate" type="text/x-template">
<li class="list-group-item"><%=name%>
<span class="float-end">
<span class="badge bg-secondary"><%=size%></span>
<button data-title-id="<%=titleId%>" data-path="<%=path%>" title="ROM Info"
class="btnRomInfo btn btn-sm bg-primary text-light <%=enableRomInfo%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-binary"></i>
</button>
<button data-title-id="<%=titleId%>" data-path="<%=path%>" title="Check Filename"
class="btnAnalyze btn btn-sm bg-primary text-light <%=enableRename%>"
data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-file-earmark-check"></i>
</button>
<a href="<%=url%>" title="Download" class="btn btn-sm bg-primary text-light" data-bs-toggle="tooltip"
data-bs-placement="left">
<i class="bi-download"></i>
</a>
</span>
</li>
</script>
<script id="romInfoTemplate" type="text/x-template">
<div id="modalrominfoContainer" class="container">
<dl class="row">
<dt class="col-sm-3">ID</dt>
<dd class="col-sm-9"><%=titleId%></dd>
<dt class="col-sm-3">Title</dt>
<dd class="col-sm-9"><%=titlename%></dd>
<dt class="col-sm-3">Publisher</dt>
<dd class="col-sm-9"><%=publisher%></dd>
<dt class="col-sm-3">Version</dt>
<dd class="col-sm-9"><%=humanVersion%></dd>
<dt class="col-sm-3">Int Version</dt>
<dd class="col-sm-9">v<%=intVersion%></dd>
<dt class="col-sm-3">ROM Type</dt>
<dd class="col-sm-9"><%=mediaType%></dd>
<dt class="col-sm-3">SDK</dt>
<dd class="col-sm-9"><%=sdk%></dd>
<dt class="col-sm-3">Title Key</dt>
<dd class="col-sm-9"><%=titleKey%></dd>
<img src="<%=imgData%>" class="img-thumbnail <%=showThumb%>"/>
</dl>
</div>
</script>
<script id="netInstallTemplate" type="text/x-template">
<ul class="list-group">
<li class="list-group-item">
<div class="form-check">
<input class="form-check-input netInstallCheckbox" type="checkbox" id="netinstall_base"
data-path="<%=path%>">
<label class="form-check-label" for="netinstall_base" class="noWrap"><strong>Base Game</strong></label>
<span class="float-end"><span class="badge bg-secondary"><%=size_real%></span></span>
</div>
</li>
<li class="list-group-item <%=hideUpdates%>">
<div class="row">
<p class="my-1">
<strong>Updates</strong>
</p>
</div>
<ul class="list-group">
<%=listUpdates%>
</ul>
</li>
<li class="list-group-item <%=hideDlc%>">
<div class="row">
<p class="my-1">
<strong>DLC</strong>
</p>
</div>
<ul class="list-group">
<%=listDlc%>
</ul>
</li>
</ul>
</script>
<script id="netInstallContentTemplate" type="text/x-template">
<div class="form-check">
<input class="form-check-input netInstallCheckbox" type="checkbox" id="netinstall_<%=type%>_<%=idx%>"
data-path="<%=path%>">
<label class="form-check-label w-100 small" for="netinstall_<%=type%>_<%=idx%>" class="noWrap"><%=name%><span
class="float-end"><span class="badge bg-secondary"><%=size_real%></span></span></label>
</div>
</script>
<script id="unmatchedTemplate" type="text/x-template">
<li class="list-group-item">
<%=name%>
<span class="float-end">
<button data-path="<%=path%>" class="btnRename btn btn-sm bg-danger text-light"
title="Rename" data-bs-toggle="tooltip" data-bs-placement="left">
<i class="bi-spellcheck"></i>
</button>
</span>
</li>
</script>
</body>
</html>