-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
305 lines (298 loc) · 12.8 KB
/
Copy pathindex.html
File metadata and controls
305 lines (298 loc) · 12.8 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>BBQS Uploader</title>
<link rel="icon" href="/favicon.ico" />
<script>
// Applies the stored theme override before first paint so a saved dark/light choice doesn't
// flash the OS-preferred theme first. Key kept in sync with THEME_KEY in src/lib/settings.ts.
try {
var storedTheme = localStorage.getItem("bbqs-uploader.theme");
if (storedTheme === "light" || storedTheme === "dark") document.documentElement.dataset.theme = storedTheme;
} catch (e) {}
// Swaps the sign-in button for the (still-empty) signed-in avatar slot before first paint
// when a previous session's tokens are still in storage, so refreshing while already signed
// in neither flashes the sign-in button nor pops the avatar in afterwards and shifts the
// theme toggle sideways (the header's oauth-row is right-aligned). main.ts's renderAuthUI()
// clears this attribute once the real state is known. Key kept in sync with STORAGE_KEY in
// src/lib/settings.ts.
try {
var storedSettings = JSON.parse(localStorage.getItem("bbqs-uploader.settings.v1"));
if (storedSettings && storedSettings.oauth && storedSettings.oauth.accessToken) {
document.documentElement.dataset.signedIn = "1";
}
} catch (e) {}
</script>
</head>
<body>
<main>
<header class="site-header">
<a href="https://brain-bbqs.org" target="_blank" rel="noopener" aria-label="BBQS" title="BBQS">
<img class="brand-logo" src="/src/assets/bbqs-logo.png" alt="BBQS" />
</a>
<h1>BBQS Uploader</h1>
<div class="oauth-row">
<button
type="button"
id="theme-toggle"
class="theme-toggle"
aria-label="Toggle light/dark mode"
title="Toggle light/dark mode"
>
<svg
class="theme-toggle-moon"
viewBox="0 0 24 24"
width="20"
height="20"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" />
</svg>
<svg
class="theme-toggle-sun"
viewBox="0 0 24 24"
width="20"
height="20"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<circle cx="12" cy="12" r="5" />
<line x1="12" y1="1" x2="12" y2="3" />
<line x1="12" y1="21" x2="12" y2="23" />
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64" />
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78" />
<line x1="1" y1="12" x2="3" y2="12" />
<line x1="21" y1="12" x2="23" y2="12" />
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36" />
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22" />
</svg>
</button>
<button type="button" id="oauth-signin-btn" class="primary">Sign in with EMBER</button>
<div id="oauth-signed-in" class="oauth-signed-in" hidden>
<span id="oauth-avatar" class="oauth-avatar" tabindex="0" aria-label="Account menu"></span>
<div class="oauth-popover" role="menu">
<p class="oauth-popover-greeting">You are logged in as <strong id="oauth-username"></strong>.</p>
<hr class="oauth-popover-divider" />
<button type="button" id="oauth-signout-btn" class="oauth-popover-signout" role="menuitem">
<span>Sign out</span>
<svg
class="oauth-popover-signout-icon"
viewBox="0 0 24 24"
width="14"
height="14"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" />
<polyline points="16 17 21 12 16 7" />
<line x1="21" y1="12" x2="9" y2="12" />
</svg>
</button>
</div>
</div>
</div>
</header>
<p class="site-subtitle">
<img class="site-subtitle-logo" src="/src/assets/ember-logo.png" alt="" />
<span>Your direct upload link to the EMBER-DANDI Archive</span>
<img class="site-subtitle-logo" src="/src/assets/ember-logo.png" alt="" />
</p>
<div class="speed-tips">
<p class="speed-tips-heading">
Recommendations for optimal transfer speed (1,000 Mbps is recommended for contents over 100 GB)
</p>
<ul>
<li>Store data on a high-throughput NVMe SSD (PCIe, ideally in an M.2 slot).</li>
<li>
USB-A (Generation 1 or 2) connections are not recommended; USB-A 3.0 or higher, or any USB-C/Thunderbolt
connection are preferred.
</li>
<li>Use a wired Ethernet connection rather than Wi-Fi.</li>
<li>Use Fiber internet rather than cable or DSL, if available.</li>
</ul>
</div>
<section class="card" id="config-card">
<div class="card-heading">
<h2>Dataset</h2>
<a id="view-dataset-link" class="view-dataset-link" target="_blank" rel="noopener" hidden>View dataset ↗</a>
</div>
<form id="config-form">
<div class="grid">
<select id="dandiset-id" hidden></select>
<p id="dandiset-message" class="dandiset-single">Please sign in to see your incoming datasets.</p>
<p id="dandiset-single" class="dandiset-single" hidden>
<span id="dandiset-single-text"></span>
</p>
</div>
</form>
</section>
<section class="card" id="upload-card" hidden>
<div id="progress-summary" class="progress-summary" hidden>
<div class="progress-phase progress-phase--scan">
<div class="progress-phase-head">
<span class="progress-phase-dot" aria-hidden="true"></span>
<span class="progress-phase-label">Scanning</span>
<span id="progress-hash-pct" class="progress-phase-pct"></span>
</div>
<div
class="progress-summary-bar"
role="progressbar"
aria-label="Scanning progress"
aria-valuemin="0"
aria-valuemax="100"
>
<div id="progress-hash-fill"></div>
</div>
<div class="progress-chips">
<div class="progress-chip">
<span class="progress-chip-label">Scanned</span>
<span id="progress-hash-done" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Speed</span>
<span id="progress-hash-rate" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Time left</span>
<span id="progress-hash-eta" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Files</span>
<span id="progress-hash-files" class="progress-chip-value"></span>
</div>
</div>
</div>
<div class="progress-phase progress-phase--upload">
<div class="progress-phase-head">
<span class="progress-phase-dot" aria-hidden="true"></span>
<span class="progress-phase-label">Uploading</span>
<span id="progress-upload-pct" class="progress-phase-pct"></span>
</div>
<div
class="progress-summary-bar"
role="progressbar"
aria-label="Upload progress"
aria-valuemin="0"
aria-valuemax="100"
>
<div id="progress-upload-fill"></div>
</div>
<div class="progress-chips">
<div class="progress-chip">
<span class="progress-chip-label">Uploaded</span>
<span id="progress-upload-done" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Speed</span>
<span id="progress-upload-rate" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Time left</span>
<span id="progress-upload-eta" class="progress-chip-value"></span>
</div>
<div class="progress-chip">
<span class="progress-chip-label">Files</span>
<span id="progress-upload-files" class="progress-chip-value"></span>
</div>
</div>
</div>
<div class="progress-summary-footer">
<span id="progress-footer-left"></span>
<span id="progress-footer-mid"></span>
<span></span>
</div>
</div>
<div id="dropzone">
<div class="dz-inner">
<div class="dz-icon">
<span>🎥</span>
<span>🔬</span>
<span>📄</span>
</div>
<p>
Drop your research contents here, or click to browse
<button type="button" id="browse-files-btn" class="dz-browse">files</button>
or select an entire
<button type="button" id="browse-folder-btn" class="dz-browse">folder</button>.
</p>
</div>
<input type="file" id="file-input" multiple hidden />
<input type="file" id="folder-input" webkitdirectory multiple hidden />
</div>
<div id="upload-bar" class="upload-bar" hidden>
<button type="button" id="upload-all-btn" class="primary">Upload</button>
<button type="button" id="cancel-all-btn" hidden>Cancel</button>
<button type="button" id="reset-all-btn" class="reset-all-btn">Reset</button>
</div>
<div id="dest-root" class="dest-root" hidden>
<code>sourcedata/raw/</code>
<span class="expand-control">
<span class="expand-slider">
<span class="expand-bubble" id="expand-depth-bubble"><span id="expand-depth-value">0</span> files</span>
<input type="range" id="expand-depth" min="0" max="0" value="0" step="1" aria-label="Files shown" />
<span class="expand-ruler" id="expand-depth-ticks" aria-hidden="true"></span>
</span>
</span>
</div>
<ul id="file-list"></ul>
</section>
</main>
<div class="page-footer-bar">
<div class="footer-left">
<a
id="version-indicator"
class="version-link"
href="https://github.com/brain-bbqs/bbqs-uploader"
target="_blank"
rel="noopener"
title="View source on GitHub"
></a>
<span class="footer-dot" aria-hidden="true">·</span>
<button id="whats-new-button" class="whats-new-link" type="button">What's New</button>
<span class="footer-dot" aria-hidden="true">·</span>
<button
id="clear-scan-cache-btn"
class="whats-new-link"
type="button"
title="Forget cached file scan digests, so the next drop of any file re-scans it from scratch"
>
Clear scan cache
</button>
</div>
<a
class="con-brand-link"
href="https://centerforopenneuroscience.org"
target="_blank"
rel="noopener"
aria-label="Center for Open Neuroscience"
title="Center for Open Neuroscience"
>
<img src="/src/assets/con-logo.png" alt="Center for Open Neuroscience" />
</a>
</div>
<dialog id="whats-new-modal" class="whats-new-modal">
<div class="whats-new-modal-header">
<h2>What's New</h2>
<button id="whats-new-close" class="whats-new-close" type="button" aria-label="Close">×</button>
</div>
<div id="whats-new-content" class="whats-new-content"></div>
<button id="whats-new-show-more" class="whats-new-show-more" type="button" hidden>Show more</button>
</dialog>
<script type="module" src="/src/main.ts"></script>
</body>
</html>