From 21e2874cb75a84f1eacccb5f322579cc43bbf48c Mon Sep 17 00:00:00 2001 From: ed Date: Thu, 26 Aug 2021 22:50:22 +0200 Subject: [PATCH] warning when another browser tab holds the flag --- copyparty/web/browser.css | 8 ++++++++ copyparty/web/browser.js | 1 + copyparty/web/up2k.js | 1 + 3 files changed, 10 insertions(+) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index ba72da68..7cb9dc4d 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1747,6 +1747,14 @@ html.light #bbox-overlay figcaption a { box-shadow: none; 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 { color: #fff; font-style: italic; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index e07f7778..c4c308ef 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -127,6 +127,7 @@ ebi('op_up2k').innerHTML = ( ' \n' + '\n' + + '

the files were added to the queue
however there is a busy up2k in another browser tab,
so waiting for that to finish first

\n' + '

\n' + '

( you can use the basic uploader if you don\'t need lastmod timestamps, resumable uploads, or progress bars )

' ); diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index dfe4fdb1..3d36e842 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1081,6 +1081,7 @@ function up2k_init(subtle) { if (flag) { if (is_busy) { flag.take(now); + ebi('u2flagblock').style.display = flag.ours ? '' : 'block'; if (!flag.ours) return defer(); }