-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
420 lines (391 loc) · 24.8 KB
/
index.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
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
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hydrus slideshow viewer</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="description" content="A slideshow viewer for your Hydrus client.">
<link rel="manifest" href="./manifest.json">
<link rel="apple-touch-icon" sizes="180x180" href="./icons/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="./icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="./icons/favicon-16x16.png">
<link rel="mask-icon" href="./icons/safari-pinned-tab.svg" color="#4a4a4a">
<link rel="shortcut icon" href="./icons/favicon.ico">
<meta name="apple-mobile-web-app-title" content="Hydrus Slideshow">
<meta name="application-name" content="Hydrus Slideshow">
<meta name="msapplication-TileColor" content="#4a4a4a">
<meta name="msapplication-config" content="./icons/browserconfig.xml">
<meta name="theme-color" content="#4a4a4a">
<script src="./javascripts/jquery-3.5.1.js" type="module"></script>
<script src="./javascripts/anvaka_panzoom.js"></script>
<script src="./javascripts/ui_functions.js" type="module"></script>
<script src="./javascripts/file_functions.js" type="module"></script>
<script src="./javascripts/tag_functions.js" type="module"></script>
<script src="./javascripts/main.js" type="module"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous" />
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.css" /> -->
<link rel="stylesheet" type="text/css" href="./stylesheets/style.css" />
<style>
.hidden {
display: none;
}
.visible {
display: contents;
}
.nocursor {
cursor: none;
}
</style>
<style id="notesCSS">
</style>
<body>
<div class="offcanvas offcanvas-start leftSidebar" data-bs-scroll="true" data-bs-backdrop="false" id="leftSidebar">
<div id="leftSidebarDraggable" class="sidebar-draggable"></div>
<!-- -->
<div class="accordion">
<div class="accordion-item">
<h2 class="accordion-header d-flex justify-content-between" id="file_tag_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#file_tag_panel" aria-expanded="false" aria-controls="file_tag_panel">
Search</button><button type="button" class="btn-close m-2" data-bs-dismiss="offcanvas"
aria-label="Close"></button>
</h2>
<div id="file_tag_panel" class="accordion-collapse collapse" aria-labelledby="file_tag_label">
<div class="accordion-body">
<label for="command" class="form-label">Enter JSON; or </label>
<label for="uploadButton" class="btn btn-secondary btn-sm">Import JSON</label>
<input class="visually-hidden-focusable" id="uploadButton" type="file" accept="application/json,text/plain">
<textarea id="command" class="menu-textbox font-monospace form-control mb-3" rows="5" spellcheck="false" placeholder="{ "named search": ["tag1", ["green","red"] ] }"></textarea>
<div class="form-floating mb-3">
<select class="form-select" id="sort_order">
<option value="0">file size - smallest first</option>
<option value="1">file size - largest first</option>
<option value="2">duration - shortest first</option>
<option value="3">duration - longest first</option>
<option value="4">import time - oldest first</option>
<option value="5" selected="">import time - newest first</option>
<option value="6">filetype</option>
<option value="7">random</option>
<option value="8">width - slimmest first</option>
<option value="9">width - widest first</option>
<option value="10">height - shortest first</option>
<option value="11">height - tallest first</option>
<option value="12">ratio - tallest first</option>
<option value="13">ratio - widest first</option>
<option value="14">number of pixels - ascending</option>
<option value="15">number of pixels - descending</option>
<option value="16">number of tags - ascending</option>
<option value="17">number of tags - descending</option>
<option value="18">number of media views - ascending</option>
<option value="19">number of media views - descending</option>
<option value="20">total media viewtime - ascending</option>
<option value="21">total media viewtime - descending</option>
<option value="22">
approximate bitrate - smallest first
</option>
<option value="23">
approximate bitrate - largest first
</option>
<option value="24">has audio - audio first</option>
<option value="25">has audio - silent first</option>
<option value="26">modified time - oldest first</option>
<option value="27">modified time - newest first</option>
<option value="28">framerate - slowest first</option>
<option value="29">framerate - fastest first</option>
<option value="30">number of frames - smallest first</option>
<option value="31">number of frames - largest first</option>
<option value="32">last viewed time - oldest first</option>
<option value="33">last viewed time - newest first</option>
<option value="34">archive timestamp - oldest first</option>
<option value="35">archive timestamp - newest first</option>
<option value="36">hash hex</option>
<option value="37">namespace sort</option>
<option value="38">namespace sort - reversed</option>
</select>
<label for="sort_order">Sort order</label>
</div>
<div class="d-flex justify-content-start">
<button type="button" class="btn btn-secondary" id="submitButton">
Submit
</button>
<a class="btn btn-link" href="https://hydrusnetwork.github.io/hydrus/developer_api.html#get_files_search_files" target="_blank" rel="noreferrer noopener" role="button">Search files reference</a>
</div>
</div>
</div>
</div>
<!-- <div class="accordion-item">
<p class="accordion-button-label" id="currentPos_display_string">
Showing file [<span id="file_no">xxx</span>/<span id="file_length">XXX</span>] of search: "<span
id="search_no">XXX</span>"
</p>
</div> -->
<div class="accordion-item">
<h2 class="accordion-header" id="navigation_label">
<button class="accordion-button " type="button" data-bs-toggle="collapse"
data-bs-target="#navigation_panel" aria-expanded="false" aria-controls="navigation_panel">
Navigation
</button>
</h2>
<div id="navigation_panel" class="accordion-collapse collapse show" aria-labelledby="navigation_label">
<div class="accordion-body">
<div class="mb-3">
<button type="button" class="btn btn-secondary" id="file_previous">Previous</button>
<button type="button" class="btn btn-secondary mx-3" id="file_next">Next</button>
</div>
<div>
<label for="jump_files_by">Skip files by:</label>
<div class="input-group mb-3">
<button type="button" class="input-group-text"
id="file_jump_previous">«</button>
<input type="number" class="m-0 form-control" id="jump_files_by" value="1"
min="1" aria-label="Number of files to skip by:">
<button type="button" class="input-group-text"
id="file_jump_next">»</button>
</div>
</div>
<div class="mb-3">
<label for="jump_to_search_number" for="jump_to_search_name">By search
number or name:</label>
<div class="input-group">
<input class="form-control" type="number" id="jump_to_search_number" value="1" min="1">
<select class="w-50 form-select" id="jump_to_search_name">
<option>Search name</option>
</select>
</div>
</div>
<div class="input-group mb-3">
<label class="input-group-text" for="jump_to_file_number">File no.</label>
<button type="button" class="input-group-text"
id="jump_to_file_first">«</button>
<input class="form-control" type="number" value="1" min="1" id="jump_to_file_number">
<button type="button" class="input-group-text" id="jump_to_file_last">»</button>
<span class="input-group-text" id="file_length">of xxx files</span>
</div>
<button type="button" class="btn btn-secondary" id="submit_jump">Jump!</button>
<button type="button" class="btn btn-secondary mx-3" id="file_random">Random</button>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="current_tags_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#current_tags_panel" aria-expanded="false" aria-controls="current_tags_panel">
Current File tags
</button>
</h2>
<div id="current_tags_panel" class="accordion-collapse collapse" aria-labelledby="current_tags_label">
<div class="accordion-body">
<div class="form-floating mb-3">
<select class="form-select" id="tagRepositoryList"></select>
<label for="tagRepositoryList">Tag services</label>
</div>
<div class="form-floating mb-3">
<select class="form-select" id="displayTagToggle">
<option value="display">Display tags</option>
<option value="storage">Actual tags</option>
</select>
<label for="displayTagToggle">Tags presented as:</label>
</div>
<textarea id="taglist" rows="20" class="menu-textbox form-control mb-3"
placeholder='Tags... " Submit" to commit to current file. Remote tag services not supported.'
readonly="readonly"></textarea>
<button type="button" class="btn btn-secondary" id="committags"
style="display: none">Submit</button>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="settings_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#settings_panel" aria-expanded="false" aria-controls="settings_panel">
Settings
</button>
</h2>
<div id="settings_panel" class="accordion-collapse collapse" aria-labelledby="settings_label">
<div class="accordion-body">
<div class="mb-3">
<label class="form-label">Hydrus Client API:</label>
<div class="form-floating mb-2">
<input type="text" class="form-control" id="clientURL"><label for="clientURL">Client URL</label>
</div>
<div class="form-floating mb-2">
<input type="text" class="form-control" id="clientKey">
<label for="clientKey">Access key</label>
</div>
<button type="button" class="btn btn-secondary" id="client_test">Test API access</button>
<p>Status: <span id="clientStatus">...</span></p>
</div>
<div class="mb-3">
<label class="form-label">App settings:</label>
<div class="input-group mb-2">
<label for="sidebarDelay" class="input-group-text">Hide UI delay (ms)</label>
<input type="number" id="sidebarDelay" class="form-control" value="2000" min="200"
max="2147483647" />
</div>
<div class="form-floating mb-2">
<input type="text" id="custom_namespace" class="form-control"
value="creator-series-title-volume-chapter-page" />
<label for="custom_namespace">Custom namespace</label>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- -->
</div>
<div class="offcanvas offcanvas-end rightSidebar" data-bs-backdrop="false" data-bs-scroll="true" tabindex="-1"
id="rightSidebar" aria-labelledby="rightSidebarLabel">
<div id="rightSidebarDraggable" class="sidebar-draggable"></div>
<div class="accordion">
<div class="accordion-item">
<h2 class="accordion-header d-flex justify-content-between" id="file_info_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#file_info_panel" aria-expanded="false" aria-controls="file_info_panel">
File information</button><button type="button" class="btn-close m-2" data-bs-dismiss="offcanvas"
aria-label="Close"></button>
</h2>
<div id="file_info_panel" class="accordion-collapse collapse" aria-labelledby="file_info_label"
style="">
<div class="accordion-body overflow-x-auto">
<div>
<label for="file_info_hash">Hash:</label>
<p id="file_info_hash" class="mono"></p>
</div>
<div>
<label for="file_info_urls">Known URLs:</label>
<p id="file_info_urls" class="mono"></p>
</div>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="notes_label">
<button class="accordion-button " type="button" data-bs-toggle="collapse"
data-bs-target="#notes_panel" aria-expanded="false" aria-controls="notes_panel">
Notes</button>
</h2>
<div id="notes_panel" class="accordion-collapse collapse show" aria-labelledby="notes_label" style="">
<div class="accordion-body">
<nav id="file_info_notes" class="btn-group dropdown w-100 pb-2 ">
<a class="btn btn-outline-secondary dropdown-toggle d-flex align-items-center justify-content-between active"
href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"
data-hydrus="DONE" style="overflow-x: hidden;">
<span class="overflow-x-hidden">Note(s)</span>
</a>
<ul class="dropdown-menu"></ul>
</nav>
<div id="file_info_notefield"></div>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="viewerSettings_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#viewerSettings_label" aria-expanded="false"
aria-controls="viewerSettings_label">
Other Settings</button>
</h2>
<div id="viewerSettings_label" class="accordion-collapse collapse"
aria-labelledby="viewerSettings_label" style="">
<div class="accordion-body">
<div class="form-check form-switch mb-2">
<input class="form-check-input" type="checkbox" role="switch" id="fullscreen_mode">
<label class="form-check-label" for="fullscreen_mode">Fullscreen mode</label>
</div>
<div class="form-check form-switch mb-2">
<input class="form-check-input" type="checkbox" role="switch" id="panzoom_persist">
<label class="form-check-label" for="panzoom_persist">Persist Zoom across files </label>
</div>
<div class="form-check form-switch mb-2">
<input class="form-check-input" type="checkbox" role="switch" id="floating_notes_checkbox">
<label class="form-check-label text-wrap" for="floating_notes_checkbox">Enable floating
notes<br>(will appear if there are notes available) </label>
</div>
<div class="form-floating">
<select class="form-select" id="floating_notes_css">
<option value="dark transclucent" selected>dark transclucent</option>
<option value="dark transclucent_BH">dark transclucent (bold header)</option>
<option value="text shadow outline">text shadow outline</option>
<option value="text shadow outline_BH">text shadow outline (bold header)</option>
<option value="what">what (use at own risk)</option>
</select>
<label for="floating_notes_css">Apply floating note style:</label>
</div>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header" id="help_label">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
data-bs-target="#help_panel" aria-expanded="false" aria-controls="help_panel">Help</button>
</h2>
<div id="help_panel" class="accordion-collapse collapse" aria-labelledby="help_label" style="">
<div class="accordion-body">
<p>Show keyboard shortcuts here...</p>
</div>
</div>
</div>
</div>
</div>
<button class="z-1 position-sticky btn btn-primary float-start m-2" type="button" data-bs-toggle="offcanvas"
data-bs-target="#leftSidebar" aria-controls="leftSidebar" id="leftSidebarToggle">
App
</button>
<button class="z-1 position-sticky btn btn-primary float-end m-2" type="button" data-bs-toggle="offcanvas"
data-bs-target="#rightSidebar" aria-controls="rightSidebar" id="rightSidebarToggle">
Info
</button>
<div class="z-1 position-absolute bottom-0 end-0 m-2 btn-group" role="group" aria-label="zoom controls">
<input class="btn-check" id="zoomToggle" type="checkbox" autocomplete="off" aria-controls="zoomToggle">
<label class="btn btn-outline-primary" for="zoomToggle">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-search"
viewBox="0 0 16 16">
<path
d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z">
</path>
</svg>
</label>
<input class="btn-check" id="window_fitToggle" type="checkbox" autocomplete="off"
aria-controls="window_fitToggle">
<label class="btn btn-outline-primary" for="window_fitToggle">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
class="bi bi-arrows-angle-expand" viewBox="0 0 16 16">
<path fill-rule="evenodd"
d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707z" />
</svg>
</label>
</div>
<div class="popup custom-body d-flex flex-column z-1 d-none" style="height: 300px; width: 300px;">
<div class="custom-header popup-header">
<div class="d-flex align-items-center">
<span class="w-100 text-center">
</span>
<select class="btn dropdown-toggle-split">
</select>
</div>
</div>
<div class="popup-content custom-content overflow-y-auto flex-grow-1">
<p></p>
</div>
</div>
<div id="fileCanvas">
<div id="filePlaceholder" class="swiper-wrapper">
</div>
<div id="progress_bar" class="position-absolute top-50 start-50 translate-middle w-100" style="display:none">
<div class="mx-auto rounded-pill border border-1 border-secondary bg-transparent progress w-50"
role="progressbar" aria-label="Loading files" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
<div class="bg-secondary progress-bar progress-bar-striped progress-bar-animated" style="width:0%">
</div>
</div>
<p id="progress_bar_status" class="text-center text-break"></p>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN"
crossorigin="anonymous"></script>
<!-- <script src="https://cdn.jsdelivr.net/npm/swiper@8/swiper-bundle.min.js"></script> -->
</body>
</html>