From d623725289637729a4786fff1041f3fd32d5ccc2 Mon Sep 17 00:00:00 2001 From: Karl Date: Thu, 17 Jul 2025 08:58:37 +0100 Subject: [PATCH] retry pwa --- app.py | 2 -- static/site.webmanifest | 6 ++---- templates/add_account.html | 6 +----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/app.py b/app.py index 6e6aab8..f378348 100644 --- a/app.py +++ b/app.py @@ -168,8 +168,6 @@ def share() -> Response: @app.route("/accounts/add", methods=["GET", "POST"]) def add_account() -> Union[Response, str]: """Handles adding a new user account.""" - if not session.get("logged_in"): - return redirect(url_for("index")) base_url = app.config["BASE_URL"] shared_text = request.args.get('shared_text') diff --git a/static/site.webmanifest b/static/site.webmanifest index 2805a46..edb371f 100644 --- a/static/site.webmanifest +++ b/static/site.webmanifest @@ -19,12 +19,10 @@ "display": "standalone", "theme_color": "#ffffff", "share_target": { - "action": "/share", + "action": "share", "method": "GET", "params": { - "title": "title", - "text": "text", - "url": "url" + "text": "text" } } } \ No newline at end of file diff --git a/templates/add_account.html b/templates/add_account.html index 9043dc7..cdebc96 100644 --- a/templates/add_account.html +++ b/templates/add_account.html @@ -131,15 +131,11 @@ } }); - const sharedTextJson = '{{ shared_text|tojson|safe }}'; - console.log('sharedTextJson:', sharedTextJson); - const sharedText = JSON.parse(sharedTextJson); - console.log('sharedText:', sharedText); + const sharedText = '{{ shared_text|safe }}'; if (sharedText) { const accountDetailsTextarea = document.getElementById('accountDetails'); if (accountDetailsTextarea) { - console.log('Setting accountDetailsTextarea value to:', sharedText); accountDetailsTextarea.value = sharedText; const event = new Event('input', { bubbles: true,