chore: implement audit action items and translate hardcoded German text
This commit is contained in:
@@ -38,7 +38,9 @@ export async function GET(request: NextRequest, { params }: { params: Promise<{
|
||||
if (!success) {
|
||||
const retryAfter = Math.ceil((resetAt - Date.now()) / 1000);
|
||||
const userAgent = request.headers.get('user-agent') || 'unknown';
|
||||
console.warn(`[Image API] ⚠️ Rate limit exceeded for IP: ${ip} (UA: ${userAgent}). Retry after ${retryAfter}s`);
|
||||
console.warn(
|
||||
`[Image API] ⚠️ Rate limit exceeded for IP: ${ip} (UA: ${userAgent}). Retry after ${retryAfter}s`,
|
||||
);
|
||||
return NextResponse.json({ error: 'Too many requests' }, { status: 429 });
|
||||
}
|
||||
|
||||
|
||||
@@ -11,8 +11,9 @@ import { SubpageNav } from '@/components/SubpageNav';
|
||||
import { ThemeToggle } from '@/components/ThemeToggle';
|
||||
import { ScrollToTop } from '@/components/ScrollToTop';
|
||||
import { Footer } from '@/components/Footer';
|
||||
import { SetupScreen } from '@/components/SetupScreen';
|
||||
import { getConfig, getGoogleFontsUrl, AppConfig } from '@/lib/config';
|
||||
// DevToolbarLoader ist eine Client Component (ssr: false nur dort erlaubt)
|
||||
// DevToolbarLoader is a Client Component (ssr: false is only allowed there)
|
||||
import { DevToolbarLoader } from '@/components/DevToolbarLoader';
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@@ -66,75 +67,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
return (
|
||||
<html lang="en" suppressHydrationWarning>
|
||||
<body>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
minHeight: '100dvh',
|
||||
padding: '2rem',
|
||||
backgroundColor: '#ffffff',
|
||||
color: '#111111',
|
||||
fontFamily: 'system-ui, sans-serif',
|
||||
}}
|
||||
>
|
||||
<div style={{ maxWidth: '600px', width: '100%' }}>
|
||||
<h1
|
||||
style={{
|
||||
fontSize: 'clamp(2rem, 5vw, 3rem)',
|
||||
fontWeight: 500,
|
||||
marginBottom: '0.5rem',
|
||||
letterSpacing: '-0.02em',
|
||||
}}
|
||||
>
|
||||
Setup Required
|
||||
</h1>
|
||||
<p
|
||||
style={{
|
||||
fontSize: '1.125rem',
|
||||
opacity: 0.7,
|
||||
marginBottom: '2rem',
|
||||
lineHeight: 1.5,
|
||||
}}
|
||||
>
|
||||
Immich Folio is running, but it looks like your configuration files or environment
|
||||
variables are missing.
|
||||
</p>
|
||||
<div
|
||||
style={{
|
||||
backgroundColor: 'rgba(0, 0, 0, 0.03)',
|
||||
padding: '1.5rem',
|
||||
borderRadius: '8px',
|
||||
fontSize: '0.95rem',
|
||||
lineHeight: 1.6,
|
||||
}}
|
||||
>
|
||||
<p style={{ marginBottom: '1rem' }}>
|
||||
To get started, follow these steps in your repository or mounted{' '}
|
||||
<code>content/</code> volume:
|
||||
</p>
|
||||
<ol style={{ margin: 0, paddingLeft: '1.25rem' }}>
|
||||
<li style={{ marginBottom: '0.5rem' }}>
|
||||
Copy <code>.env.example</code> to <code>.env.local</code> and fill in your
|
||||
Immich API URL and Key
|
||||
</li>
|
||||
<li style={{ marginBottom: '0.5rem' }}>
|
||||
Copy <code>settings.yaml.example</code> to <code>settings.yaml</code>
|
||||
</li>
|
||||
<li style={{ marginBottom: '0.5rem' }}>
|
||||
Copy <code>gallery.yaml.example</code> to <code>gallery.yaml</code>
|
||||
</li>
|
||||
<li style={{ marginBottom: '0.5rem' }}>
|
||||
Copy <code>about.md.example</code> to <code>about.md</code> (optional)
|
||||
</li>
|
||||
</ol>
|
||||
<p style={{ marginTop: '1.5rem', marginBottom: 0 }}>
|
||||
Open <code>gallery.yaml</code> and add the album IDs you want to display, then{' '}
|
||||
<strong>restart your server</strong>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<SetupScreen />
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
@@ -142,7 +75,7 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
|
||||
return (
|
||||
<html
|
||||
lang="de"
|
||||
lang={config.lang || 'en'}
|
||||
suppressHydrationWarning
|
||||
style={themeVars as React.CSSProperties}
|
||||
data-preset={theme.preset}
|
||||
|
||||
28
app/page.tsx
28
app/page.tsx
@@ -192,7 +192,12 @@ export default async function HomePage() {
|
||||
))}
|
||||
</div>
|
||||
<div className="hero__mosaic-overlay">
|
||||
<HeroTextContent title={config.siteTitle} subtitle={config.siteSubtitle} subpages={subpages} albums={albums} />
|
||||
<HeroTextContent
|
||||
title={config.siteTitle}
|
||||
subtitle={config.siteSubtitle}
|
||||
subpages={subpages}
|
||||
albums={albums}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -203,7 +208,12 @@ export default async function HomePage() {
|
||||
return (
|
||||
<div className="hero hero--minimal">
|
||||
<div className="hero__content">
|
||||
<HeroTextContent title={config.siteTitle} subtitle={config.siteSubtitle} subpages={subpages} albums={albums} />
|
||||
<HeroTextContent
|
||||
title={config.siteTitle}
|
||||
subtitle={config.siteSubtitle}
|
||||
subpages={subpages}
|
||||
albums={albums}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -215,7 +225,12 @@ export default async function HomePage() {
|
||||
<div className="hero hero--fullbleed">
|
||||
<HeroCarousel images={heroData} />
|
||||
<div className="hero__fullbleed-overlay">
|
||||
<HeroTextContent title={config.siteTitle} subtitle={config.siteSubtitle} subpages={subpages} albums={albums} />
|
||||
<HeroTextContent
|
||||
title={config.siteTitle}
|
||||
subtitle={config.siteSubtitle}
|
||||
subpages={subpages}
|
||||
albums={albums}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -227,7 +242,12 @@ export default async function HomePage() {
|
||||
{/* ── Left Panel ──────────────────────────────── */}
|
||||
<div className="hero__left">
|
||||
<div className="hero__content">
|
||||
<HeroTextContent title={config.siteTitle} subtitle={config.siteSubtitle} subpages={subpages} albums={albums} />
|
||||
<HeroTextContent
|
||||
title={config.siteTitle}
|
||||
subtitle={config.siteSubtitle}
|
||||
subpages={subpages}
|
||||
albums={albums}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user