fix: correct Alpine scope for notes panel, tojson escaping, remove dead code

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 16:11:41 +02:00
parent e4e4de319d
commit c9c1a50103
3 changed files with 4 additions and 5 deletions
@@ -4,6 +4,7 @@ from app.state import load_state
bp = Blueprint("albums", __name__) bp = Blueprint("albums", __name__)
# TODO(task-6): replace this stub with the real triage route
@bp.get("/triage") @bp.get("/triage")
def triage(): def triage():
album_id = request.args.get("album_id", "") album_id = request.args.get("album_id", "")
@@ -3,8 +3,6 @@ from app.state import load_state, save_state
bp = Blueprint("notes", __name__) bp = Blueprint("notes", __name__)
PHASE_ORDER = ["triage", "curate", "group", "write", "export"]
@bp.post("/notes/save") @bp.post("/notes/save")
def save_notes(): def save_notes():
@@ -7,7 +7,7 @@
<script src="https://cdn.tailwindcss.com"></script> <script src="https://cdn.tailwindcss.com"></script>
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script> <script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3/dist/cdn.min.js"></script>
</head> </head>
<body class="min-h-screen bg-base-200"> <body class="min-h-screen bg-base-200" x-data="notesApp({{ notes_content | tojson }}, '{{ album_id }}')">
<!-- Navbar --> <!-- Navbar -->
<div class="navbar bg-base-100 shadow-sm sticky top-0 z-40"> <div class="navbar bg-base-100 shadow-sm sticky top-0 z-40">
@@ -27,7 +27,7 @@
</div> </div>
<div class="navbar-end px-4"> <div class="navbar-end px-4">
{% if album_id %} {% if album_id %}
<button class="btn btn-ghost btn-sm" @click="open = !open" x-data>📝 Notes</button> <button class="btn btn-ghost btn-sm" @click="open = !open">📝 Notes</button>
{% endif %} {% endif %}
</div> </div>
</div> </div>
@@ -45,7 +45,7 @@
{% endif %} {% endif %}
<!-- Body with notes drawer --> <!-- Body with notes drawer -->
<div class="flex relative" x-data="notesApp('{{ notes_content | e }}', '{{ album_id }}')"> <div class="flex relative">
<div class="flex-1 min-w-0 transition-all" :class="open ? 'mr-80' : ''"> <div class="flex-1 min-w-0 transition-all" :class="open ? 'mr-80' : ''">
{% block content %}{% endblock %} {% block content %}{% endblock %}
</div> </div>