warning when another browser tab holds the flag

This commit is contained in:
ed 2021-08-26 22:50:22 +02:00
parent 360ed5c46c
commit 21e2874cb7
3 changed files with 10 additions and 0 deletions

View file

@ -1747,6 +1747,14 @@ html.light #bbox-overlay figcaption a {
box-shadow: none; box-shadow: none;
opacity: .2; opacity: .2;
} }
#u2flagblock {
display: none;
margin: 2em auto 4em auto;
padding: .5em;
max-width: 27em;
text-align: center;
border: .2em dashed rgba(128, 128, 128, 0.3);
}
#u2foot { #u2foot {
color: #fff; color: #fff;
font-style: italic; font-style: italic;

View file

@ -127,6 +127,7 @@ ebi('op_up2k').innerHTML = (
' <tbody></tbody>\n' + ' <tbody></tbody>\n' +
'</table>\n' + '</table>\n' +
'<p id="u2flagblock"><b>the files were added to the queue</b><br />however there is a busy up2k in another browser tab,<br />so waiting for that to finish first</p>\n' +
'<p id="u2foot"></p>\n' + '<p id="u2foot"></p>\n' +
'<p id="u2footfoot" data-perm="write">( you can use the <a href="#" id="u2nope">basic uploader</a> if you don\'t need lastmod timestamps, resumable uploads, or progress bars )</p>' '<p id="u2footfoot" data-perm="write">( you can use the <a href="#" id="u2nope">basic uploader</a> if you don\'t need lastmod timestamps, resumable uploads, or progress bars )</p>'
); );

View file

@ -1081,6 +1081,7 @@ function up2k_init(subtle) {
if (flag) { if (flag) {
if (is_busy) { if (is_busy) {
flag.take(now); flag.take(now);
ebi('u2flagblock').style.display = flag.ours ? '' : 'block';
if (!flag.ours) if (!flag.ours)
return defer(); return defer();
} }