diff --git a/static/empty.jpg b/static/empty.jpg
deleted file mode 100644
index 2e227ee..0000000
Binary files a/static/empty.jpg and /dev/null differ
diff --git a/static/renderer.js b/static/renderer.js
deleted file mode 100644
index b07f4fa..0000000
--- a/static/renderer.js
+++ /dev/null
@@ -1,34 +0,0 @@
-const ws_url = new URL('ws', window.location.href);
-ws_url.protocol = ws_url.protocol.replace('http', 'ws');
-const ws = new WebSocket(ws_url.href);
-
-ws.onmessage = async function(event) {
- const msg = JSON.parse(event.data);
-
- console.log(msg);
-
- if (msg.hasOwnProperty('view')) {
- view = msg.view;
- console.log(view)
-
- contentdiv = document.getElementById("content")
-
- response = await fetch('../static/views/' + view + '/template.html')
- contentdiv.innerHTML = await response.text();
- console.log('../static/views/' + view + '/template.html'+":")
- console.log(contentdiv.innerHTML)
-
- var tehscript = document.createElement('script');
- tehscript.type = 'text/javascript';
- tehscript.src = '../static/views/' + view + '/script.js';
-
- var tehmsg = document.createElement('text');
- tehmsg.style.display = "none"
- tehmsg.id = "msg"
- tehmsg.innerText = JSON.stringify(msg);
-
- contentdiv.appendChild(tehmsg);
- contentdiv.appendChild(tehscript);
- }
-
-};
diff --git a/static/unmined.leaflet.patched.js b/static/unmined.leaflet.patched.js
deleted file mode 100644
index 5879966..0000000
--- a/static/unmined.leaflet.patched.js
+++ /dev/null
@@ -1,75 +0,0 @@
-function Unmined() {
-
- this.map = function (mapId, options, regions) {
-
- const minMapX = options.minRegionX * 512,
- minMapY = options.minRegionZ * 512,
- mapWidth = (options.maxRegionX + 1 - options.minRegionX) * 512,
- mapHeight = (options.maxRegionZ + 1 - options.minRegionZ) * 512,
- zoomOffset = 0 - options.minZoom,
-
- unminedLayer = new L.TileLayer.Functional(
- function (view) {
- const zoom = view.zoom - zoomOffset,
- zoomFactor = Math.pow(2, zoom),
-
- tileSize = 256,
-
- minTileX = Math.floor(minMapX * zoomFactor / tileSize),
- minTileY = Math.floor(minMapY * zoomFactor / tileSize),
- maxTileX = Math.ceil((minMapX + mapWidth) * zoomFactor / tileSize) - 1,
- maxTileY = Math.ceil((minMapY + mapHeight) * zoomFactor / tileSize) - 1,
-
- tileX = view.tile.column,
- tileY = view.tile.row,
-
- tileBlockSize = tileSize / zoomFactor,
- tileBlockPoint = {
- x: tileX * tileBlockSize,
- z: tileY * tileBlockSize
- };
-
- const intersectsWithTile = function (region) {
- return (tileBlockPoint.x < (region.x + 1) * 512)
- && (tileBlockPoint.x + tileBlockSize > region.x * 512)
- && (tileBlockPoint.z < (region.z + 1) * 512)
- && (tileBlockPoint.z + tileBlockSize > region.z * 512);
- };
-
- if (tileX >= minTileX
- && tileY >= minTileY
- && tileX <= maxTileX
- && tileY <= maxTileY
- && ((regions === undefined) || regions.some(intersectsWithTile))) {
- return ('/static/unmined/tiles/zoom.{z}/{xd}/{yd}/tile.{x}.{y}.' + options.imageFormat)
- .replace('{z}', zoom)
- .replace('{yd}', '' + Math.floor(tileY / 10))
- .replace('{xd}', '' + Math.floor(tileX / 10))
- .replace('{y}', view.tile.row)
- .replace('{x}', view.tile.column);
- } else {
- return "/static/empty.jpg";
- }
- },
- {
- detectRetina: false,
- bounds: [[minMapX, minMapY], [minMapX + mapWidth, minMapY + mapHeight]]
- });
-
- let map = L.map(mapId, {
- crs: L.CRS.Simple,
- minZoom: options.minZoom + zoomOffset,
- maxZoom: options.maxZoom + zoomOffset,
- layers: [unminedLayer],
- maxBoundsViscosity: 1.0
- }).setView([0, 0], options.defaultZoom + zoomOffset);
-
- let northWest = map.unproject([minMapX, minMapY], map.getMaxZoom());
- let southEast = map.unproject([minMapX + mapWidth, minMapY + mapHeight], map.getMaxZoom());
- map.setMaxBounds(new L.LatLngBounds(northWest, southEast));
-
- return map;
-
- }
-
-}
\ No newline at end of file
diff --git a/static/views/lobby/script.js b/static/views/lobby/script.js
deleted file mode 100644
index b647bc5..0000000
--- a/static/views/lobby/script.js
+++ /dev/null
@@ -1,143 +0,0 @@
-var text = document.getElementById("msg").innerText
-msg = JSON.parse(text)
-
-if (msg.hasOwnProperty('username')) {
- document.getElementById('label-username').innerText = msg.username;
- }
-
- // username management
- document.getElementById("btn-edit-username").onclick = async function (e) {
- document.getElementById("btn-confirm-username").style.display = "inline-block";
- document.getElementById("btn-discard-username").style.display = "inline-block";
- document.getElementById("btn-edit-username").style.display = "none";
- document.getElementById("label-username").style.display = "none";
- document.getElementById("input-set-username").style.display = "inline-block";
- document.getElementById("input-set-username").value = document.getElementById("label-username").innerText;
- }
- document.getElementById("btn-discard-username").onclick = async function (e) {
- document.getElementById("btn-confirm-username").style.display = "none";
- document.getElementById("btn-discard-username").style.display = "none";
- document.getElementById("btn-edit-username").style.display = "inline-block";
- document.getElementById("label-username").style.display = "inline-block";
- document.getElementById("input-set-username").style.display = "none";
- }
- document.getElementById("btn-confirm-username").onclick = async function (e) {
- var text = document.getElementById("input-set-username").value;
- if (Boolean(text)) {
- let data = {"username": text};
-
- await fetch('api/change_username', {
- method: 'POST',
- body: JSON.stringify(data),
- })
- document.getElementById("btn-confirm-username").style.display = "none";
- document.getElementById("btn-discard-username").style.display = "none";
- document.getElementById("btn-edit-username").style.display = "inline-block";
- document.getElementById("label-username").style.display = "inline-block";
- document.getElementById("input-set-username").style.display = "none";
- } else {
- console.log("cant be empty");
- document.getElementById("btn-confirm-username").style.display = "none";
- document.getElementById("btn-discard-username").style.display = "none";
- document.getElementById("btn-edit-username").style.display = "inline-block";
- document.getElementById("label-username").style.display = "inline-block";
- document.getElementById("input-set-username").style.display = "none";
- }
- }
-
-
-
- document.getElementById("btn-create-session").onclick = async function (e) {
- var text = document.getElementById("input-create-session").value;
- if (Boolean(text)) {
- let data = {"sessionname": text};
-
- await fetch('api/create_session', {
- method: 'POST',
- body: JSON.stringify(data),
- })
- }
- };
-
- if (msg.hasOwnProperty('sessions')) {
- const sessions = document.getElementById('sessions');
-
- while (sessions.children.length) sessions.lastChild.remove();
-
- Object.keys(msg.sessions).forEach( session => {
- session = msg.sessions[session];
- var sessionid = session["id"];
- var sessionname = session["name"];
- var owned = session["owned"];
-
- const tehsession = document.createElement('div');
- const labelname = document.createElement('span');
- labelname.innerText = sessionname;
-
- tehsession.appendChild(labelname);
-
- if (owned) {
- const inputname = document.createElement('input');
- inputname.style.display = "none";
- const btnedit = document.createElement('button');
- btnedit.innerText = '🖉'
- const btnconfirm = document.createElement('button');
- btnconfirm.innerText = '✔'
- btnconfirm.style.display = "none"
- const btndiscard = document.createElement('button');
- btndiscard.innerText = '✘'
- btndiscard.style.display = "none"
-
- btnedit.onclick = async function (e) {
- inputname.style.display = "inline-block";
- inputname.value = sessionname;
- btnedit.style.display = "none";
- btnconfirm.style.display = "inline-block";
- btndiscard.style.display = "inline-block";
- labelname.style.display = "none";
- }
- btndiscard.onclick = async function (e) {
- inputname.style.display = "none";
- btnedit.style.display = "inline-block";
- btnconfirm.style.display = "none";
- btndiscard.style.display = "none";
- labelname.style.display = "inline-block";
- }
- btnconfirm.onclick = async function (e) {
- text = inputname.value;
- if (Boolean(text)) {
- let data = {"sessionid": sessionid, "sessionname": text};
- await fetch('api/change_sessionname', {
- method: 'POST',
- body: JSON.stringify(data),
- });
- inputname.style.display = "none";
- btnedit.style.display = "inline-block";
- btnconfirm.style.display = "none";
- btndiscard.style.display = "none";
- labelname.style.display = "inline-block";
- } else {
- console.log("cant be empty");
- }
- }
-
- tehsession.appendChild(inputname);
- tehsession.appendChild(btnedit);
- tehsession.appendChild(btnconfirm);
- tehsession.appendChild(btndiscard);
- }
-
- if ((! msg.hasOwnProperty('session')) || msg.session["id"] != sessionid) {
- const btnjoin = document.createElement('button');
- btnjoin.innerText = "Join";
- btnjoin.onclick = async (e) => await fetch('api/join_session', {
- method: 'POST', body: JSON.stringify({"sessionid": sessionid})
- });
-
- tehsession.appendChild(btnjoin);
- }
-
- sessions.appendChild(tehsession);
- })
- }
-
diff --git a/static/views/lobby/template.html b/static/views/lobby/template.html
deleted file mode 100644
index c0ee059..0000000
--- a/static/views/lobby/template.html
+++ /dev/null
@@ -1,21 +0,0 @@
-
-