fix(housekeeping): secure radio settings cache
This commit is contained in:
1 parent
845666cf37
commit
f24adfcf66
13 files changed
+796
-188
No files matched your search
@@ -356,8 +356,25 @@ const GROUPS: Group[] = [
|
||||
|
||||
const CURATED_KEYS = new Set(GROUPS.flatMap((g) => g.fields.map((f) => f.key)));
|
||||
|
||||
export default async function AdminRadioSettingsPage() {
|
||||
export default async function AdminRadioSettingsPage({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{
|
||||
saved?: string;
|
||||
partial?: string;
|
||||
error?: string;
|
||||
}>;
|
||||
}) {
|
||||
const t = await getTranslations("pages.admin.radio");
|
||||
const noticeParams = await searchParams;
|
||||
const notice =
|
||||
noticeParams.error === "1"
|
||||
? "Radio settings were not saved. Check the submitted fields and try again."
|
||||
: noticeParams.partial === "1"
|
||||
? "Radio settings were saved, but cached data could not be refreshed. Refresh the page before saving again."
|
||||
: noticeParams.saved === "1"
|
||||
? "Radio settings saved."
|
||||
: null;
|
||||
|
||||
let values: Map<string, string> = new Map();
|
||||
let dbError = false;
|
||||
@@ -398,6 +415,11 @@ export default async function AdminRadioSettingsPage() {
|
||||
|
||||
return (
|
||||
<main>
|
||||
{notice ? (
|
||||
<div className="admin-card mb-6">
|
||||
<p className="text-sm m-0">{notice}</p>
|
||||
</div>
|
||||
) : null}
|
||||
{dbError ? (
|
||||
<div className="admin-card mb-6">
|
||||
<p className="text-xs theme-text-muted dark:theme-text-muted m-0">
|
||||
|
||||
Reference in new issue
Block a user