fixed uploads table

This commit is contained in:
Ludwig Lehnert
2026-01-29 20:23:23 +01:00
parent 1f3f791aa0
commit 57b42ca8ec

View File

@@ -441,17 +441,17 @@ function renderFileManagerPage(title, body) {
button.danger:hover { background: #fecaca; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.95rem; }
th { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
th { text-align: left; padding: 0.75rem 1rem; border-top: 1px solid var(--border); border-bottom: none; color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem 1rem; border-top: 1px solid var(--border); border-bottom: none; vertical-align: middle; }
tr:first-child td { border-top: none; }
tbody tr:hover { background: var(--bg); }
.name { display: inline-flex; align-items: center; gap: 0.75rem; font-weight: 500; }
.folder { color: var(--primary); text-decoration: none; }
.folder:hover { text-decoration: underline; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions button { font-size: 0.8rem; padding: 0.25rem 0.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-start; }
.actions form { display: flex; gap: 0.5rem; }
dialog {
border: none;
@@ -571,16 +571,16 @@ function renderPage(title, body, mainClass = '') {
.stack button { width: 100%; justify-content: center; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.925rem; }
th { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--border); color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: none; }
th { text-align: left; padding: 0.75rem; border-top: 1px solid var(--border); border-bottom: none; color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
td { padding: 0.75rem; border-top: 1px solid var(--border); border-bottom: none; vertical-align: top; }
tr:first-child td { border-top: none; }
tbody tr:hover { background: var(--bg); }
progress { width: 100%; height: 0.75rem; border-radius: 99px; overflow: hidden; }
progress::-webkit-progress-bar { background-color: var(--border); }
progress::-webkit-progress-value { background-color: var(--primary); }
.actions { display: flex; gap: 0.5rem; align-items: center; }
.actions { display: flex; flex-direction: column; gap: 0.5rem; align-items: stretch; }
.actions form { display: flex; gap: 0.5rem; }
.actions input, .actions button { font-size: 0.8rem; padding: 0.35rem 0.6rem; }
@@ -955,6 +955,7 @@ app.get(`${basePath}/admin/dashboard`, requireAdminPage, async (req, res) => {
<div class="muted">Noch ${formatCountdown(item.expires_at)}</div>
</td>
<td class="actions">
<button type="button" class="secondary copy-link" data-path="${fileHref}" data-name="${escapeHtml(item.original_name)}">Link kopieren</button>
<form method="post" action="${baseUrl(`/admin/files/${item.id}/delete`)}">
${csrfField(res.locals.csrfToken)}
<button type="submit" class="secondary">Löschen</button>
@@ -964,9 +965,6 @@ app.get(`${basePath}/admin/dashboard`, requireAdminPage, async (req, res) => {
<input name="extendHours" placeholder="Stunden hinzufügen" />
<button type="submit">Verlängern</button>
</form>
<div class="stack">
<button type="button" class="secondary copy-link" data-path="${fileHref}" data-name="${escapeHtml(item.original_name)}">Link kopieren</button>
</div>
</td>
</tr>
`;
@@ -1720,6 +1718,7 @@ app.get(`${basePath}/dashboard`, requireAuthPage, async (req, res) => {
<div class="muted">Noch ${formatCountdown(item.expires_at)}</div>
</td>
<td class="actions">
<button type="button" class="secondary copy-link" data-path="${fileHref}" data-name="${escapeHtml(item.original_name)}">Link kopieren</button>
<form method="post" action="${baseUrl(`/files/${item.id}/delete`)}">
${csrfField(res.locals.csrfToken)}
<button type="submit" class="secondary">Löschen</button>
@@ -1729,9 +1728,6 @@ app.get(`${basePath}/dashboard`, requireAuthPage, async (req, res) => {
<input name="extendHours" placeholder="Stunden hinzufügen" />
<button type="submit">Verlängern</button>
</form>
<div class="stack">
<button type="button" class="secondary copy-link" data-path="${fileHref}" data-name="${escapeHtml(item.original_name)}">Link kopieren</button>
</div>
</td>
</tr>
`;