From a2b0ba77efbc247593bb6fa223c9a9d600f0a56c Mon Sep 17 00:00:00 2001
From: reverend <reverend@reverend2048.de>
Date: Tue, 30 Apr 2019 09:32:28 +0200
Subject: [PATCH] ~new frontend, javascript client

---
 src/templates/frontend/frontend.js | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/templates/frontend/frontend.js b/src/templates/frontend/frontend.js
index 7f5e937..f5eae27 100644
--- a/src/templates/frontend/frontend.js
+++ b/src/templates/frontend/frontend.js
@@ -1,12 +1,8 @@
 class Team{
-    constructor (name="", logo_path="", side){
-        this.name = name;
-        this.logo_path = logo_path;
-        this.errors = 0;
-        this.points = 0;
+    constructor (side){
+        this.name = "";
+        this.logo_path = "";
 
-        this.points_element = document.getElementById("points_" + side);
-        this.errors_element = document.getElementById("fails_" + side);
         this.name_element = document.getElementById("team_" + side);
         this.logo_element = document.getElementById("logo_" + side);
     }
@@ -19,7 +15,7 @@ class Team{
         }
         this.errors_element.innerHTML = fails_string;
         this.name_element.innerHTML = this.name;
-
+        this.logo_element.src = "../../static/"
     }
 
     parse_from_json(json){
@@ -65,6 +61,9 @@ class Round{
         this.question = null;
         this.error_right = 0;
         this.error_left = 0;
+
+        this.points_element = document.getElementById("points_" + side);
+        this.errors_element = document.getElementById("fails_" + side);
     }
 }
 
-- 
GitLab