From 4b48a76bd5a5c4fb63e86d8eda7bea42d0d3abbb Mon Sep 17 00:00:00 2001 From: Ruben Fischer Date: Tue, 14 Apr 2026 08:44:11 +0200 Subject: [PATCH] removed status site and tried to fix microphone use --- src/web/app.py | 2 +- src/web/templates/base.html | 4 - src/web/templates/status.html.old | 155 ----------------------------- src/web/templates/user/base.html | 4 - src/web/templates/user/status.html | 148 --------------------------- src/web/user/routes.py | 31 ------ 6 files changed, 1 insertion(+), 343 deletions(-) delete mode 100644 src/web/templates/status.html.old delete mode 100644 src/web/templates/user/status.html diff --git a/src/web/app.py b/src/web/app.py index 83105e0..cf1601a 100644 --- a/src/web/app.py +++ b/src/web/app.py @@ -85,7 +85,7 @@ class SecurityHeadersMiddleware(BaseHTTPMiddleware): h["X-Content-Type-Options"] = "nosniff" h["X-XSS-Protection"] = "1; mode=block" h["Referrer-Policy"] = "strict-origin-when-cross-origin" - h["Permissions-Policy"] = "camera=(), microphone=(), geolocation=()" + h["Permissions-Policy"] = "camera=(), microphone=(self), geolocation=()" h["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains" h["Content-Security-Policy"] = self._CSP return response diff --git a/src/web/templates/base.html b/src/web/templates/base.html index 7a47c82..2cbc65f 100644 --- a/src/web/templates/base.html +++ b/src/web/templates/base.html @@ -61,10 +61,6 @@ Post-Typen - - - Status -
diff --git a/src/web/templates/status.html.old b/src/web/templates/status.html.old deleted file mode 100644 index 0471d51..0000000 --- a/src/web/templates/status.html.old +++ /dev/null @@ -1,155 +0,0 @@ -{% extends "base.html" %} -{% block title %}Status - LinkedIn Posts{% endblock %} - -{% block content %} -
-

Status

-

Übersicht über alle Kunden und deren Setup-Status

-
- -{% if error %} -
- Error: {{ error }} -
-{% endif %} - -{% if customer_statuses %} -
- {% for item in customer_statuses %} -
- -
-
-
-
- {% if item.profile_picture %} - {{ item.customer.name }} - {% else %} - {{ item.customer.name[0] | upper }} - {% endif %} -
-
-

{{ item.customer.name }}

-

{{ item.customer.company_name or 'Kein Unternehmen' }}

-
-
-
- {% if item.status.ready_for_posts %} - - - Bereit für Posts - - {% else %} - - - Setup unvollständig - - {% endif %} -
-
-
- - -
-
- -
-
- {% if item.status.has_scraped_posts %} - - {% else %} - - {% endif %} - Scraped Posts -
-

{{ item.status.scraped_posts_count }}

-
- - -
-
- {% if item.status.has_profile_analysis %} - - {% else %} - - {% endif %} - Profil Analyse -
-

{{ 'Vorhanden' if item.status.has_profile_analysis else 'Fehlt' }}

-
- - -
-
- {% if item.status.research_count > 0 %} - - {% else %} - - {% endif %} - Research Topics -
-

{{ item.status.research_count }}

-
- - -
-
- - Generierte Posts -
-

{{ item.status.posts_count }}

-
-
- - - {% if item.status.missing_items %} -
-

- - Fehlende Elemente -

-
    - {% for item_missing in item.status.missing_items %} -
  • - - {{ item_missing }} -
  • - {% endfor %} -
-
- {% endif %} - - -
- {% if not item.status.has_profile_analysis %} - - Setup wiederholen - - {% endif %} - {% if item.status.research_count == 0 %} - - Recherche starten - - {% endif %} - {% if item.status.ready_for_posts %} - - Post erstellen - - {% endif %} -
-
-
- {% endfor %} -
-{% else %} -
- -

Noch keine Kunden

-

Erstelle deinen ersten Kunden, um den Status zu sehen.

- - - Neuer Kunde - -
-{% endif %} -{% endblock %} diff --git a/src/web/templates/user/base.html b/src/web/templates/user/base.html index e3d242c..ac2cea2 100644 --- a/src/web/templates/user/base.html +++ b/src/web/templates/user/base.html @@ -138,10 +138,6 @@ Post-Typen - - - Status - Mein Kalender diff --git a/src/web/templates/user/status.html b/src/web/templates/user/status.html deleted file mode 100644 index b44a9d2..0000000 --- a/src/web/templates/user/status.html +++ /dev/null @@ -1,148 +0,0 @@ -{% extends "base.html" %} -{% block title %}Status - LinkedIn Posts{% endblock %} - -{% block content %} -
-

Status

-

Übersicht über deinen Setup-Status

-
- -{% if error %} -
- Error: {{ error }} -
-{% endif %} - -{% if status %} -
-{% else %} -
- -

Status nicht verfügbar

-

Es konnte kein Status geladen werden.

-
-{% endif %} -{% endblock %} diff --git a/src/web/user/routes.py b/src/web/user/routes.py index 6ad7ff4..ff6593f 100644 --- a/src/web/user/routes.py +++ b/src/web/user/routes.py @@ -2041,37 +2041,6 @@ async def chat_create_page(request: Request): }) -@user_router.get("/status", response_class=HTMLResponse) -async def status_page(request: Request): - """User's status page.""" - session = require_user_session(request) - if not session: - return RedirectResponse(url="/login", status_code=302) - - try: - user_id = UUID(session.user_id) - profile = await db.get_profile(user_id) - status = await orchestrator.get_user_status(user_id) - profile_picture = await get_user_avatar(session, user_id) - - return templates.TemplateResponse("status.html", { - "request": request, - "page": "status", - "session": session, - "profile": profile, - "status": status, - "profile_picture": profile_picture - }) - except Exception as e: - logger.error(f"Error loading status: {e}") - return templates.TemplateResponse("status.html", { - "request": request, - "page": "status", - "session": session, - "error": str(e) - }) - - # ==================== API ENDPOINTS ==================== @user_router.get("/api/post-types")