Debug output is available here when needed.+
diff --git a/app/main.py b/app/main.py index 5f0ae45..0157039 100644 --- a/app/main.py +++ b/app/main.py @@ -23,3 +23,8 @@ def health(): @app.get("/", response_class=HTMLResponse) def index(request: Request): return templates.TemplateResponse("index.html", {"request": request}) + + +@app.get("/debug.html", response_class=HTMLResponse) +def debug_page(request: Request): + return templates.TemplateResponse("debug.html", {"request": request}) diff --git a/app/static/app.js b/app/static/app.js index 64ebf68..9fa0adf 100644 --- a/app/static/app.js +++ b/app/static/app.js @@ -39,7 +39,6 @@ fileDownBtn: document.getElementById("fileDownBtn"), fileRemoveBtn: document.getElementById("fileRemoveBtn"), selectedFilesList: document.getElementById("selectedFilesList"), - filenamePreviewBtn: document.getElementById("filenamePreviewBtn"), renameExecuteBtn: document.getElementById("renameExecuteBtn"), fileModal: document.getElementById("fileModal"), fileModalTitle: document.getElementById("fileModalTitle"), @@ -85,7 +84,12 @@ } function out(label, payload) { - el.outputBox.textContent = `${label}\n${JSON.stringify(payload, null, 2)}`; + const text = `${label}\n${JSON.stringify(payload, null, 2)}`; + if (el.outputBox) { + el.outputBox.textContent = text; + return; + } + console.log(text); } function makeBtn(label, handler, secondary) { @@ -478,7 +482,6 @@ el.fileDownBtn.addEventListener("click", () => withHandler(() => reorderSelectedFiles(1), el.fileDownBtn)); el.fileRemoveBtn.addEventListener("click", () => withHandler(removeSelectedFile, el.fileRemoveBtn)); - el.filenamePreviewBtn.addEventListener("click", () => withHandler(async () => out("Filename preview", await api(q("/api/session/filename-preview"))), el.filenamePreviewBtn)); el.renameExecuteBtn.addEventListener("click", () => withHandler(executeRename, el.renameExecuteBtn)); el.closeFileModalBtn.addEventListener("click", closeFileModal); diff --git a/app/static/styles.css b/app/static/styles.css index 4211bed..26967be 100644 --- a/app/static/styles.css +++ b/app/static/styles.css @@ -51,6 +51,18 @@ body { font-size: 16px; } +.panel-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 8px; + margin-bottom: 10px; +} + +.panel-head h2 { + margin: 0; +} + .panel h3 { margin: 10px 0 6px; font-size: 14px; @@ -139,9 +151,10 @@ button.secondary { flex-wrap: wrap; align-items: center; justify-content: flex-end; + min-height: 38px; } -.advanced-row { +.panel-actions { margin-top: 8px; justify-content: flex-end; } @@ -189,8 +202,10 @@ button.secondary { } #panelSelectedEpisodes .panel-footer button:first-child, +#panelSelectedEpisodes .panel-footer button:last-child, +#panelSelectedFiles .panel-footer button:first-child, #panelSelectedFiles .panel-footer button:last-child, -#panelSelectedFiles .advanced-row button:last-child { +#panelSelectedFiles .panel-actions button:last-child { border-color: #0b3a6e; background: #0b3a6e; color: #ffffff; @@ -226,19 +241,8 @@ button.secondary { font-size: 12px; } -.debug-box { - margin: 0 12px 12px; - background: #ffffff; - border: 1px solid #d7dee9; - border-radius: 8px; - padding: 8px; -} - -.debug-box > summary { - cursor: pointer; - user-select: none; - color: #334155; - font-size: 13px; +.debug-page { + margin: 12px; } @media (max-width: 1600px) { diff --git a/app/templates/debug.html b/app/templates/debug.html new file mode 100644 index 0000000..ac885e6 --- /dev/null +++ b/app/templates/debug.html @@ -0,0 +1,17 @@ + + +
+ + +Debug output is available here when needed.+