Improve admin UX: hub i18n, dynamic topbar, settings strings, staff logs DataTable.
Local Build and Deploy / deploy (push) Successful in 1m12s
Local Build and Deploy / deploy (push) Successful in 1m12s
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
604e63da51
commit
1039044e48
11 files changed
+526
-305
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { redirect } from "next/navigation";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
import { prisma } from "@/lib/prisma";
|
||||
@@ -18,6 +19,7 @@ export default async function AdminSettings() {
|
||||
PERMS.SETTINGS_EDIT,
|
||||
session.user.rank,
|
||||
);
|
||||
const t = await getTranslations("pages.admin.settings");
|
||||
|
||||
let settings: Awaited<ReturnType<typeof prisma.websiteSetting.findMany>> = [];
|
||||
try {
|
||||
@@ -42,12 +44,14 @@ export default async function AdminSettings() {
|
||||
<div className="space-y-8">
|
||||
<div className="admin-stat-row">
|
||||
<span className="admin-stat-chip">
|
||||
{settings.length} keys in database
|
||||
{t("keysInDatabase", { count: settings.length })}
|
||||
</span>
|
||||
<span className="admin-stat-chip">
|
||||
{MANAGED_SETTING_KEYS.length} managed in form
|
||||
{t("managedInForm", { count: MANAGED_SETTING_KEYS.length })}
|
||||
</span>
|
||||
<span className="admin-stat-chip">
|
||||
{t("documented", { count: documented })}
|
||||
</span>
|
||||
<span className="admin-stat-chip">{documented} documented</span>
|
||||
</div>
|
||||
|
||||
<CmsSettingsForm values={values} canEdit={canEdit} />
|
||||
|
||||
Reference in new issue
Block a user