feat(frontend): safe-area insets + hardened reduced-motion

- Add viewport export with viewportFit: "cover" so iOS exposes
  env(safe-area-inset-*) (required for the insets to take effect).
- NavRail / TopBar / main / Toaster now respect safe-area insets so content
  clears the iPhone notch and home indicator in both portrait and landscape.
- prefers-reduced-motion: the media query already disabled declared animation
  classes; harden it with a global transition/animation duration override and
  kill the scan-line shimmer so motion-sensitive users get a fully static UI.

Verified tsc --noEmit + next build clean.
This commit is contained in:
asepharyana
2026-08-16 16:55:34 +07:00
parent c89288191e
commit 0ace758c79
6 changed files with 24 additions and 5 deletions
+12
View File
@@ -262,6 +262,7 @@
@media (prefers-reduced-motion: reduce) {
.scan-line::after,
.scan-line,
.animate-eq,
.animate-spin-disc,
.animate-pulse-ring,
@@ -269,5 +270,16 @@
.animate-breathe {
animation: none !important;
}
.scan-line {
background: none !important;
}
*,
*::before,
*::after {
animation-duration: 0.001ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.001ms !important;
scroll-behavior: auto !important;
}
html { scroll-behavior: auto; }
}
+8 -1
View File
@@ -1,4 +1,4 @@
import type { Metadata } from "next";
import type { Metadata, Viewport } from "next";
import { Bricolage_Grotesque, Inter, JetBrains_Mono } from "next/font/google";
import { ThemeProvider } from "next-themes";
import { Toaster } from "@/components/primitives/toast";
@@ -28,6 +28,13 @@ export const metadata: Metadata = {
"AI-powered Discord moderation, voice monitoring, and media control console",
};
export const viewport: Viewport = {
themeColor: "#0a0a0c",
width: "device-width",
initialScale: 1,
viewportFit: "cover",
};
export default function RootLayout({
children,
}: Readonly<{