commit 8390c979f9dfd04b5589a694776c119ae444040b
parent d598b78207c195c38324332de7cfeeb69500aa30
Author: Friedel Schön <[email protected]>
Date: Tue, 28 Jun 2022 16:04:24 +0200
final merge
Diffstat:
3 files changed, 52 insertions(+), 44 deletions(-)
diff --git a/client/client.ino b/client/client.ino
@@ -34,11 +34,16 @@ void setup() {
}
bool save = false;
- if (client.response.hasOwnProperty("token"))
+ if (client.response.hasOwnProperty("token")) {
strcpy(config.token, (const char*) client.response["token"]), save = true;
+ json req;
+ req["token"] = config.token;
+ client.remote("set-token", req);
+ }
if (client.response.hasOwnProperty("domain"))
strcpy(config.domain, (const char*) client.response["domain"]), save = true;
+
if (save)
config.save();
diff --git a/server/site.db b/server/site.db
Binary files differ.
diff --git a/server/templates/layout.html b/server/templates/layout.html
@@ -20,10 +20,10 @@
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='main.css') }}">
- <!-- Bootstrap CSS-->
- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
- <link rel="stylesheet" href="style.css" />
- <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" />
+ <!-- Bootstrap CSS-->
+ <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
+ <link rel="stylesheet" href="style.css" />
+ <link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" />
<!-- Google Font: Source Sans Pro, Source Code Pro -->
<link rel="preconnect" href="https://fonts.googleapis.com">
@@ -66,44 +66,46 @@
</head>
<body>
- <div class="sidebar" id="side_nav">
- <div class="header-box px-2 pt-3 pb-4">
- <h1 class="fs-4"><span class="bg-white text-dark rounded shadow px-2 me-2">B</span> <span
- class="text-white">BENNI</span></h1>
- </div>
-
-<<<<<<< HEAD
-<<<<<<< HEAD
<div class="main-container d-flex">
<div class="sidebar" id="side_nav">
- <div class="header-box px-2 pt-3 pb-4">
- <h1 class="fs-4"><span class="bg-white text-dark rounded shadow px-2 me-2"><img src="logo.png" alt="logo"></span> <span class="text-white">BENNI</span></h1>
-
- </div>
-
- <ul class="list-unstyled px-2">
- <li class=""><a href="#" class="text-decoration-none px-3 py-2 d-block"><i class="fas fa-home"></i> Home</a></li>
- {% if current_user.is_authenticated %}
- <li class=""><a href="{{ url_for('traps') }}" class="text-decoration-none px-3 py-2 d-block"><i class="far fa-tachometer-alt"></i> Dashboard</a></li>
- <li class=""><a href="{{ url_for('trap_connect') }}" class="text-decoration-none px-3 py-2 d-block"><i class="far fa-plug"></i> Koppel een val</a></li>
- <li class=""><a href="{{ url_for('contact') }}" class="text-decoration-none px-3 py-2 d-block"><i class="far fa-address-book"></i> Contact opnemen</a></li>
- {% endif %}
-
-
- <li class=""><a href="{{ url_for('about') }}" class="text-decoration-none px-3 py-2 d-block"><i class="far fa-map-marker-question"></i> Over ons</a></li>
-
- </ul>
- <hr class="h-color mx-2">
-
- <ul class="list-unstyled px-2">
- {% if current_user.is_authenticated %}
-
- <li class=""><a href="{{ url_for('logout') }}" class="text-decoration-none px-3 py-2 d-block"><i class="fas fa-sign-out"></i> Uitloggen</a></li>
- {% else %}
- <li class=""><a href="{{ url_for('login') }}" class="text-decoration-none px-3 py-2 d-block"><i class="fas fa-sign-out"></i>Inloggen</a></li>
- <li class=""><a href="{{ url_for('register') }}" class="text-decoration-none px-3 py-2 d-block"><i class="far fa-user"></i> Registreren</a></li>
- {% endif %}
-=======
+ <div class="header-box px-2 pt-3 pb-4">
+ <img width="250" src="{{ url_for('static', filename='logo_pics/transparantlogo.png') }}" alt="logo">
+
+ </div>
+ <ul class="list-unstyled px-2">
+ <li><a href="#" class="text-decoration-none px-3 py-2 d-block text-white"><i class="fas fa-home"></i>
+ Home</a></li>
+ {% if current_user.is_authenticated %}
+ <li><a href="{{ url_for('traps') }}" class="text-decoration-none px-3 py-2 d-block text-white"><i
+ class="far fa-tachometer-alt"></i> Dashboard</a></li>
+ <li><a href="#" class="text-decoration-none px-3 py-2 d-block text-white"><i class="far fa-plug"></i>
+ Koppel een
+ val</a></li>
+ <li><a href="{{ url_for('contact') }}" class="text-decoration-none px-3 py-2 d-block text-white"><i
+ class="far fa-address-book"></i> Contact opnemen</a></li>
+ {% endif %}
+
+ <li><a href="#" class="text-decoration-none px-3 py-2 d-block text-white"><i
+ class="far fa-map-marker-question"></i> Over ons</a></li>
+
+ </ul>
+ <hr class="h-color mx-2">
+
+ <ul class="list-unstyled px-2">
+ {% if current_user.is_authenticated %}
+
+ <li class=""><a href="{{ url_for('logout') }}"
+ class="text-decoration-none px-3 py-2 d-block text-white"><i class="fas fa-sign-out"></i>
+ Uitloggen</a></li>
+ {% else %}
+ <li class=""><a href="{{ url_for('login') }}"
+ class="text-decoration-none px-3 py-2 d-block text-white"><i
+ class="fas fa-sign-out"></i>Inloggen</a></li>
+ <li class=""><a href="{{ url_for('register') }}"
+ class="text-decoration-none px-3 py-2 d-block text-white"><i class="far fa-user"></i>
+ Registreren</a></li>
+ {% endif %}
+ <!--=======
=======
>>>>>>> cdc54f9efef31c60b062d347b41fb859b414092e
<ul class="list-unstyled px-2">
@@ -137,9 +139,10 @@
<<<<<<< HEAD
>>>>>>> cdc54f9efef31c60b062d347b41fb859b414092e
=======
->>>>>>> cdc54f9efef31c60b062d347b41fb859b414092e
- </ul>
- <hr class="h-color mx-2">
+>>>>>>> cdc54f9efef31c60b062d347b41fb859b414092e-->
+ </ul>
+ <hr class="h-color mx-2">
+ </div>
</div>
<div class="content">
{% for category, message in get_flashed_messages(with_categories=true) %}