From ba195f80f6910e341e3798d5c0a1519740c61f04 Mon Sep 17 00:00:00 2001
From: Xavier2023390 <90261449+Xavier2023390@users.noreply.github.com>
Date: Fri, 7 Oct 2022 13:24:31 -0400
Subject: [PATCH 1/5] API/Websockets UNFINISHED
---
formapp/app.py | 6 ++++++
formapp/templates/chat.html | 9 +++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/formapp/app.py b/formapp/app.py
index 677f116d..bfd54f15 100644
--- a/formapp/app.py
+++ b/formapp/app.py
@@ -3007,6 +3007,12 @@ def ttt(message):
except Exception as e:
print("[error] " + 'Error: ' + str(e))
+@socket_.on('chat', namespace=chatnamespace)
+def sound():
+ try:
+ print('work')
+ except Exception as e:
+ print("[error] " + 'Error: ' + str(e))
# ███████ ██ ███ ██ █████ ██ ██████ ██████ ██████ ████████
# ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
diff --git a/formapp/templates/chat.html b/formapp/templates/chat.html
index dab74658..10c6e4ed 100644
--- a/formapp/templates/chat.html
+++ b/formapp/templates/chat.html
@@ -509,9 +509,14 @@
Online
// args = text.split(" ");
// args.shift();
chatSocket.emit("help", packMSG(receiver, username, text));
- } else {
+ } else if (text.startsWith("!#sound")) {
+ // text.splice(0, 2);
+ // args = text.split(" ");
+ // args.shift();
+ chatSocket.emit("sound", packMSG(receiver, username, { command: 'bgm', file: 'rickroll.mp3'}));}
+ else {
chatSocket.emit("message", packMSG(receiver, username, text));
- }
+ }
boxes.inputBox.value = "";
boxes.inputBox.focus();
}
From 74e85cff14f083ab6059b00742fb076d376d3970 Mon Sep 17 00:00:00 2001
From: Xavier2023390 <90261449+Xavier2023390@users.noreply.github.com>
Date: Fri, 14 Oct 2022 14:48:36 -0400
Subject: [PATCH 2/5] started with #268
I created a basis for how the tags will be created and where they will be stored, but I did not get as far as I would've liked
---
formapp/app.py | 1 +
formapp/data/database_template.db | Bin 106496 -> 106496 bytes
formapp/templates/controlpanel.html | 12 ++++++++++++
formapp/templates/users.html | 7 +++++++
4 files changed, 20 insertions(+)
diff --git a/formapp/app.py b/formapp/app.py
index bfd54f15..ea06f301 100644
--- a/formapp/app.py
+++ b/formapp/app.py
@@ -141,6 +141,7 @@
sD.settings['perms']['sfx'] = data[3]
sD.settings['perms']['bgm'] = data[4]
sD.settings['perms']['api'] = data[5]
+sD.settings['perms']['tags'] = data[9]
sD.settings['locked'] = data[6]
sD.settings['blind'] = data[7]
sD.settings['showinc'] = data[8]
diff --git a/formapp/data/database_template.db b/formapp/data/database_template.db
index cae4ee42b09ea6ee71e48dc34471521461837a30..a7d287ceb8cb7e479f17e42ab5637da114ccc3c2 100644
GIT binary patch
delta 132
zcmZoTz}9epZGyC*E&~ID6cEEe=0qK19$f}K|5{$wFa}A+_=(v@Kw{xRuEx3$c5zu*
z#%BM?wTzEMbQF|I64L`xi*k#VI6eJBT-{xRn&X+a$1^c5?`8YI!2f~&>1IKJJNyzn
VP_y|MxfvNbI5>cqlY@zg82}4o9Z>)P
delta 113
zcmZoTz}9epZGyC*76Su=6cEEe#zY-s9xVnv|5{$wFa}A+;)&TtjKz}$1upUd`5zmz
zLfFM+Wf_~*CucG~YK~{x9?!(MyqE1G1OG?<7n=nI?(>WCfX(7%API
The ability to access data from the server
+
+
Tags
+
+
+ The ability to assign user tags
+
+
diff --git a/formapp/templates/users.html b/formapp/templates/users.html
index d9980d09..672ce2eb 100644
--- a/formapp/templates/users.html
+++ b/formapp/templates/users.html
@@ -68,6 +68,7 @@ User accounts
let users = "{{ users }}".replaceAll("'", "'").replaceAll("(", "[").replaceAll(")", "]").replaceAll("b'", "'").replaceAll("None", null);
users = eval(users);
let permNames = ['Teacher', 'Mod', 'Student', 'Guest'];
+ let tagNames = ['12th/Senior', '11th/Junior'];
let usersBox = document.getElementById("users");
usersBox.innerHTML = "";
@@ -87,6 +88,12 @@ User accounts
`;
+ let userTags = user[3];
+ newDetails.innerHTML += `
+