From bd1f4113126c87376c4929c234b4c35bd4daed88 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Thu, 24 Jun 2021 01:23:35 +0100 Subject: [PATCH] Added comment to queue --- .../copilot/templates/copilot/compose.html | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lnbits/extensions/copilot/templates/copilot/compose.html b/lnbits/extensions/copilot/templates/copilot/compose.html index ea87089e9..c34e396a5 100644 --- a/lnbits/extensions/copilot/templates/copilot/compose.html +++ b/lnbits/extensions/copilot/templates/copilot/compose.html @@ -138,6 +138,9 @@ pushAnim(content) { document.getElementById('animations').style.width = content[0] document.getElementById('animations').src = content[1] + if (content[1] != 'none') { + self.showNotif(content[1]) + } setTimeout(function () { document.getElementById('animations').src = '' }, 5000) @@ -259,22 +262,22 @@ console.log(e.data) res = e.data.split('-') if (res[0] == 'rocket') { - addTask(['40%', '/copilot/static/rocket.gif']) + addTask(['40%', '/copilot/static/rocket.gif', res[1]]) } if (res[0] == 'face') { - addTask(['35%', '/copilot/static/face.gif']) + addTask(['35%', '/copilot/static/face.gif', res[1]]) } if (res[0] == 'bitcoin') { - addTask(['30%', '/copilot/static/bitcoin.gif']) + addTask(['30%', '/copilot/static/bitcoin.gif', res[1]]) } if (res[0] == 'confetti') { - addTask(['100%', '/copilot/static/confetti.gif']) + addTask(['100%', '/copilot/static/confetti.gif', res[1]]) } if (res[0] == 'martijn') { - addTask(['40%', '/copilot/static/martijn.gif']) + addTask(['40%', '/copilot/static/martijn.gif', res[1]]) } if (res[0] == 'rick') { - addTask(['40%', '/copilot/static/rick.gif']) + addTask(['40%', '/copilot/static/rick.gif', res[1]]) } if (res[0] == 'true') { document.getElementById('videoCamera').style.width = '20%' @@ -284,10 +287,6 @@ document.getElementById('videoCamera').style.width = '100%' document.getElementById('videoScreen').src = null } - console.log(res[1]) - if (res[1] != 'none') { - self.showNotif(res[1]) - } } this.connection.onopen = () => this.launch }