feat(apps): static metadata except channel and post pages, metadata in head for every visitor, manifest from market, no iPhone input zoom in bull

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Amiram_se 2026-10-10 12:19:43 +04:00
parent 92a5e5410d
commit e945e646fc
82 changed files with 350 additions and 462 deletions

View File

@ -18,6 +18,9 @@ const immutable = [
]; ];
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
// Every visitor gets the metadata in <head>, where Chrome looks for the manifest and Safari for
// its home-screen tags; Next.js would otherwise stream it to the end of <body> (0054).
htmlLimitedBots: /.*/,
// The `/api` proxy's wait for the gateway (0018); uploads outlast Next.js's 30-second default. // The `/api` proxy's wait for the gateway (0018); uploads outlast Next.js's 30-second default.
experimental: { proxyTimeout: API_PROXY_TIMEOUT_MS }, experimental: { proxyTimeout: API_PROXY_TIMEOUT_MS },
// Workspace packages export TypeScript source, so Next.js compiles them. // Workspace packages export TypeScript source, so Next.js compiles them.

View File

@ -6,9 +6,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:login.meta-title'), robots: { index: false } }; title: i18n.t('auth:login.meta-title'),
} robots: { index: false },
};
/** Login, the number. The frame renders on the server; the step only in the browser (0013). */ /** Login, the number. The frame renders on the server; the step only in the browser (0013). */
export default function LoginPage() { export default function LoginPage() {

View File

@ -6,12 +6,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:suspended.meta-title'),
title: i18n.t('auth:suspended.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* After a valid code for a suspended account (S6 3.1): the 560 card with the support button * After a valid code for a suspended account (S6 3.1): the 560 card with the support button

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:login.verify-meta-title'),
title: i18n.t('auth:login.verify-meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Login, the code. The frame renders on the server; the step only in the browser (0013). */ /** Login, the code. The frame renders on the server; the step only in the browser (0013). */
export default function LoginVerifyPage() { export default function LoginVerifyPage() {

View File

@ -6,12 +6,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.meta-title'),
title: i18n.t('auth:register.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 1, the account type. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 1, the account type. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterTypePage() { export default function RegisterTypePage() {

View File

@ -6,12 +6,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.details.meta-title'),
title: i18n.t('auth:register.details.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 4, account details or identity. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 4, account details or identity. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterDetailsPage() { export default function RegisterDetailsPage() {

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.meta-title'),
title: i18n.t('auth:register.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 2, the number. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 2, the number. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterPhonePage() { export default function RegisterPhonePage() {

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.verify.meta-title'),
title: i18n.t('auth:register.verify.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 3, the code. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 3, the code. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterVerifyPage() { export default function RegisterVerifyPage() {

View File

@ -11,12 +11,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:profile.title'),
title: i18n.t('account:profile.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «اطلاعات کاربری» on desktop, from the account menu or حساب کاربری: the header, then one route for * «اطلاعات کاربری» on desktop, from the account menu or حساب کاربری: the header, then one route for

View File

@ -9,12 +9,10 @@ import { CheckoutTemplate } from './templates/checkout-template';
type CheckoutPageProps = { params: Promise<{ username: string }> }; type CheckoutPageProps = { params: Promise<{ username: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:checkout.title'),
title: i18n.t('payment:checkout.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Checkout for a creator's channel (U9), reached only from its «اشتراک». The server renders the * Checkout for a creator's channel (U9), reached only from its «اشتراک». The server renders the

View File

@ -11,12 +11,10 @@ import { i18n } from '../../../../../i18n';
type EditPostPageProps = { params: Promise<{ id: string }> }; type EditPostPageProps = { params: Promise<{ id: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('content:composer.edit-title'),
title: i18n.t('content:composer.edit-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Editing a published post, in its first 15 minutes; in the browser only. */ /** Editing a published post, in its first 15 minutes; in the browser only. */
export default async function EditPostPage({ params }: EditPostPageProps) { export default async function EditPostPage({ params }: EditPostPageProps) {

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('content:composer.new-title'),
title: i18n.t('content:composer.new-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** A new post (C4 ۷.۳): the 640px composer under the header, in the browser only. */ /** A new post (C4 ۷.۳): the 640px composer under the header, in the browser only. */
export default function ComposePostPage() { export default function ComposePostPage() {

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:composer.title'),
title: i18n.t('predictions:composer.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «پیش‌بینی جدید» on a direct load (J09-1-D): the 960px composer under the header, in the browser * «پیش‌بینی جدید» on a direct load (J09-1-D): the 960px composer under the header, in the browser

View File

@ -15,12 +15,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('pricing:meta-title'),
title: i18n.t('pricing:meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* C7, «ویرایش قیمت‌ها» on desktop (C7 ۸.۱): the creator header with داشبورد on, «بازگشت» above * C7, «ویرایش قیمت‌ها» on desktop (C7 ۸.۱): the creator header with داشبورد on, «بازگشت» above

View File

@ -12,12 +12,10 @@ import { i18n } from '../../../../../i18n';
type PaymentResultPageProps = { params: Promise<{ paymentId: string }> }; type PaymentResultPageProps = { params: Promise<{ paymentId: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:result.meta-title'),
title: i18n.t('payment:result.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «نتیجه پرداخت» on desktop (U10 ۹.۴, ۹.۵): «بازگشت», then one panel in the 480 column under the * «نتیجه پرداخت» on desktop (U10 ۹.۴, ۹.۵): «بازگشت», then one panel in the 480 column under the

View File

@ -10,12 +10,10 @@ type PaymentReturnPageProps = {
searchParams: Promise<{ paymentId?: string | string[] }>; searchParams: Promise<{ paymentId?: string | string[] }>;
}; };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:confirm.meta-title'),
title: i18n.t('payment:confirm.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Back from the bank (U10 ۱.۱): «در حال تأیید پرداخت...» while the payment settles, then its * Back from the bank (U10 ۱.۱): «در حال تأیید پرداخت...» while the payment settles, then its

View File

@ -1,3 +1,7 @@
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap
// adds to i18n when this module loads, whichever module Next loads first (0055).
import '../../../../bootstrap/bootstrap.server';
import { FlexBox } from '@lumina/island/atoms/flex-box'; import { FlexBox } from '@lumina/island/atoms/flex-box';
import { Card } from '@lumina/island/molecules/card'; import { Card } from '@lumina/island/molecules/card';
import { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation'; import { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation';
@ -11,12 +15,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('terms:meta-title'),
title: i18n.t('terms:meta-title'), description: i18n.t('terms:meta-description'),
description: i18n.t('terms:meta-description'), };
};
}
/** /**
* «شرایط اشتراک» on desktop (S5 ۲.۱): the text in a panel of the 640 column under the header, * «شرایط اشتراک» on desktop (S5 ۲.۱): the text in a panel of the 640 column under the header,

View File

@ -1,3 +1,7 @@
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap
// adds to i18n when this module loads, whichever module Next loads first (0055).
import '../../bootstrap/bootstrap.server';
import { Element } from '@lumina/island/primitives/element'; import { Element } from '@lumina/island/primitives/element';
import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect'; import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect';
import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq'; import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq';
@ -22,12 +26,10 @@ import { i18n } from '../../i18n';
export const dynamic = 'force-static'; export const dynamic = 'force-static';
export const revalidate = 600; export const revalidate = 600;
export function generateMetadata(): Metadata { export const metadata: Metadata = landingMetadata({
return landingMetadata({ title: i18n.t('landing:meta.title'),
title: i18n.t('landing:meta.title'), description: i18n.t('landing:hero.lead'),
description: i18n.t('landing:hero.lead'), });
});
}
/** /**
* The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A * The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A

View File

@ -12,6 +12,7 @@ export default function Loading() {
<DesktopPageTitle <DesktopPageTitle
title={i18n.t('account:install.title')} title={i18n.t('account:install.title')}
parentHref={ROUTES.account.root} parentHref={ROUTES.account.root}
backToPrevious
/> />
<InstallAppSkeleton <InstallAppSkeleton
layout="desktop" layout="desktop"

View File

@ -9,9 +9,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:install.title'), robots: { index: false } }; title: i18n.t('account:install.title'),
} robots: { index: false },
};
/** /**
* نصب اپلیکیشن on desktop (J12-4, Chrome and Edge): «بازگشت» to حساب کاربری and the page's name, * نصب اپلیکیشن on desktop (J12-4, Chrome and Edge): «بازگشت» to حساب کاربری and the page's name,
@ -25,6 +26,7 @@ export default function InstallPage() {
<DesktopPageTitle <DesktopPageTitle
title={i18n.t('account:install.title')} title={i18n.t('account:install.title')}
parentHref={ROUTES.account.root} parentHref={ROUTES.account.root}
backToPrevious
/> />
<AuthGuard <AuthGuard
fallback={ fallback={

View File

@ -11,12 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:notifications.title'),
title: i18n.t('account:notifications.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* تنظیمات اعلان‌ها on desktop (J12-3 D), from the account menu or حساب کاربری: «بازگشت» (to حساب * تنظیمات اعلان‌ها on desktop (J12-3 D), from the account menu or حساب کاربری: «بازگشت» (to حساب

View File

@ -10,12 +10,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:title'),
title: i18n.t('account:title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* حساب کاربری on desktop (J12-1 D), the account menu's first item: «بازگشت», the title, and the * حساب کاربری on desktop (J12-1 D), the account menu's first item: «بازگشت», the title, and the

View File

@ -5,9 +5,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { AnalystsTemplate } from './templates/analysts-template'; import { AnalystsTemplate } from './templates/analysts-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:analysts.title'), robots: { index: false } }; title: i18n.t('home:analysts.title'),
} robots: { index: false },
};
/** /**
* «تحلیلگران منتخب», `/analysts` (J04-3): every featured analyst, read on the server, the same for * «تحلیلگران منتخب», `/analysts` (J04-3): every featured analyst, read on the server, the same for

View File

@ -15,6 +15,9 @@ import { ChannelTemplate } from './templates/channel-template';
type ChannelPageProps = { params: Promise<{ username: string }> }; type ChannelPageProps = { params: Promise<{ username: string }> };
// The one kind of route whose metadata names its data (0055): it reads through the same per-request
// cache as the page, so the first byte, held for the metadata in <head> (0054), waits for that
// one read.
export async function generateMetadata({ export async function generateMetadata({
params, params,
}: ChannelPageProps): Promise<Metadata> { }: ChannelPageProps): Promise<Metadata> {

View File

@ -33,6 +33,9 @@ async function readPostPage(username: string, id: string) {
return { channel: channel.data, post: found }; return { channel: channel.data, post: found };
} }
// The one kind of route whose metadata names its data (0055): it reads through the same per-request
// cache as the page, so the first byte, held for the metadata in <head> (0054), waits for that
// one read.
export async function generateMetadata({ export async function generateMetadata({
params, params,
}: PostPageProps): Promise<Metadata> { }: PostPageProps): Promise<Metadata> {

View File

@ -30,7 +30,10 @@ export function PostTemplate({
className="w-full max-w-content" className="w-full max-w-content"
> >
{/* A link opened on its own goes back to the post's channel (R14). */} {/* A link opened on its own goes back to the post's channel (R14). */}
<DeskBack parentHref={ROUTES.channel(channel.username)} /> <DeskBack
parentHref={ROUTES.channel(channel.username)}
backToPrevious
/>
{channel.suspended ? ( {channel.suspended ? (
<ChannelUnavailable context="post" /> <ChannelUnavailable context="post" />
) : post ? ( ) : post ? (

View File

@ -21,12 +21,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:finance.meta-title'),
title: i18n.t('dashboard:finance.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › مالی (brief §4; C19, C20), in this order, 16px apart: when payouts are made (the same * داشبورد › مالی (brief §4; C19, C20), in this order, 16px apart: when payouts are made (the same

View File

@ -19,12 +19,10 @@ import { Suspense } from 'react';
import { clientEnv } from '../../../../../env'; import { clientEnv } from '../../../../../env';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:plans.meta-title'),
title: i18n.t('dashboard:plans.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مخاطبان», * داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مخاطبان»,

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:tab.meta-title'),
title: i18n.t('predictions:tab.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › پیش‌بینی‌ها (J10-3): the creator's record, open and recently closed predictions, in the * داشبورد › پیش‌بینی‌ها (J10-3): the creator's record, open and recently closed predictions, in the

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:following.meta-title'),
title: i18n.t('dashboard:following.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › دنبال‌شده‌ها (U8 ۶.۱): the investor's own list, in the browser only, behind rows of the * داشبورد › دنبال‌شده‌ها (U8 ۶.۱): the investor's own list, in the browser only, behind rows of the

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:subscriptions.meta-title'),
title: i18n.t('dashboard:subscriptions.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › اشتراک‌ها (U2, U11): the investor's own subscriptions, in the browser only, behind * داشبورد › اشتراک‌ها (U2, U11): the investor's own subscriptions, in the browser only, behind

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:transactions.meta-title'),
title: i18n.t('dashboard:transactions.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › تراکنش‌ها (U4): the investor's own payments, in the browser only, behind rows of the * داشبورد › تراکنش‌ها (U4): the investor's own payments, in the browser only, behind rows of the

View File

@ -11,12 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:list.title'),
title: i18n.t('predictions:list.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «همه پیش‌بینی‌ها» on desktop (J10-3f): the same list in the 640 column, «بازگشت» over its title * «همه پیش‌بینی‌ها» on desktop (J10-3f): the same list in the 640 column, «بازگشت» over its title

View File

@ -10,9 +10,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { HomeTemplate } from './templates/home-template'; import { HomeTemplate } from './templates/home-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:meta.title'), robots: { index: false } }; title: i18n.t('home:meta.title'),
} robots: { index: false },
};
/** /**
* خانه, `/feed`: the investor's feed of the creators they follow, under the featured analysts' row, * خانه, `/feed`: the investor's feed of the creators they follow, under the featured analysts' row,

View File

@ -9,12 +9,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('notifications:title'),
title: i18n.t('notifications:title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* اعلان‌ها at its own address on desktop, such as a link opened from elsewhere: the same centre the * اعلان‌ها at its own address on desktop, such as a link opened from elsewhere: the same centre the

View File

@ -10,9 +10,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { SearchTemplate } from './templates/search-template'; import { SearchTemplate } from './templates/search-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:search.title'), robots: { index: false } }; title: i18n.t('home:search.title'),
} robots: { index: false },
};
/** /**
* جستجو, `/search?q=` (J04-4): an investor's analyst search, in the browser only, behind the * جستجو, `/search?q=` (J04-4): an investor's analyst search, in the browser only, behind the

View File

@ -10,12 +10,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.meta-title'),
title: i18n.t('auth:register.profile.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Registration step 5 for a creator, on the session: the form card beside its live preview. The * Registration step 5 for a creator, on the session: the form card beside its live preview. The

View File

@ -10,12 +10,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.done.meta-title'),
title: i18n.t('auth:register.profile.done.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* The end of registration for a creator (R2-CompleteProfile 3.3), in the 560 card. The frame renders on the server; the step only in the browser, for the signed-in creator, * The end of registration for a creator (R2-CompleteProfile 3.3), in the 560 card. The frame renders on the server; the step only in the browser, for the signed-in creator,

View File

@ -9,12 +9,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
import { AuthTemplate } from '../../../templates/auth-template'; import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.meta-title'),
title: i18n.t('auth:register.profile.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Registration step 5 for an investor, optional, on the session, in the 560 card. The frame * Registration step 5 for an investor, optional, on the session, in the 560 card. The frame

View File

@ -13,9 +13,7 @@ import { rootMetadata } from '../configs';
import { i18n } from '../i18n'; import { i18n } from '../i18n';
import { AppProviders } from './organisms/app-providers'; import { AppProviders } from './organisms/app-providers';
export function generateMetadata(): Metadata { export const metadata: Metadata = rootMetadata();
return rootMetadata();
}
export default function RootLayout({ children }: { children: ReactNode }) { export default function RootLayout({ children }: { children: ReactNode }) {
// Only the face every page renders first; the Latin face loads where شبا is shown. // Only the face every page renders first; the Latin face loads where شبا is shown.

View File

@ -1,4 +1,4 @@
import { ROUTES } from '@lumina/market/app/navigation'; import { buildManifest } from '@lumina/market/server';
import type { MetadataRoute } from 'next'; import type { MetadataRoute } from 'next';
import { i18n } from '../i18n'; import { i18n } from '../i18n';
@ -6,43 +6,17 @@ import { i18n } from '../i18n';
// Every request renders fresh, as every metadata route does: nothing is cached on the server. // Every request renders fresh, as every metadata route does: nothing is cached on the server.
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
/** // Both apps serve this same manifest (0053). Browsers fetch it without cookies, so it speaks the
* The light theme's `--bg-page` and `--action-primary` in island `theme.css`. The manifest can't // app's one locale, and it is the same bytes until the next deploy, so it is built once, when the
* read CSS variables, so a change there changes these too. // module loads; each request only serializes it.
*/ const MANIFEST = buildManifest({
const BACKGROUND_COLOR = '#f4f6f9'; name: i18n.t('app.name'),
const THEME_COLOR = '#533afd'; description: i18n.t('app.description'),
lang: i18n.language,
dir: i18n.dir(),
});
/** /** The web app manifest at `/manifest.webmanifest`; Next.js adds its `<link rel="manifest">`. */
* The web app manifest, at `/manifest.webmanifest`. Browsers fetch it without cookies, so it uses
* the app's one locale. The installed app opens on خانه, which sends a guest to login and a creator
* to their channel, so it never flashes the landing; `id` keeps the installed app's identity if
* `start_url` changes.
*/
export default function manifest(): MetadataRoute.Manifest { export default function manifest(): MetadataRoute.Manifest {
const name = i18n.t('app.name'); return MANIFEST;
return {
id: '/',
name,
short_name: name,
description: i18n.t('app.description'),
lang: i18n.language,
dir: i18n.dir(),
start_url: ROUTES.home,
scope: '/',
display: 'standalone',
background_color: BACKGROUND_COLOR,
theme_color: THEME_COLOR,
// Placeholders until the brand mark exists; apple-icon.png beside this file covers iOS.
icons: [
{ src: '/pwa/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/pwa/icon-512.png', sizes: '512x512', type: 'image/png' },
{
src: '/pwa/icon-maskable-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
};
} }

View File

@ -18,6 +18,9 @@ const immutable = [
]; ];
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
// Every visitor gets the metadata in <head>, where Chrome looks for the manifest and Safari for
// its home-screen tags; Next.js would otherwise stream it to the end of <body> (0054).
htmlLimitedBots: /.*/,
// The `/api` proxy's wait for the gateway (0018); uploads outlast Next.js's 30-second default. // The `/api` proxy's wait for the gateway (0018); uploads outlast Next.js's 30-second default.
experimental: { proxyTimeout: API_PROXY_TIMEOUT_MS }, experimental: { proxyTimeout: API_PROXY_TIMEOUT_MS },
// Workspace packages export TypeScript source, so Next.js compiles them. // Workspace packages export TypeScript source, so Next.js compiles them.

View File

@ -8,9 +8,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:login.meta-title'), robots: { index: false } }; title: i18n.t('auth:login.meta-title'),
} robots: { index: false },
};
/** Login, the number, with back to the landing (J01-1). The frame renders on the server; the step only in the browser (0013). */ /** Login, the number, with back to the landing (J01-1). The frame renders on the server; the step only in the browser (0013). */
export default function LoginPage() { export default function LoginPage() {

View File

@ -7,12 +7,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:suspended.meta-title'),
title: i18n.t('auth:suspended.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* After a valid code for a suspended account (S6 1.11, 2.1): the brand header with support and * After a valid code for a suspended account (S6 1.11, 2.1): the brand header with support and

View File

@ -8,12 +8,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:login.verify-meta-title'),
title: i18n.t('auth:login.verify-meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Login, the code. The frame renders on the server; the step only in the browser (0013). */ /** Login, the code. The frame renders on the server; the step only in the browser (0013). */
export default function LoginVerifyPage() { export default function LoginVerifyPage() {

View File

@ -8,12 +8,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.meta-title'),
title: i18n.t('auth:register.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 1, the account type, with back to login (J02-1). The frame renders on the server; the step only in the browser (0013). */ /** Registration step 1, the account type, with back to login (J02-1). The frame renders on the server; the step only in the browser (0013). */
export default function RegisterTypePage() { export default function RegisterTypePage() {

View File

@ -7,12 +7,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.details.meta-title'),
title: i18n.t('auth:register.details.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 4, account details or identity. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 4, account details or identity. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterDetailsPage() { export default function RegisterDetailsPage() {

View File

@ -8,12 +8,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.meta-title'),
title: i18n.t('auth:register.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 2, the number. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 2, the number. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterPhonePage() { export default function RegisterPhonePage() {

View File

@ -8,12 +8,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.verify.meta-title'),
title: i18n.t('auth:register.verify.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Registration step 3, the code. The frame renders on the server; the step only in the browser (0013). */ /** Registration step 3, the code. The frame renders on the server; the step only in the browser (0013). */
export default function RegisterVerifyPage() { export default function RegisterVerifyPage() {

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:profile.title'),
title: i18n.t('account:profile.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «اطلاعات کاربری» on mobile: a task page pushed from حساب کاربری, on white with no bottom nav, one * «اطلاعات کاربری» on mobile: a task page pushed from حساب کاربری, on white with no bottom nav, one

View File

@ -9,12 +9,10 @@ import { CheckoutTemplate } from './templates/checkout-template';
type CheckoutPageProps = { params: Promise<{ username: string }> }; type CheckoutPageProps = { params: Promise<{ username: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:checkout.title'),
title: i18n.t('payment:checkout.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Checkout for a creator's channel (U9), reached only from its «اشتراک». The server renders the * Checkout for a creator's channel (U9), reached only from its «اشتراک». The server renders the

View File

@ -9,12 +9,10 @@ import { i18n } from '../../../../../i18n';
type EditPostPageProps = { params: Promise<{ id: string }> }; type EditPostPageProps = { params: Promise<{ id: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('content:composer.edit-title'),
title: i18n.t('content:composer.edit-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** Editing a published post (C4 ۵.۲), in its first 15 minutes; in the browser only. */ /** Editing a published post (C4 ۵.۲), in its first 15 minutes; in the browser only. */
export default async function EditPostPage({ params }: EditPostPageProps) { export default async function EditPostPage({ params }: EditPostPageProps) {

View File

@ -5,12 +5,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('content:composer.new-title'),
title: i18n.t('content:composer.new-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** A new post (C4): the creator's own task flow, in the browser only, with no bottom nav. */ /** A new post (C4): the creator's own task flow, in the browser only, with no bottom nav. */
export default function ComposePostPage() { export default function ComposePostPage() {

View File

@ -5,12 +5,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:composer.title'),
title: i18n.t('predictions:composer.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** «پیش‌بینی جدید» (J09-1): the creator's own task flow, in the browser only, with no bottom nav. */ /** «پیش‌بینی جدید» (J09-1): the creator's own task flow, in the browser only, with no bottom nav. */
export default function ComposePredictionPage() { export default function ComposePredictionPage() {

View File

@ -11,12 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('pricing:meta-title'),
title: i18n.t('pricing:meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* C7, «ویرایش قیمت‌ها» on mobile: a task page pushed from the «قیمت طرح‌ها» card, back · title · * C7, «ویرایش قیمت‌ها» on mobile: a task page pushed from the «قیمت طرح‌ها» card, back · title ·

View File

@ -12,12 +12,10 @@ import { i18n } from '../../../../../i18n';
type PaymentResultPageProps = { params: Promise<{ paymentId: string }> }; type PaymentResultPageProps = { params: Promise<{ paymentId: string }> };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:result.meta-title'),
title: i18n.t('payment:result.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «نتیجه پرداخت» (U10 ۹.۱–۹.۳): back, the name and support, the investor's own payment in the * «نتیجه پرداخت» (U10 ۹.۱–۹.۳): back, the name and support, the investor's own payment in the

View File

@ -10,12 +10,10 @@ type PaymentReturnPageProps = {
searchParams: Promise<{ paymentId?: string | string[] }>; searchParams: Promise<{ paymentId?: string | string[] }>;
}; };
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('payment:confirm.meta-title'),
title: i18n.t('payment:confirm.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Back from the bank (U10 ۱.۱): «در حال تأیید پرداخت...» while the payment settles, then its * Back from the bank (U10 ۱.۱): «در حال تأیید پرداخت...» while the payment settles, then its

View File

@ -1,3 +1,7 @@
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap
// adds to i18n when this module loads, whichever module Next loads first (0055).
import '../../../../bootstrap/bootstrap.server';
import { FlexBox } from '@lumina/island/atoms/flex-box'; import { FlexBox } from '@lumina/island/atoms/flex-box';
import { MobileTopBar } from '@lumina/market/app/navigation'; import { MobileTopBar } from '@lumina/market/app/navigation';
import { import {
@ -10,12 +14,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('terms:meta-title'),
title: i18n.t('terms:meta-title'), description: i18n.t('terms:meta-description'),
description: i18n.t('terms:meta-description'), };
};
}
/** /**
* «شرایط اشتراک» on mobile (S5 ۱.۱): a task page pushed from checkout, a suspended card or the * «شرایط اشتراک» on mobile (S5 ۱.۱): a task page pushed from checkout, a suspended card or the

View File

@ -1,3 +1,7 @@
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap
// adds to i18n when this module loads, whichever module Next loads first (0055).
import '../../bootstrap/bootstrap.server';
import { Element } from '@lumina/island/primitives/element'; import { Element } from '@lumina/island/primitives/element';
import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect'; import { LandingRedirect } from '@lumina/market/app/guards/landing-redirect';
import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq'; import { faqEntries } from '@lumina/market/app/screens/(landing)/organisms/landing-faq';
@ -22,12 +26,10 @@ import { i18n } from '../../i18n';
export const dynamic = 'force-static'; export const dynamic = 'force-static';
export const revalidate = 600; export const revalidate = 600;
export function generateMetadata(): Metadata { export const metadata: Metadata = landingMetadata({
return landingMetadata({ title: i18n.t('landing:meta.title'),
title: i18n.t('landing:meta.title'), description: i18n.t('landing:hero.lead'),
description: i18n.t('landing:hero.lead'), });
});
}
/** /**
* The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A * The landing, `/`: what Lumina is, for a signed-out visitor, and the way to registration. A

View File

@ -11,6 +11,7 @@ export default function Loading() {
<MobileTopBar <MobileTopBar
title={i18n.t('account:install.title')} title={i18n.t('account:install.title')}
parentHref={ROUTES.account.root} parentHref={ROUTES.account.root}
backToPrevious
/> />
<FlexBox tag="main" direction="flex-col" className="flex-1 p-4"> <FlexBox tag="main" direction="flex-col" className="flex-1 p-4">
<InstallAppSkeleton <InstallAppSkeleton

View File

@ -9,9 +9,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:install.title'), robots: { index: false } }; title: i18n.t('account:install.title'),
} robots: { index: false },
};
/** /**
* نصب اپلیکیشن on mobile (J12-4): pushed from حساب کاربری, back · title · support, with the nav * نصب اپلیکیشن on mobile (J12-4): pushed from حساب کاربری, back · title · support, with the nav
@ -25,6 +26,7 @@ export default function InstallPage() {
<MobileTopBar <MobileTopBar
title={i18n.t('account:install.title')} title={i18n.t('account:install.title')}
parentHref={ROUTES.account.root} parentHref={ROUTES.account.root}
backToPrevious
/> />
<FlexBox tag="main" direction="flex-col" className="flex-1 p-4"> <FlexBox tag="main" direction="flex-col" className="flex-1 p-4">
<AuthGuard <AuthGuard

View File

@ -11,12 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:notifications.title'),
title: i18n.t('account:notifications.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* تنظیمات اعلان‌ها on mobile (J12-3, J12-3b): pushed from حساب کاربری, back · title · support, * تنظیمات اعلان‌ها on mobile (J12-3, J12-3b): pushed from حساب کاربری, back · title · support,

View File

@ -10,12 +10,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('account:title'),
title: i18n.t('account:title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* حساب کاربری on mobile (J12-1, J12-1b): a page pushed from the bar's avatar, back · title · * حساب کاربری on mobile (J12-1, J12-1b): a page pushed from the bar's avatar, back · title ·

View File

@ -5,9 +5,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { AnalystsTemplate } from './templates/analysts-template'; import { AnalystsTemplate } from './templates/analysts-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:analysts.title'), robots: { index: false } }; title: i18n.t('home:analysts.title'),
} robots: { index: false },
};
/** /**
* «تحلیلگران منتخب», `/analysts` (J04-3): every featured analyst, read on the server, the same for * «تحلیلگران منتخب», `/analysts` (J04-3): every featured analyst, read on the server, the same for

View File

@ -15,6 +15,9 @@ import { ChannelTemplate } from './templates/channel-template';
type ChannelPageProps = { params: Promise<{ username: string }> }; type ChannelPageProps = { params: Promise<{ username: string }> };
// The one kind of route whose metadata names its data (0055): it reads through the same per-request
// cache as the page, so the first byte, held for the metadata in <head> (0054), waits for that
// one read.
export async function generateMetadata({ export async function generateMetadata({
params, params,
}: ChannelPageProps): Promise<Metadata> { }: ChannelPageProps): Promise<Metadata> {

View File

@ -33,6 +33,9 @@ async function readPostPage(username: string, id: string) {
return { channel: channel.data, post: found }; return { channel: channel.data, post: found };
} }
// The one kind of route whose metadata names its data (0055): it reads through the same per-request
// cache as the page, so the first byte, held for the metadata in <head> (0054), waits for that
// one read.
export async function generateMetadata({ export async function generateMetadata({
params, params,
}: PostPageProps): Promise<Metadata> { }: PostPageProps): Promise<Metadata> {

View File

@ -28,6 +28,7 @@ export function PostTemplate({
title={t('top-bar.post')} title={t('top-bar.post')}
previewTitle={i18n.t('content:preview.title')} previewTitle={i18n.t('content:preview.title')}
parentHref={ROUTES.channel(channel.username)} parentHref={ROUTES.channel(channel.username)}
backToPrevious
/> />
<FlexBox tag="main" direction="flex-col" className="flex-1"> <FlexBox tag="main" direction="flex-col" className="flex-1">
{channel.suspended ? ( {channel.suspended ? (

View File

@ -21,12 +21,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:finance.meta-title'),
title: i18n.t('dashboard:finance.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › مالی (brief §4; C19, C20), in this order, 16px apart: when payouts are made (the same * داشبورد › مالی (brief §4; C19, C20), in this order, 16px apart: when payouts are made (the same

View File

@ -19,12 +19,10 @@ import { Suspense } from 'react';
import { clientEnv } from '../../../../../env'; import { clientEnv } from '../../../../../env';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:plans.meta-title'),
title: i18n.t('dashboard:plans.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مخاطبان», * داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مخاطبان»,

View File

@ -7,12 +7,10 @@ import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:tab.meta-title'),
title: i18n.t('predictions:tab.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › پیش‌بینی‌ها (J10-3): the creator's record, open and recently closed predictions, in the * داشبورد › پیش‌بینی‌ها (J10-3): the creator's record, open and recently closed predictions, in the

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:following.meta-title'),
title: i18n.t('dashboard:following.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › دنبال‌شده‌ها (U8 §۴): the investor's own list, in the browser only, behind rows of the * داشبورد › دنبال‌شده‌ها (U8 §۴): the investor's own list, in the browser only, behind rows of the

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:subscriptions.meta-title'),
title: i18n.t('dashboard:subscriptions.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › اشتراک‌ها (U2, U11): the investor's own subscriptions, in the browser only, behind * داشبورد › اشتراک‌ها (U2, U11): the investor's own subscriptions, in the browser only, behind

View File

@ -7,12 +7,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('dashboard:transactions.meta-title'),
title: i18n.t('dashboard:transactions.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* داشبورد › تراکنش‌ها (U4): the investor's own payments, in the browser only, behind rows of the * داشبورد › تراکنش‌ها (U4): the investor's own payments, in the browser only, behind rows of the

View File

@ -11,12 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('predictions:list.title'),
title: i18n.t('predictions:list.title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* «همه پیش‌بینی‌ها» on mobile (J10-3f, J10-3g): a page pushed from the پیش‌بینی‌ها tab, back · * «همه پیش‌بینی‌ها» on mobile (J10-3f, J10-3g): a page pushed from the پیش‌بینی‌ها tab, back ·

View File

@ -11,9 +11,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { HomeTemplate } from './templates/home-template'; import { HomeTemplate } from './templates/home-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:meta.title'), robots: { index: false } }; title: i18n.t('home:meta.title'),
} robots: { index: false },
};
/** /**
* خانه, `/feed`: the investor's feed of the creators they follow, under the featured analysts' row, * خانه, `/feed`: the investor's feed of the creators they follow, under the featured analysts' row,

View File

@ -9,12 +9,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('notifications:title'),
title: i18n.t('notifications:title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* اعلان‌ها on mobile (U5 ۲.۱): a page pushed from the bell, back · «اعلان‌ها» · support, with the * اعلان‌ها on mobile (U5 ۲.۱): a page pushed from the bell, back · «اعلان‌ها» · support, with the

View File

@ -10,9 +10,10 @@ import { Suspense } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../i18n';
import { SearchTemplate } from './templates/search-template'; import { SearchTemplate } from './templates/search-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('home:search.title'), robots: { index: false } }; title: i18n.t('home:search.title'),
} robots: { index: false },
};
/** /**
* جستجو, `/search?q=` (J04-4): an investor's analyst search, in the browser only, behind the * جستجو, `/search?q=` (J04-4): an investor's analyst search, in the browser only, behind the

View File

@ -10,12 +10,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.meta-title'),
title: i18n.t('auth:register.profile.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Registration step 5 for a creator, on the session. The frame renders on the server; the step * Registration step 5 for a creator, on the session. The frame renders on the server; the step

View File

@ -11,12 +11,10 @@ import { i18n } from '../../../../../i18n';
import { AuthTopBar } from '../../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../../templates/auth-template'; import { AuthTemplate } from '../../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.done.meta-title'),
title: i18n.t('auth:register.profile.done.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* The end of registration for a creator (R2-CompleteProfile 1.8): the brand header, as * The end of registration for a creator (R2-CompleteProfile 1.8): the brand header, as

View File

@ -9,12 +9,10 @@ import { i18n } from '../../../../i18n';
import { AuthTopBar } from '../../../organisms/auth-top-bar'; import { AuthTopBar } from '../../../organisms/auth-top-bar';
import { AuthTemplate } from '../../../templates/auth-template'; import { AuthTemplate } from '../../../templates/auth-template';
export function generateMetadata(): Metadata { export const metadata: Metadata = {
return { title: i18n.t('auth:register.profile.meta-title'),
title: i18n.t('auth:register.profile.meta-title'), robots: { index: false },
robots: { index: false }, };
};
}
/** /**
* Registration step 5 for an investor, optional, on the session. The frame renders on the * Registration step 5 for an investor, optional, on the session. The frame renders on the

View File

@ -4,7 +4,7 @@ import '../styles/app.css';
import { CRITICAL_FONT_URL } from '@lumina/island/constants'; import { CRITICAL_FONT_URL } from '@lumina/island/constants';
import { Element } from '@lumina/island/primitives/element'; import { Element } from '@lumina/island/primitives/element';
import type { Metadata } from 'next'; import type { Metadata, Viewport } from 'next';
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
import { preload } from 'react-dom'; import { preload } from 'react-dom';
@ -12,9 +12,15 @@ import { rootMetadata } from '../configs';
import { i18n } from '../i18n'; import { i18n } from '../i18n';
import { AppProviders } from './organisms/app-providers'; import { AppProviders } from './organisms/app-providers';
export function generateMetadata(): Metadata { export const metadata: Metadata = rootMetadata();
return rootMetadata();
} // `maximumScale: 1` stops iOS Safari zooming into a focused field whose text is under 16px, such as
// SearchField's. iOS still lets people pinch-zoom; Android Chrome doesn't (0056).
export const viewport: Viewport = {
width: 'device-width',
initialScale: 1,
maximumScale: 1,
};
export default function RootLayout({ children }: { children: ReactNode }) { export default function RootLayout({ children }: { children: ReactNode }) {
// Only the face every page renders first; the Latin face loads where شبا is shown. // Only the face every page renders first; the Latin face loads where شبا is shown.

View File

@ -1,4 +1,4 @@
import { ROUTES } from '@lumina/market/app/navigation'; import { buildManifest } from '@lumina/market/server';
import type { MetadataRoute } from 'next'; import type { MetadataRoute } from 'next';
import { i18n } from '../i18n'; import { i18n } from '../i18n';
@ -6,43 +6,17 @@ import { i18n } from '../i18n';
// Every request renders fresh, as every metadata route does: nothing is cached on the server. // Every request renders fresh, as every metadata route does: nothing is cached on the server.
export const dynamic = 'force-dynamic'; export const dynamic = 'force-dynamic';
/** // Both apps serve this same manifest (0053). Browsers fetch it without cookies, so it speaks the
* The light theme's `--bg-page` and `--action-primary` in island `theme.css`. The manifest can't // app's one locale, and it is the same bytes until the next deploy, so it is built once, when the
* read CSS variables, so a change there changes these too. // module loads; each request only serializes it.
*/ const MANIFEST = buildManifest({
const BACKGROUND_COLOR = '#f4f6f9'; name: i18n.t('app.name'),
const THEME_COLOR = '#533afd'; description: i18n.t('app.description'),
lang: i18n.language,
dir: i18n.dir(),
});
/** /** The web app manifest at `/manifest.webmanifest`; Next.js adds its `<link rel="manifest">`. */
* The web app manifest, at `/manifest.webmanifest`. Browsers fetch it without cookies, so it uses
* the app's one locale. The installed app opens on خانه, which sends a guest to login and a creator
* to their channel, so it never flashes the landing; `id` keeps the installed app's identity if
* `start_url` changes.
*/
export default function manifest(): MetadataRoute.Manifest { export default function manifest(): MetadataRoute.Manifest {
const name = i18n.t('app.name'); return MANIFEST;
return {
id: '/',
name,
short_name: name,
description: i18n.t('app.description'),
lang: i18n.language,
dir: i18n.dir(),
start_url: ROUTES.home,
scope: '/',
display: 'standalone',
background_color: BACKGROUND_COLOR,
theme_color: THEME_COLOR,
// Placeholders until the brand mark exists; apple-icon.png beside this file covers iOS.
icons: [
{ src: '/pwa/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/pwa/icon-512.png', sizes: '512x512', type: 'image/png' },
{
src: '/pwa/icon-maskable-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
};
} }