From 73c06b864a41e8e899d7bb5421ddea7f2db90064 Mon Sep 17 00:00:00 2001 From: fen Date: Fri, 18 Sep 2026 09:01:03 -0500 Subject: [PATCH] #296 r2: restore URL column to position 6 and widen to 340px Reverts PR #297's column reorder (owner override): URL returns to position 6 in both list tables (Paste, Type, Size, Views, Created, URL, ID; /mine without Views), data-sort attrs and td cells move back together. Keeps #297's non-position improvements: /mine URL uses the shared .col-url class instead of reusing col-e, and mine's ID column returns to .col-f (100px). Widens .col-url 150px -> 340px so a ~20-char slug displays fully at 1400x900; genuinely long custom slugs keep text ellipsis. No mobile media query needed: <=640px already scrolls the table horizontally (min-width 720px), verified at 375x812. Verified via CDP probe at 1400x900 and 375x812 on /history and /mine: column order, colgroup/header alignment, sort arrow right of label, no other column clipped, no CSP changes (no inline styles added). --- internal/web/static/app.css | 2 +- internal/web/static/history.js | 2 +- internal/web/static/mine.js | 2 +- internal/web/templates/history.html | 4 ++-- internal/web/templates/mine.html | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/web/static/app.css b/internal/web/static/app.css index df77449..1848f1e 100644 --- a/internal/web/static/app.css +++ b/internal/web/static/app.css @@ -896,7 +896,7 @@ button[type="submit"]:focus-visible, .col-f { width: 100px; } .col-g { width: 190px; } /* #255: history's URL column had its own narrow width (col-f doubles as /mine's ID column); give it a dedicated class. */ -.col-url { width: 150px; } +.col-url { width: 340px; } /* #210: /mine rows render a delete button cell that had no declared column, so under table-layout:fixed it overlapped the ID column. */ .col-del { width: 64px; } diff --git a/internal/web/static/history.js b/internal/web/static/history.js index 29fcf52..2ad0f55 100644 --- a/internal/web/static/history.js +++ b/internal/web/static/history.js @@ -9,9 +9,9 @@ const t = PaletteTable.init({ ? `${t.esc(it.title)}${it.is_can ? ' can' : ''}` : `${t.esc(it.id)}${it.is_can ? ' can' : ''}`) + `` + - (it.custom_slug ? `/${t.esc(it.custom_slug)}` : `none`) + `${t.esc(it.type || it.language || 'text')}` + `${t.fmtSize(it.size)}${it.view_count}${t.ago(it.created_at)}` + + (it.custom_slug ? `/${t.esc(it.custom_slug)}` : `none`) + `${t.esc(it.id)}`, emptyFiltered: 'No pastes match your search.', emptyAll: 'No pastes yet. Create the first one.', diff --git a/internal/web/static/mine.js b/internal/web/static/mine.js index 0318e0f..ad1b25e 100644 --- a/internal/web/static/mine.js +++ b/internal/web/static/mine.js @@ -21,9 +21,9 @@ const t = PaletteTable.init({ ? `${t.esc(it.title)}${it.is_can ? ' can' : ''}` : `${t.esc(it.id)}${it.is_can ? ' can' : ''}`) + `` + - (it.custom_slug ? `/${t.esc(it.custom_slug)}` : `none`) + `${t.esc(it.type || it.language || 'text')}` + `${t.fmtSize(it.size)}${t.ago(it.created_at)}` + + (it.custom_slug ? `/${t.esc(it.custom_slug)}` : `none`) + `${t.esc(it.id)}` + ``, emptyFiltered: 'No pastes from this browser match your search.', diff --git a/internal/web/templates/history.html b/internal/web/templates/history.html index d997ac1..2896a62 100644 --- a/internal/web/templates/history.html +++ b/internal/web/templates/history.html @@ -8,14 +8,14 @@
- + - + diff --git a/internal/web/templates/mine.html b/internal/web/templates/mine.html index 35f0429..e20981d 100644 --- a/internal/web/templates/mine.html +++ b/internal/web/templates/mine.html @@ -8,13 +8,13 @@
PasteURL Type Size Views CreatedURL ID
- + - + -- 2.54.0
PasteURL Type Size CreatedURL ID