Fix delete color and contrast

This commit is contained in:
2026-09-13 10:08:04 +02:00
parent 9c5aae5386
commit 600e66f2af
9 changed files with 42 additions and 36 deletions
+7 -1
View File
@@ -8,7 +8,11 @@
--line: #dcdcd5;
--accent: #2f6f4f;
--accent-fg: #ffffff;
/* Red reads as text and as a button surface, and one value cannot do both:
see the pair below, kept in step per theme. */
--danger: #9b2c2c;
--danger-bg: #991b1b;
--danger-fg: #ffffff;
--warn-bg: #fdf6e3;
--radius: 10px;
}
@@ -23,6 +27,8 @@
--accent: #5fae86;
--accent-fg: #10241a;
--danger: #e07070;
--danger-bg: #d32f2f;
--danger-fg: #ffffff;
--warn-bg: #2a2418;
}
}
@@ -112,7 +118,7 @@ button, .button {
text-decoration: none;
}
button:disabled { opacity: .55; cursor: default; }
button.danger { background: var(--danger); color: #fff; }
button.danger { background: var(--danger-bg); color: var(--danger-fg); }
.progress .bar {
height: .5rem;
+1 -1
View File
@@ -36,7 +36,7 @@
<td data-label="Uploaded" class="nowrap" title="{{.Created}}">{{.CreatedAgo}}</td>
<td data-label="Expires" class="nowrap" title="{{.Expires}}">{{.ExpiresIn}}</td>
<td class="actions-cell">
<form method="post" action="{{$.Base}}api/d/{{.ID}}/delete">
<form method="post" action="{{$.Base}}d/{{.ID}}/delete">
<input type="hidden" name="from" value="admin">
<button type="submit" class="danger small"
data-confirm="Delete {{.Filename}}? This cannot be undone.">Delete</button>
+2 -2
View File
@@ -3,7 +3,7 @@
<p class="notice">Your login is no longer valid, that token has been removed. You have been logged out.</p>
{{end}}
<form id="upload" class="card" method="post" action="{{.Base}}api/upload"
<form id="upload" class="card" method="post" action="{{.Base}}upload"
enctype="multipart/form-data" data-max-size="{{.MaxSizeBytes}}">
<!-- Field order is load-bearing: the server streams this body rather than
@@ -68,6 +68,6 @@
-H 'Authorization: Bearer &lt;token&gt;' \
-H 'Vanity: my-file' \
-H 'Expiry: 3d' \
{{.AbsBase}}api/upload</code></pre>
{{.AbsBase}}upload</code></pre>
</section>
{{end}}
+2 -2
View File
@@ -26,7 +26,7 @@
{{if .CanDelete}}
<p class="hint">Your token can remove this file.</p>
<form method="post" action="{{.Base}}api/d/{{.Meta.ID}}/delete">
<form method="post" action="{{.Base}}d/{{.Meta.ID}}/delete">
<input type="hidden" name="from" value="info">
<button type="submit" class="danger"
data-confirm="Delete {{.Meta.Filename}}? This cannot be undone.">Delete this file</button>
@@ -36,7 +36,7 @@
Paste the delete token you were given when this file was uploaded.
It is the only way to remove a file early without an owning token.
</p>
<form method="post" action="{{.Base}}api/d/{{.Meta.ID}}/delete">
<form method="post" action="{{.Base}}d/{{.Meta.ID}}/delete">
<input type="hidden" name="from" value="info">
<label class="field">
<span>Delete token</span>
+1 -1
View File
@@ -35,7 +35,7 @@
expires.
</p>
<p class="mono wrap">{{.DeleteToken}}</p>
<form method="post" action="{{.Base}}api/d/{{.Meta.ID}}/delete">
<form method="post" action="{{.Base}}d/{{.Meta.ID}}/delete">
<input type="hidden" name="token" value="{{.DeleteToken}}">
<button type="submit" class="danger"
data-confirm="Delete {{.Meta.Filename}}? This cannot be undone.">Delete it now</button>