diff --git a/messages/en-US.json b/messages/en-US.json index 441f45b1..db5852e8 100644 --- a/messages/en-US.json +++ b/messages/en-US.json @@ -2142,5 +2142,9 @@ "maintenanceTime": "e.g., 2 hours, Nov 1 at 5:00 PM", "maintenanceEstimatedTimeDescription": "When you expect maintenance to be completed", "editDomain": "Edit Domain", - "editDomainDescription": "Select a domain for your resource" + "editDomainDescription": "Select a domain for your resource", + "maintenanceModeDisabledTooltip": "This feature requires a valid license to enable.", + "maintenanceScreenTitle": "Service Temporarily Unavailable", + "maintenanceScreenMessage": "We are currently experiencing technical difficulties. Please check back soon.", + "maintenanceScreenEstimatedCompletion": "Estimated Completion:" } diff --git a/src/app/maintenance-screen/page.tsx b/src/app/maintenance-screen/page.tsx index daad80c2..a1e7bd22 100644 --- a/src/app/maintenance-screen/page.tsx +++ b/src/app/maintenance-screen/page.tsx @@ -1,15 +1,23 @@ - import { headers } from "next/headers"; import { priv } from "@app/lib/api"; import { GetMaintenanceInfoResponse } from "@server/routers/resource/types"; +import { getTranslations } from "next-intl/server"; +import { + Card, + CardContent, + CardHeader, + CardTitle +} from "@app/components/ui/card"; +import { Alert, AlertTitle, AlertDescription } from "@app/components/ui/alert"; +import { Clock } from "lucide-react"; export const dynamic = "force-dynamic"; -export const revalidate = 0; export default async function MaintenanceScreen() { - let title = "Service Temporarily Unavailable"; - let message = - "We are currently experiencing technical difficulties. Please check back soon."; + const t = await getTranslations(); + + let title = t("maintenanceScreenTitle"); + let message = t("maintenanceScreenMessage"); let estimatedTime: string | null = null; try { @@ -28,36 +36,33 @@ export default async function MaintenanceScreen() { estimatedTime = maintenanceInfo?.maintenanceEstimatedTime || null; } } catch (err) { - console.warn( + console.error( "Failed to fetch maintenance info", err instanceof Error ? err.message : String(err) ); } return ( -
-
-
-
🔧
- -

- {title} -

- -

{message}

- +
+ + + {title} + + +

{message}

{estimatedTime && ( -
-

- Estimated completion: -

-

+ + + + {t("maintenanceScreenEstimatedCompletion")} + + {estimatedTime} -

-
+ + )} -
-
+ +
); -} \ No newline at end of file +}