Browse Source

Bugfixes

tags/1.0.0
Leonie 5 months ago
parent
commit
c820b5283e
6 changed files with 32 additions and 4 deletions
  1. +0
    -1
      app/www/app.html
  2. +15
    -0
      app/www/app.js
  3. +1
    -0
      app/www/welcome.js
  4. +10
    -0
      backend.py
  5. +6
    -3
      nordcast_logo.svg
  6. BIN
      nordcast_logo.svg.png

+ 0
- 1
app/www/app.html View File

@@ -8,7 +8,6 @@
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="color-thief.js"></script>
<script src="primarycolor.js"></script>
<script src="getfeed.js"></script>
<script src="https://unpkg.com/[email protected]/dist/ionicons.js"></script>

+ 15
- 0
app/www/app.js View File

@@ -12,6 +12,21 @@ $(document).ready(function() {
$("#view__main").show();
$("#nav").show();
}, 2000);
window.setInterval(function() {
$.get(backend+"/api/v1/login2/"+localStorage.getItem("username")+"/"+localStorage.getItem("uuid"), function(data) {
if (data["login"] !== "ok" && data["uuid"] !== localStorage.getItem("uuid")) {
localStorage.clear();
window.setTimeout(function() {
location.href = "index.html";
}, 200);
}
}).error(function() {
localStorage.clear();
window.setTimeout(function() {
location.href = "index.html";
}, 200);
});
}, 1000);
$("#logout").click(function() {
localStorage.clear()
window.setTimeout(function() {

+ 1
- 0
app/www/welcome.js View File

@@ -18,6 +18,7 @@ $(document).ready(function() {
$.post(backend+"/api/v1/login", {username: $("#username").val(), password: $("#password").val()}, function(data) {
if (data["login"] === "ok") {
localStorage.setItem("uuid", data["uuid"]);
localStorage.setItem("username", $("#username").val());
window.setTimeout(function() {
location.href = "app.html";
}, 200)

+ 10
- 0
backend.py View File

@@ -46,4 +46,14 @@ def login():
else:
return "{\"login\": \"error\"}"

@get("/api/v1/login2/<username>/<uuid>")
def login2(username, uuid):
response.headers['Access-Control-Allow-Origin'] = '*'
response.content_type = "application/json"
suid = str(r.get("nordcast/uuids/" + username)).replace("b'", "").replace("'", "")
if suid == uuid:
return json.dumps({"login": "ok", "uuid": uuid})
else:
return "{\"login\": \"error\"}"

run(server="tornado",port=9000,host="0.0.0.0")

+ 6
- 3
nordcast_logo.svg View File

@@ -14,7 +14,10 @@
sodipodi:version="0.32"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
sodipodi:docname="nordcast_logo.svg"
version="1.1">
version="1.1"
inkscape:export-filename="/home/koyu/nordcast/nordcast_logo.svg.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<head>
<style
id="dark-reader-style">@media screen {
@@ -94,7 +97,7 @@ html {
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:title />
</cc:Work>
</rdf:RDF>
</svg:metadata>
@@ -111,7 +114,7 @@ html {
pagecolor="#ffffff"
id="base"
inkscape:zoom="0.49866667"
inkscape:cx="174.69867"
inkscape:cx="-455.98314"
inkscape:cy="565.18164"
inkscape:window-x="1328"
inkscape:window-y="107"

BIN
nordcast_logo.svg.png View File

Before After
Width: 1000  |  Height: 1000  |  Size: 21KB

Loading…
Cancel
Save