Compare commits

..

19 Commits

Author SHA1 Message Date
Amiram_se be57684dbf Merge branch 'feat/pre-launch-4-overview' into main
The analyst's overview tab, the subscriber list and the step 2 fixes: the
5-digit sign-in code, range signals, one signal list before results are
released and the consent at registration step 5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 02:14:49 +04:00
Amiram_se 1b8d1df265 feat(dashboard): finish the overview tab and document it
Keeps tile tips on the label's line, moves the share button under the banner
text on a phone, and records the new default tab, the overview and the
subscriber list in the decisions and page docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:19:20 +04:00
Amiram_se d56064fa2e feat(dashboard): list subscribers and clean the plans tab
The plans tab loses «مخاطبان», whose figures now live on the overview, and
shows the soonest-ending subscribers instead. /dashboard/subscribers lists them
all with «همه» and «در حال انقضا»; notifications may now open it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:10:36 +04:00
Amiram_se 935d59dab8 feat(dashboard): welcome a new analyst on the overview tab
With no audience and no income yet, the figures stay at zero and a banner
offers to share the channel, through the caption sheet the channel's own share
uses. A channel that isn't public yet says why it can't be shared.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:08:35 +04:00
Amiram_se 7f4f393ba0 feat(dashboard): summarise signal performance on the overview tab
The four numbers and the way to a public record, from the snapshot the
signals tab reads, so the two can't disagree. Before the first evaluation it
shows the same message in their place, never zeros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:07:25 +04:00
Amiram_se 0ed3578565 feat(dashboard): split the overview by plan
«تفکیک طرح‌ها» draws one bar per plan by active subscribers, every purchase
or income, with count and share. A refunded plan's negative income takes no
share from the others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:07:15 +04:00
Amiram_se c6da027450 feat(dashboard): show audience and income on the overview tab
Followers, active subscribers and those ending within a week, then total,
this Shamsi month's and payable income, with their links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:06:19 +04:00
Amiram_se 33321c2e65 feat(dashboard): add the overview tab as the analyst's default
Adds /dashboard/overview to both apps, with its read of the API's overview
and subscriber list routes. The tab row is now «نمای کلی» · «طرح‌های اشتراک» ·
«سیگنال‌ها» · «مالی», and the nav's داشبورد opens it for a creator.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:05:24 +04:00
Amiram_se 96fb709505 fix(onboarding): require and send the consent at registration step 5
The API refuses the first profile completion without termsAccepted, and the
web app never sent it, so no analyst could finish registering. The box now
always shows, with or without a link, and completing sends the consent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:01:42 +04:00
Amiram_se f111ee033a fix(signals): list each signal once before results are released
Until results reach the analyst the API answers one list for every status
and no per-status totals, so the signals tab drew each signal under both
sections and the full list drew empty filter counts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:01:42 +04:00
Amiram_se 5daff15196 fix(signals): send the entry form when publishing a signal
Without entryType the API reads an exact entry, so every range signal from
the composer was refused with 422.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:01:42 +04:00
Amiram_se 5b8b8f4cd4 fix(auth): ask for the 5-digit code the API sends
The API sends a 5-digit sign-in code, but the code step drew six cells and
its validation wanted six digits, so nobody could sign in or register. The
admin panel keeps its 6-digit code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:01:42 +04:00
amiram_seify 8a9d1da081 Merge pull request 'feat/pre-launch-4-overview' (#1) from feat/pre-launch-4-overview into main
Reviewed-on: https://source.azchain.ir/amiram_seify/wealth/pulls/1
2026-11-02 17:24:43 +00:00
Amiram_se 69a76446d2 feat(dashboard): add the signal performance card to the signals tab
The tab reads GET /me/signal-stats instead of the track-record route: four
tiles, how signals ended, risk to reward as worst to best, and progress to a
public record, with tips on this tab only. Before the first nightly
evaluation a message replaces the numbers, never zeros. The tiles, progress
and pending state are shared organisms, ready for the overview tab.

The channel's split now reads «رسیده به هدف», «خورده به حد ضرر» and «پایان
مهلت», since those three counts no longer mean win, loss and breakeven.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:58:25 +04:00
Amiram_se e1ad6056fc feat(pricing): show the price floor in the editor, plans tab and admin settings
The editor reads the floor from the API, on the final price after any
discount, with the spec's hints and errors, and a tier the floor took off
sale stays editable through the 7-day lock. The plans tab marks those
tiers and links to the fix. Checkout, renew and reactivate handle 409
tier_unavailable. The admin panel gets «تنظیمات» with «کف قیمت اشتراک»: a
dry-run preview on a raise and a confirm with an audited reason. Removes
the stale esbuild key from the Vitest config.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:51:10 +04:00
Amiram_se cac4f8e229 feat(signals): add exact or range entry and required stop-loss to the composer
The composer asks for the entry as «قیمت دقیق», prefilled from the live
quote until edited, or «بازه», plus a required stop-loss, and checks the
levels against that entry on blur, on a direction change and on every
quote refresh. The confirm step sends what it showed. The signal card
shows a range with «بازه» and «ورود (بازه)», measures from its middle,
and shows «ریسک به ریوارد» as lower to higher ratio.

Every UI string now says «سیگنال» in place of «پیش‌بینی». Code identifiers
and routes stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:41:04 +04:00
Amiram_se 01c838e869 feat(legal): add rules caption, analyst agreement and re-acceptance gate
Reads the three legal documents from the API, so /terms and
/terms/subscription render in the browser under a (tabs) route group, and
adds /terms/analyst-agreement. The login and sign-up phone pages accept the
rules through a caption, the analyst sign-up requires the agreement and sends
its version, and a blocking gate opens from the session or a 403
agreement_required. Account rows and the rules_updated notification follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:28:42 +04:00
Amiram_se 684aa404f2 feat(island): add on-dark and following button variants
Follow controls use on-dark and following instead of secondary, on the
channel and in دنبال‌شده‌ها. Discovery shows a plain label for a followed
analyst and no longer offers unfollow. Adds Vitest and Testing Library,
the repo's first test runner, and the pre-launch plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 01:09:08 +04:00
Amiram_se 4ae62a96e1 feat(pwa): add iOS splash screens to bull and bear
The pwa lib lists every iPhone and iPad screen and builds a portrait and a
landscape startup image for each. Both apps' root metadata links the images
and adds apple-mobile-web-app-capable, which Next.js 16 no longer renders.
tools/generate-splash-screens.ts draws each app's icon on the manifest
background with next/og; run it again when the icon, the background or the
screen list changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:18:41 +04:00
528 changed files with 9457 additions and 2022 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,14 +1,6 @@
// First: the rules sheet reads a server-only namespace, which the server bootstrap adds to i18n
// when this module loads (0055).
import '../../../../../bootstrap/bootstrap.server';
import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset'; import { SkeletonPreset } from '@lumina/island/organisms/skeleton-preset';
import { GuestGuard } from '@lumina/market/app/guards/guest-guard'; import { GuestGuard } from '@lumina/market/app/guards/guest-guard';
import { ROUTES } from '@lumina/market/app/navigation'; import { ROUTES } from '@lumina/market/app/navigation';
import {
GeneralRules,
generalRulesLabels,
} from '@lumina/market/app/screens/organisms/general-rules';
import { RegisterDetailsStep } from '@lumina/market/app/screens/(auth)/auth/register/details/organisms/register-details-step'; import { RegisterDetailsStep } from '@lumina/market/app/screens/(auth)/auth/register/details/organisms/register-details-step';
import type { Metadata } from 'next'; import type { Metadata } from 'next';
@ -37,12 +29,6 @@ export default function RegisterDetailsPage() {
size="md" size="md"
supportPlacement="popover" supportPlacement="popover"
haltPlacement="modal" haltPlacement="modal"
rules={
<GeneralRules
layout="sheet"
labels={generalRulesLabels(i18n.getFixedT(null, 'rules'))}
/>
}
/> />
</GuestGuard> </GuestGuard>
</AuthTemplate> </AuthTemplate>

View File

@ -13,7 +13,7 @@ export const metadata: Metadata = {
}; };
/** /**
* «پیش‌بینی جدید» 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
* only. From a page, the `@modal` slot opens it as a dialog over that page instead (0023). * only. From a page, the `@modal` slot opens it as a dialog over that page instead (0023).
*/ */
export default function ComposePredictionPage() { export default function ComposePredictionPage() {

View File

@ -1,6 +1,6 @@
// First: the static `metadata` below reads a server-only namespace, which the server bootstrap // 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). // adds to i18n when this module loads, whichever module Next loads first (0055).
import '../../../bootstrap/bootstrap.server'; import '../../../../bootstrap/bootstrap.server';
import { FlexBox } from '@lumina/island/atoms/flex-box'; import { FlexBox } from '@lumina/island/atoms/flex-box';
import { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation'; import { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation';
@ -8,7 +8,7 @@ import { RulesTabs } from '@lumina/market/app/screens/(flow)/terms/organisms/rul
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
import { i18n } from '../../../i18n'; import { i18n } from '../../../../i18n';
// Only the landing is indexed (0071); both tabs inherit this. // Only the landing is indexed (0071); both tabs inherit this.
export const metadata: Metadata = { export const metadata: Metadata = {
@ -18,8 +18,8 @@ export const metadata: Metadata = {
}; };
/** /**
* «قوانین لومینا» on desktop (G-2r): the 640 column under the header, with back beside the title * «قوانین و مقررات لومینا» on desktop (G-2r): the 640 column under the header, with back beside the title
* «قوانین لومینا» and the tab row «قوانین عمومی» · «شرایط اشتراک»; each tab's text sits in a panel. * «قوانین و مقررات لومینا» and the tab row «قوانین و مقررات» · «شرایط اشتراک»; each tab's text sits in a panel.
* Each tab is its own route with its own loading, so the title and the row stay while one loads; * Each tab is its own route with its own loading, so the title and the row stay while one loads;
* back returns to where the rules were opened. No nav item is active. * back returns to where the rules were opened. No nav item is active.
*/ */

View File

@ -1,9 +1,9 @@
import { Skeleton, SkeletonRegion } from '@lumina/island/atoms/skeleton'; import { Skeleton, SkeletonRegion } from '@lumina/island/atoms/skeleton';
import { Card } from '@lumina/island/molecules/card'; import { Card } from '@lumina/island/molecules/card';
import { i18n } from '../../../i18n'; import { i18n } from '../../../../i18n';
/** «قوانین عمومی» before it arrives, under the section's title and tabs: its panel of lines. */ /** «قوانین و مقررات» before it arrives, under the section's title and tabs: its panel of lines. */
export default function Loading() { export default function Loading() {
return ( return (
<SkeletonRegion delayed label={i18n.t('rules:meta-title')}> <SkeletonRegion delayed label={i18n.t('rules:meta-title')}>

View File

@ -0,0 +1,23 @@
// 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 { Card } from '@lumina/island/molecules/card';
import { LegalDocumentView } from '@lumina/market/app/screens/organisms/legal-document';
import type { Metadata } from 'next';
import { i18n } from '../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('rules:meta-title'),
description: i18n.t('rules:meta-description'),
};
/** «قوانین و مقررات», the first tab of «قوانین و مقررات لومینا» (G-2r); its text is read in the browser (0070). */
export default function RulesPage() {
return (
<Card padding="lg">
<LegalDocumentView documentKey="platform_rules" layout="desktop" />
</Card>
);
}

View File

@ -1,7 +1,7 @@
import { Skeleton, SkeletonRegion } from '@lumina/island/atoms/skeleton'; import { Skeleton, SkeletonRegion } from '@lumina/island/atoms/skeleton';
import { Card } from '@lumina/island/molecules/card'; import { Card } from '@lumina/island/molecules/card';
import { i18n } from '../../../../i18n'; import { i18n } from '../../../../../i18n';
/** The terms before they arrive, under the section's title and tabs: their panel of lines. */ /** The terms before they arrive, under the section's title and tabs: their panel of lines. */
export default function Loading() { export default function Loading() {

View File

@ -0,0 +1,23 @@
// 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 { Card } from '@lumina/island/molecules/card';
import { SubscriptionTerms } from '@lumina/market/app/screens/(flow)/terms/subscription/organisms/subscription-terms';
import type { Metadata } from 'next';
import { i18n } from '../../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('terms:meta-title'),
description: i18n.t('terms:meta-description'),
};
/** «شرایط اشتراک», the second tab of «قوانین و مقررات لومینا» (S5, G-2); its text is read in the browser (0070). */
export default function SubscriptionTermsPage() {
return (
<Card padding="lg">
<SubscriptionTerms layout="desktop" />
</Card>
);
}

View File

@ -0,0 +1,44 @@
// 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 { DesktopHeader, DesktopPageTitle } from '@lumina/market/app/navigation';
import type { Metadata } from 'next';
import type { ReactNode } from 'react';
import { i18n } from '../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('rules:agreement.meta-title'),
robots: { index: false },
};
/** «توافق‌نامه تحلیلگر» on desktop: the 640 column under the header, with back beside the title. */
export default function AnalystAgreementLayout({
children,
}: {
children: ReactNode;
}) {
const t = i18n.getFixedT(null, 'rules');
return (
<FlexBox direction="flex-col" className="min-h-dvh bg-bg-page">
<DesktopHeader />
<FlexBox
tag="main"
justifyContent="justify-center"
className="px-8 py-10"
>
<FlexBox
direction="flex-col"
gap="gap-4"
className="w-full max-w-content"
>
<DesktopPageTitle title={t('agreement.title')} />
{children}
</FlexBox>
</FlexBox>
</FlexBox>
);
}

View File

@ -0,0 +1,8 @@
import { LegalDocumentSkeleton } from '@lumina/market/app/screens/organisms/legal-document';
import { i18n } from '../../../../i18n';
/** The agreement before it arrives, under the page's bar or title. */
export default function Loading() {
return <LegalDocumentSkeleton label={i18n.t('legal:document.loading')} />;
}

View File

@ -0,0 +1,22 @@
import { Card } from '@lumina/island/molecules/card';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import { AnalystAgreement } from '@lumina/market/app/screens/(flow)/terms/analyst-agreement/organisms/analyst-agreement';
import { LegalDocumentSkeleton } from '@lumina/market/app/screens/organisms/legal-document';
import { i18n } from '../../../../i18n';
/** The agreement and the analyst's own record; both read in the browser (0070). Analysts only. */
export default function AnalystAgreementPage() {
return (
<AuthGuard
role="creator"
fallback={
<LegalDocumentSkeleton label={i18n.t('legal:document.loading')} />
}
>
<Card padding="lg">
<AnalystAgreement layout="desktop" />
</Card>
</AuthGuard>
);
}

View File

@ -1,29 +0,0 @@
// 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 { Card } from '@lumina/island/molecules/card';
import {
GeneralRules,
generalRulesLabels,
} from '@lumina/market/app/screens/organisms/general-rules';
import type { Metadata } from 'next';
import { i18n } from '../../../i18n';
export const metadata: Metadata = {
title: i18n.t('rules:meta-title'),
description: i18n.t('rules:meta-description'),
};
/** «قوانین عمومی», the first tab of «قوانین لومینا» on desktop (G-2r): the text in a panel. */
export default function GeneralRulesPage() {
return (
<Card padding="lg">
<GeneralRules
layout="desktop"
labels={generalRulesLabels(i18n.getFixedT(null, 'rules'))}
/>
</Card>
);
}

View File

@ -1,41 +0,0 @@
// 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 { Card } from '@lumina/island/molecules/card';
import {
SubscriptionTerms,
subscriptionTermsLabels,
} from '@lumina/market/app/screens/(flow)/terms/subscription/organisms/subscription-terms';
import { supportChatUrls } from '@lumina/market/app/screens/organisms/support-entry';
import { getEnv } from '@lumina/market/env';
import type { Metadata } from 'next';
import { i18n } from '../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('terms:meta-title'),
description: i18n.t('terms:meta-description'),
};
/**
* «شرایط اشتراک», the second tab of «قوانین لومینا» on desktop (S5 ۲.۱, G-2): the text in a panel
* of the section's 640 column, about 75 characters a line; the title and tabs come from the layout.
*/
export default function SubscriptionTermsPage() {
const labels = subscriptionTermsLabels(
i18n.getFixedT(null, 'terms'),
i18n.getFixedT(null, 'auth'),
getEnv().supportHours,
);
return (
<Card padding="lg">
<SubscriptionTerms
layout="desktop"
chats={supportChatUrls()}
labels={labels}
/>
</Card>
);
}

View File

@ -5,7 +5,7 @@ import {
} from '@lumina/market/app/screens/(flow)/compose/prediction/organisms/prediction-composer'; } from '@lumina/market/app/screens/(flow)/compose/prediction/organisms/prediction-composer';
/** /**
* «پیش‌بینی جدید» opened from a main page (J09-1-D, 0023): the 960px composer dialog over that * «سیگنال جدید» opened from a main page (J09-1-D, 0023): the 960px composer dialog over that
* page, the URL /compose/prediction; a direct load of that URL gets the full page instead. In the * page, the URL /compose/prediction; a direct load of that URL gets the full page instead. In the
* browser only: the dialog's skeleton until the viewer is known, then the composer for a creator * browser only: the dialog's skeleton until the viewer is known, then the composer for a creator
* who may publish, why not for one who may not, or the no-access state for anyone else. * who may publish, why not for one who may not, or the no-access state for anyone else.

View File

@ -8,7 +8,7 @@ import { i18n } from '../../../../i18n';
/** /**
* The creator's داشبورد on desktop (Creator Dashboard ۵.۱): the 640 column under the header, with * The creator's داشبورد on desktop (Creator Dashboard ۵.۱): the 640 column under the header, with
* the «داشبورد» heading, the three tabs «طرح‌های اشتراک» · «پیش‌بینی‌ها» · «مالی», then the tab. Each tab is its own * the «داشبورد» heading, the four tabs «نمای کلی» · «طرح‌های اشتراک» · «سیگنال‌ها» · «مالی», then the tab. Each tab is its own
* route with its own loading, so the heading and the tabs stay while one loads. Locked until * route with its own loading, so the heading and the tabs stay while one loads. Locked until
* registration step 5 is done (0016). * registration step 5 is done (0016).
*/ */

View File

@ -0,0 +1,14 @@
import { DashboardOverviewSkeleton } from '@lumina/market/app/screens/(main)/dashboard/overview/organisms/dashboard-overview';
import { i18n } from '../../../../../i18n';
/** نمای کلی before it arrives; the layout keeps the bar and the tabs. */
export default function Loading() {
return (
<DashboardOverviewSkeleton
layout="desktop"
label={i18n.t('dashboard:overview.loading')}
delayed
/>
);
}

View File

@ -0,0 +1,42 @@
import { PartBoundary } from '@lumina/market/app/error-boundaries';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import {
DashboardOverview,
DashboardOverviewSkeleton,
} from '@lumina/market/app/screens/(main)/dashboard/overview/organisms/dashboard-overview';
import type { Metadata } from 'next';
import { Suspense } from 'react';
import { i18n } from '../../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('dashboard:overview.meta-title'),
robots: { index: false },
};
/**
* داشبورد › نمای کلی (J10-0), the creator's default tab: audience, income, the split by plan and
* the signals' summary, the creator's own, in the browser only. The tabs stay while it loads.
*/
export default function OverviewPage() {
const skeleton = (
<DashboardOverviewSkeleton
layout="desktop"
label={i18n.t('dashboard:overview.loading')}
/>
);
return (
<AuthGuard role="creator" fallback={skeleton}>
<PartBoundary
name="dashboard-overview"
description={i18n.t('dashboard:overview.error')}
framed
>
<Suspense fallback={skeleton}>
<DashboardOverview layout="desktop" />
</Suspense>
</PartBoundary>
</AuthGuard>
);
}

View File

@ -1,7 +1,7 @@
import { FlexBox } from '@lumina/island/atoms/flex-box'; import { FlexBox } from '@lumina/island/atoms/flex-box';
import { AudienceStatsSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/audience-stats';
import { InviteCodeCardSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/invite-code-card'; import { InviteCodeCardSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/invite-code-card';
import { PricingCardSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/pricing-card'; import { PricingCardSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/pricing-card';
import { SubscribersPreviewSkeleton } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/subscribers-preview';
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
@ -19,8 +19,8 @@ export default function Loading() {
label={i18n.t('dashboard:invite.loading')} label={i18n.t('dashboard:invite.loading')}
delayed delayed
/> />
<AudienceStatsSkeleton <SubscribersPreviewSkeleton
label={i18n.t('dashboard:audience.loading')} label={i18n.t('dashboard:subscribers.loading')}
delayed delayed
/> />
</FlexBox> </FlexBox>

View File

@ -1,10 +1,6 @@
import { FlexBox } from '@lumina/island/atoms/flex-box'; import { FlexBox } from '@lumina/island/atoms/flex-box';
import { PartBoundary } from '@lumina/market/app/error-boundaries'; import { PartBoundary } from '@lumina/market/app/error-boundaries';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard'; import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import {
AudienceStats,
AudienceStatsSkeleton,
} from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/audience-stats';
import { import {
InviteCodeCard, InviteCodeCard,
InviteCodeCardSkeleton, InviteCodeCardSkeleton,
@ -13,6 +9,10 @@ import {
PricingCard, PricingCard,
PricingCardSkeleton, PricingCardSkeleton,
} from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/pricing-card'; } from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/pricing-card';
import {
SubscribersPreview,
SubscribersPreviewSkeleton,
} from '@lumina/market/app/screens/(main)/dashboard/plans/organisms/subscribers-preview';
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import { Suspense } from 'react'; import { Suspense } from 'react';
@ -25,7 +25,7 @@ export const metadata: Metadata = {
}; };
/** /**
* داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مخاطبان», * داشبورد › طرح‌های اشتراک (J10-1): «قیمت طرح‌ها», «کد دعوت» (only once approved) and «مشترکان»,
* the creator's own, in the browser only. Each block loads and fails on its own; the tabs stay. * the creator's own, in the browser only. Each block loads and fails on its own; the tabs stay.
*/ */
export default function PlansPage() { export default function PlansPage() {
@ -41,8 +41,10 @@ export default function PlansPage() {
label={i18n.t('dashboard:invite.loading')} label={i18n.t('dashboard:invite.loading')}
/> />
); );
const audienceSkeleton = ( const subscribersSkeleton = (
<AudienceStatsSkeleton label={i18n.t('dashboard:audience.loading')} /> <SubscribersPreviewSkeleton
label={i18n.t('dashboard:subscribers.loading')}
/>
); );
return ( return (
@ -52,7 +54,7 @@ export default function PlansPage() {
<FlexBox direction="flex-col" gap="gap-4"> <FlexBox direction="flex-col" gap="gap-4">
{pricingSkeleton} {pricingSkeleton}
{inviteSkeleton} {inviteSkeleton}
{audienceSkeleton} {subscribersSkeleton}
</FlexBox> </FlexBox>
} }
> >
@ -79,12 +81,12 @@ export default function PlansPage() {
</Suspense> </Suspense>
</PartBoundary> </PartBoundary>
<PartBoundary <PartBoundary
name="audience-stats" name="subscribers-preview"
description={i18n.t('dashboard:audience.error')} description={i18n.t('dashboard:subscribers.error')}
framed framed
> >
<Suspense fallback={audienceSkeleton}> <Suspense fallback={subscribersSkeleton}>
<AudienceStats /> <SubscribersPreview />
</Suspense> </Suspense>
</PartBoundary> </PartBoundary>
</FlexBox> </FlexBox>

View File

@ -2,7 +2,7 @@ import { PredictionsTabSkeleton } from '@lumina/market/app/screens/(main)/dashbo
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
/** پیش‌بینی‌ها before it arrives, block for block; the layout keeps the bar and the tabs. */ /** سیگنال‌ها before it arrives, block for block; the layout keeps the bar and the tabs. */
export default function Loading() { export default function Loading() {
return ( return (
<PredictionsTabSkeleton label={i18n.t('predictions:tab.loading')} delayed /> <PredictionsTabSkeleton label={i18n.t('predictions:tab.loading')} delayed />

View File

@ -13,7 +13,7 @@ export const metadata: Metadata = {
}; };
/** /**
* داشبورد › پیش‌بینی‌ها (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
* browser only. Each block loads and fails on its own; the tabs stay. * browser only. Each block loads and fails on its own; the tabs stay.
*/ */
export default function PredictionsPage() { export default function PredictionsPage() {

View File

@ -4,7 +4,7 @@ import { PredictionListSkeleton } from '@lumina/market/app/screens/(main)/dashbo
import { i18n } from '../../../../../i18n'; import { i18n } from '../../../../../i18n';
/** «همه پیش‌بینی‌ها» before it arrives, under its real title. */ /** «همه سیگنال‌ها» before it arrives, under its real title. */
export default function Loading() { export default function Loading() {
return ( return (
<FlexBox tag="main" justifyContent="justify-center" className="px-8 py-10"> <FlexBox tag="main" justifyContent="justify-center" className="px-8 py-10">

View File

@ -17,8 +17,8 @@ export const metadata: Metadata = {
}; };
/** /**
* «همه پیش‌بینی‌ها» 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
* back to the پیش‌بینی‌ها tab. The creator's own, in the browser only. * back to the سیگنال‌ها tab. The creator's own, in the browser only.
*/ */
export default function PredictionListPage() { export default function PredictionListPage() {
const skeleton = ( const skeleton = (

View File

@ -0,0 +1,3 @@
// Locked until a creator finishes registration step 5 (0016), as the tab is; the guard renders
// the page as is.
export { OnboardingGuard as default } from '@lumina/market/app/guards/onboarding-guard';

View File

@ -0,0 +1,27 @@
import { FlexBox } from '@lumina/island/atoms/flex-box';
import { DesktopPageTitle, ROUTES } from '@lumina/market/app/navigation';
import { SubscriberListSkeleton } from '@lumina/market/app/screens/(main)/dashboard/subscribers/organisms/subscriber-list';
import { i18n } from '../../../../i18n';
/** «مشترکان» before it arrives, under its real title. */
export default function Loading() {
return (
<FlexBox tag="main" justifyContent="justify-center" className="px-8 py-10">
<FlexBox
direction="flex-col"
gap="gap-4"
className="w-full max-w-content"
>
<DesktopPageTitle
title={i18n.t('dashboard:subscribers.title')}
parentHref={ROUTES.dashboard.overview}
/>
<SubscriberListSkeleton
label={i18n.t('dashboard:subscribers.loading')}
delayed
/>
</FlexBox>
</FlexBox>
);
}

View File

@ -0,0 +1,53 @@
import { FlexBox } from '@lumina/island/atoms/flex-box';
import { PartBoundary } from '@lumina/market/app/error-boundaries';
import { AuthGuard } from '@lumina/market/app/guards/auth-guard';
import { DesktopPageTitle, ROUTES } from '@lumina/market/app/navigation';
import {
SubscriberList,
SubscriberListSkeleton,
} from '@lumina/market/app/screens/(main)/dashboard/subscribers/organisms/subscriber-list';
import type { Metadata } from 'next';
import { Suspense } from 'react';
import { i18n } from '../../../../i18n';
export const metadata: Metadata = {
title: i18n.t('dashboard:subscribers.meta-title'),
robots: { index: false },
};
/**
* «مشترکان» on desktop (J10-1f, J10-1g): the same list in the 640 column, «بازگشت» over its title
* back to نمای کلی. The creator's own, in the browser only.
*/
export default function SubscribersPage() {
const skeleton = (
<SubscriberListSkeleton label={i18n.t('dashboard:subscribers.loading')} />
);
return (
<FlexBox tag="main" justifyContent="justify-center" className="px-8 py-10">
<FlexBox
direction="flex-col"
gap="gap-4"
className="w-full max-w-content"
>
<DesktopPageTitle
title={i18n.t('dashboard:subscribers.title')}
parentHref={ROUTES.dashboard.overview}
/>
<PartBoundary
name="subscriber-list"
description={i18n.t('dashboard:subscribers.error')}
framed
>
<AuthGuard role="creator" fallback={skeleton}>
<Suspense fallback={skeleton}>
<SubscriberList />
</Suspense>
</AuthGuard>
</PartBoundary>
</FlexBox>
</FlexBox>
);
}

View File

@ -12,7 +12,7 @@ import type { AppProvidersProps } from './types';
/** The app's root client component: runs the client bootstrap, then the platform's shell. */ /** The app's root client component: runs the client bootstrap, then the platform's shell. */
export function AppProviders({ children }: AppProvidersProps) { export function AppProviders({ children }: AppProvidersProps) {
return ( return (
<AppShell queryClient={getQueryClient()} i18n={i18n}> <AppShell queryClient={getQueryClient()} i18n={i18n} layout="desktop">
{children} {children}
</AppShell> </AppShell>
); );

View File

@ -9,6 +9,7 @@ import {
AUTH_EVENTS, AUTH_EVENTS,
endSuspendedSession, endSuspendedSession,
isSessionSuspended, isSessionSuspended,
noteAgreementRequired,
suspendedSessionOf, suspendedSessionOf,
} from '@lumina/market/features/auth'; } from '@lumina/market/features/auth';
@ -45,6 +46,7 @@ http.configure({
http.interceptors.response.use(undefined, (error) => { http.interceptors.response.use(undefined, (error) => {
const suspension = suspendedSessionOf(error); const suspension = suspendedSessionOf(error);
if (suspension) endSuspendedSession(suspension); if (suspension) endSuspendedSession(suspension);
noteAgreementRequired(error);
return error; return error;
}); });
configureErrorHandler(ERROR_HANDLER_CONFIG); configureErrorHandler(ERROR_HANDLER_CONFIG);

View File

@ -1,12 +1,17 @@
import { APPLE_WEB_APP } from '@lumina/market/server';
import type { Metadata } from 'next'; import type { Metadata } from 'next';
import { clientEnv } from '../env'; import { clientEnv } from '../env';
import { i18n } from '../i18n'; import { i18n } from '../i18n';
/** The root metadata: the brand as the title template, and absolute URLs from the site address. */ /**
* The root metadata: the brand as the title template, absolute URLs from the site address, and
* iOS's splash screens.
*/
export function rootMetadata(): Metadata { export function rootMetadata(): Metadata {
const name = i18n.t('app.name'); const name = i18n.t('app.name');
return { return {
...APPLE_WEB_APP,
metadataBase: new URL(clientEnv.NEXT_PUBLIC_SITE_URL), metadataBase: new URL(clientEnv.NEXT_PUBLIC_SITE_URL),
title: { default: name, template: `%s · ${name}` }, title: { default: name, template: `%s · ${name}` },
description: i18n.t('app.description'), description: i18n.t('app.description'),

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Some files were not shown because too many files have changed in this diff Show More