From 99ff706a124c1edbeaaff456a0155587ae76408f Mon Sep 17 00:00:00 2001 From: tebarius Date: Mon, 6 Nov 2023 19:41:27 +0100 Subject: [PATCH] wifi geht --- .idea/workspace.xml | 65 +++++++++++++++++++++++++++------------- app/Flask-QR.py | 19 ++++++++---- app/static/style.css | 13 ++++++++ app/templates/cal.html | 2 +- app/templates/index.html | 2 +- app/templates/wifi.html | 16 +++++++--- 6 files changed, 85 insertions(+), 32 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7e2bba4..b1d5751 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,22 +5,12 @@ - - - - - - - - - - - - + + - + + + { + "lastFilter": { + "state": "OPEN", + "assignee": "tebarius" + } +} + + + @@ -59,7 +68,7 @@ "SHARE_PROJECT_CONFIGURATION_FILES": "true", "ignore.virus.scanning.warn.message": "true", "last_opened_file_path": "D:/mager/Documents/IntelliJ/Docker-Flask-QR/app/templates", - "project.structure.last.edited": "SDKs", + "project.structure.last.edited": "Global Libraries", "project.structure.proportion": "0.15", "project.structure.side.proportion": "0.2", "settings.editor.selected.configurable": "preferences.lookFeel" @@ -85,11 +94,6 @@ - - - - - @@ -100,6 +104,15 @@ @@ -107,7 +120,19 @@ - + + + diff --git a/app/Flask-QR.py b/app/Flask-QR.py index 6b0e97e..0406769 100644 --- a/app/Flask-QR.py +++ b/app/Flask-QR.py @@ -55,7 +55,7 @@ def cal(): @app.route("/qr.html") def makeqr(): - data = "" + data = "Sorry kein Inhalt!!!" if request.args.get('type') == "text": data = request.args.get('text') @@ -72,8 +72,18 @@ def makeqr(): pass elif request.args.get('type') == "wifi": - pass - + passw = (request.args.get("passw").replace("\\", "\\\\").replace(";", "\\;") + .replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\"")) + ssid = (request.args.get("ssid").replace("\\", "\\\\").replace(";", "\\;") + .replace(",", "\\,").replace(":", "\\:").replace("\"", "\\\"")) + if request.args.get("auth") == "WPA": + data = f'WIFI:T:WPA;S:"{ssid}";P:"{passw}"' + else: + data = f'WIFI:T:nopass;S:"{ssid}"' + if request.args.get("hidden"): + data += "H:true;;" + else: + data += ";" elif request.args.get('type') == "cal": # Format für Calendar (Zeilenumbrüche beachten!!): # BEGIN:VEVENT @@ -124,9 +134,6 @@ def makeqr(): else: data += "?" data += f"body={request.args.get('body')}" - - else: - data = "Sorry kein Inhalt!!!" return render_template('qr.html', data=data) diff --git a/app/static/style.css b/app/static/style.css index 2447cc2..34c11b1 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -26,3 +26,16 @@ border-radius: 50px; filter: drop-shadow(10px 10px 10px blue); } + input[type='radio'] + { + transform: scale(4); + margin: 10px; + vertical-align:12px; + } + input[type='checkbox'] + { + transform: scale(4); + margin: 10px; + vertical-align:12px; + } + diff --git a/app/templates/cal.html b/app/templates/cal.html index 0ac21d2..5b40cdc 100644 --- a/app/templates/cal.html +++ b/app/templates/cal.html @@ -2,7 +2,7 @@ {% block inhalt %}
-
+
diff --git a/app/templates/index.html b/app/templates/index.html index 65d5f3c..c3f86b5 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -9,6 +9,6 @@ - + < {% endblock %} diff --git a/app/templates/wifi.html b/app/templates/wifi.html index 06e84af..2801950 100644 --- a/app/templates/wifi.html +++ b/app/templates/wifi.html @@ -2,13 +2,21 @@ {% block inhalt %} -
+
- +
- - + +
+ +
+ WPA/WPA2/WPA3
+ keine Verschlüsselung