This commit is contained in:
Ben Arc 2021-06-24 01:26:49 +01:00
parent bd1f411312
commit 9becfa0bad
4 changed files with 11 additions and 6 deletions

View file

@ -75,6 +75,7 @@ async def on_invoice_paid(payment: Payment) -> None:
else:
await updater(copilot.id, data, "none")
async def mark_webhook_sent(payment: Payment, status: int) -> None:
payment.extra["wh_status"] = status

View file

@ -138,8 +138,8 @@
pushAnim(content) {
document.getElementById('animations').style.width = content[0]
document.getElementById('animations').src = content[1]
if (content[1] != 'none') {
self.showNotif(content[1])
if (content[2] != 'none') {
self.showNotif(content[2])
}
setTimeout(function () {
document.getElementById('animations').src = ''

View file

@ -11,12 +11,14 @@ import trio
import shortuuid
from . import copilot_ext
@copilot_ext.route("/")
@validate_uuids(["usr"], required=True)
@check_user_exists()
async def index():
return await render_template("copilot/index.html", user=g.user)
@copilot_ext.route("/cp/")
async def compose():
return await render_template("copilot/compose.html")
@ -34,6 +36,7 @@ async def panel():
connected_websockets = defaultdict(set)
@copilot_ext.websocket("/ws/<id>/")
async def wss(id):
copilot = await get_copilot(id)
@ -50,6 +53,7 @@ async def wss(id):
finally:
connected_websockets[id].remove(send_channel)
async def updater(copilot_id, data, comment):
copilot = await get_copilot(copilot_id)
if not copilot: