revert fb8e77bb68
Local Build and Deploy / deploy (push) Successful in 1m11s

revert style: clean up code with prettier and eslint
This commit is contained in:
remco committed 2026-07-12 21:02:03 +02:00
1 parent 27de078f54
commit e85e4d74ea
378 files changed
+20710 -22428

No files matched your search

+11 -17
View File
@@ -53,11 +53,7 @@ function toHex(value: string | null, def: string): string {
return value && /^#[0-9a-fA-F]{6}$/.test(value) ? value : def;
}
function colorGrid(
fields: { key: string; label: string; def: string }[],
current: Record<string, string>,
suffix = "",
) {
function colorGrid(fields: { key: string; label: string; def: string }[], current: Record<string, string>, suffix = "") {
return (
<div
style={{
@@ -98,16 +94,10 @@ export default async function AdminTheme({
const defaultPreset = PRESETS["Atom (golden)"];
const currentDark = Object.fromEntries(
await Promise.all(
ALL_COLORS.map(
async (f) =>
[
f.key,
(await siteSettings.get(
`${f.key}_dark`,
defaultPreset.dark[f.key as keyof typeof defaultPreset.dark],
)) ?? defaultPreset.dark[f.key as keyof typeof defaultPreset.dark],
] as const,
),
ALL_COLORS.map(async (f) => [
f.key,
(await siteSettings.get(`${f.key}_dark`, defaultPreset.dark[f.key as keyof typeof defaultPreset.dark])) ?? defaultPreset.dark[f.key as keyof typeof defaultPreset.dark],
] as const),
),
) as Record<string, string>;
const radius = (await siteSettings.get("border_radius", "12")) ?? "12";
@@ -133,7 +123,11 @@ export default async function AdminTheme({
</div>
</div>
{sp.saved ? <div className="mb-4 p-3 rounded-lg theme-status-success text-xs">{t("saved")}</div> : null}
{sp.saved ? (
<div className="mb-4 p-3 rounded-lg theme-status-success text-xs">
{t("saved")}
</div>
) : null}
{sp.preset ? (
<div className="mb-4 p-3 rounded-lg theme-status-success text-xs">
{t("presetApplied", { preset: sp.preset })}
@@ -155,7 +149,7 @@ export default async function AdminTheme({
width: 14,
height: 14,
borderRadius: 3,
// eslint-disable-next-line security/detect-object-injection -- k from hardcoded array
background: palette.light[k as keyof typeof palette.light],
boxShadow: "inset 0 0 0 1px rgba(0,0,0,0.15)",
marginLeft: -3,