mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 04:04:21 +02:00
Merge branch 'ui-2-connection' into ui-3-home
This commit is contained in:
commit
f98f3e728b
2 files changed
+8
-2
No files matched your search
@@ -491,6 +491,9 @@ class Connecting(unittest.TestCase):
|
|||||||
finally:
|
finally:
|
||||||
for e in release.values():
|
for e in release.values():
|
||||||
e.set()
|
e.set()
|
||||||
|
for t in tests:
|
||||||
|
if t.ident: # started
|
||||||
|
t.join(10)
|
||||||
result = self.link.snapshot()["tests"][d["id"]]
|
result = self.link.snapshot()["tests"][d["id"]]
|
||||||
self.assertTrue(result["done"])
|
self.assertTrue(result["done"])
|
||||||
self.assertEqual(result["rows"][0]["detail"], "test 2")
|
self.assertEqual(result["rows"][0]["detail"], "test 2")
|
||||||
|
|||||||
+5
-2
@@ -1470,13 +1470,16 @@ let toastTimer;
|
|||||||
function toast(msg, err = false) {
|
function toast(msg, err = false) {
|
||||||
const el = $("toast");
|
const el = $("toast");
|
||||||
el.textContent = msg.split("\n").slice(-1)[0] || msg;
|
el.textContent = msg.split("\n").slice(-1)[0] || msg;
|
||||||
el.className = "toast show" + (err ? " err" : "");
|
|
||||||
// A popover, so it shows above an open dialog (a modal one covers everything else): opened
|
// A popover, so it shows above an open dialog (a modal one covers everything else): opened
|
||||||
// again when a dialog has opened since, which puts it back on top.
|
// again when a dialog has opened since, which puts it back on top. Opened hidden first, so
|
||||||
|
// it still fades in.
|
||||||
if (el.showPopover && (!el.matches(":popover-open") || document.querySelector("dialog:modal"))) {
|
if (el.showPopover && (!el.matches(":popover-open") || document.querySelector("dialog:modal"))) {
|
||||||
|
el.className = "toast" + (err ? " err" : "");
|
||||||
try { el.hidePopover(); } catch {}
|
try { el.hidePopover(); } catch {}
|
||||||
el.showPopover();
|
el.showPopover();
|
||||||
|
void el.offsetWidth; // the hidden style is in place before .show changes it
|
||||||
}
|
}
|
||||||
|
el.className = "toast show" + (err ? " err" : "");
|
||||||
clearTimeout(toastTimer);
|
clearTimeout(toastTimer);
|
||||||
toastTimer = setTimeout(() => el.className = "toast" + (err ? " err" : ""), 3500);
|
toastTimer = setTimeout(() => el.className = "toast" + (err ? " err" : ""), 3500);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user