Revert "Add missing admin action files and navigation links"
This reverts commit 41be6835bf.
This commit is contained in:
1 parent
4a1e1115b3
commit
4d515bc400
338 files changed
+5949
-28144
No files matched your search
@@ -32,6 +32,7 @@ export default async function AdminWriteableBoxes() {
|
||||
</div>
|
||||
|
||||
<section className="mt-6">
|
||||
|
||||
<div className="grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-3.5 mb-6">
|
||||
<StatusCard label={t("totalBoxes")} value={boxes.length} icon="🗂️" />
|
||||
<StatusCard
|
||||
@@ -57,7 +58,13 @@ export default async function AdminWriteableBoxes() {
|
||||
<label htmlFor="new_icon" style={{ display: "block", fontWeight: 700 }}>
|
||||
{t("form.iconEmoji")}
|
||||
</label>
|
||||
<input id="new_icon" name="icon" maxLength={255} placeholder="📰" style={{ width: "100%" }} />
|
||||
<input
|
||||
id="new_icon"
|
||||
name="icon"
|
||||
maxLength={255}
|
||||
placeholder="📰"
|
||||
style={{ width: "100%" }}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor="new_position" style={{ display: "block", fontWeight: 700 }}>
|
||||
@@ -97,9 +104,7 @@ export default async function AdminWriteableBoxes() {
|
||||
</section>
|
||||
|
||||
<section className="mt-6">
|
||||
<h2 className="admin-section-title">
|
||||
{t("boxes")} ({boxes.length})
|
||||
</h2>
|
||||
<h2 className="admin-section-title">{t("boxes")} ({boxes.length})</h2>
|
||||
{boxes.length === 0 ? (
|
||||
<div className="admin-empty">{t("noBoxes")}</div>
|
||||
) : (
|
||||
@@ -117,9 +122,7 @@ export default async function AdminWriteableBoxes() {
|
||||
<span className="text-sm text-gray-500 dark:text-gray-400">#{String(box.id)}</span>
|
||||
{box.icon ? <span aria-hidden>{box.icon}</span> : null}
|
||||
<strong className="flex-1">{box.title}</strong>
|
||||
<span
|
||||
className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${box.isActive ? "bg-green-600/20 text-[var(--color-text)]" : "bg-red-500/22 text-[var(--color-text)]"}`}
|
||||
>
|
||||
<span className={`inline-block text-[0.72rem] font-bold px-2 py-0.5 rounded-full ${box.isActive ? "bg-green-600/20 text-[var(--color-text)]" : "bg-red-500/22 text-[var(--color-text)]"}`}>
|
||||
{box.isActive ? t("active") : t("hidden")}
|
||||
</span>
|
||||
</div>
|
||||
@@ -127,8 +130,11 @@ export default async function AdminWriteableBoxes() {
|
||||
<form action={updateBox} className="grid grid-cols-1 gap-4 md:grid-cols-2">
|
||||
<input type="hidden" name="id" value={String(box.id)} />
|
||||
<div>
|
||||
<label htmlFor={`title_${box.id}`} style={{ display: "block", fontWeight: 700 }}>
|
||||
{t("form.name")}
|
||||
<label
|
||||
htmlFor={`title_${box.id}`}
|
||||
style={{ display: "block", fontWeight: 700 }}
|
||||
>
|
||||
{t("form.name")}
|
||||
</label>
|
||||
<input
|
||||
id={`title_${box.id}`}
|
||||
@@ -140,8 +146,11 @@ export default async function AdminWriteableBoxes() {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor={`icon_${box.id}`} style={{ display: "block", fontWeight: 700 }}>
|
||||
{t("form.iconEmoji")}
|
||||
<label
|
||||
htmlFor={`icon_${box.id}`}
|
||||
style={{ display: "block", fontWeight: 700 }}
|
||||
>
|
||||
{t("form.iconEmoji")}
|
||||
</label>
|
||||
<input
|
||||
id={`icon_${box.id}`}
|
||||
@@ -152,8 +161,11 @@ export default async function AdminWriteableBoxes() {
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<label htmlFor={`position_${box.id}`} style={{ display: "block", fontWeight: 700 }}>
|
||||
{t("position")}
|
||||
<label
|
||||
htmlFor={`position_${box.id}`}
|
||||
style={{ display: "block", fontWeight: 700 }}
|
||||
>
|
||||
{t("position")}
|
||||
</label>
|
||||
<input
|
||||
id={`position_${box.id}`}
|
||||
@@ -173,13 +185,21 @@ export default async function AdminWriteableBoxes() {
|
||||
fontWeight: 700,
|
||||
}}
|
||||
>
|
||||
<input type="checkbox" name="isActive" value="1" defaultChecked={box.isActive} />{" "}
|
||||
<input
|
||||
type="checkbox"
|
||||
name="isActive"
|
||||
value="1"
|
||||
defaultChecked={box.isActive}
|
||||
/>{" "}
|
||||
{t("active")}
|
||||
</label>
|
||||
</div>
|
||||
<div style={{ gridColumn: "1 / -1" }}>
|
||||
<label htmlFor={`content_${box.id}`} style={{ display: "block", fontWeight: 700 }}>
|
||||
{t("form.content")}
|
||||
<label
|
||||
htmlFor={`content_${box.id}`}
|
||||
style={{ display: "block", fontWeight: 700 }}
|
||||
>
|
||||
{t("form.content")}
|
||||
</label>
|
||||
<textarea
|
||||
id={`content_${box.id}`}
|
||||
|
||||
Reference in new issue
Block a user