@remit/web-client 0.0.331 → 0.0.333
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/auth/AccountMenu.js +1 -1
- package/dist/src/auth/BetterAuthShell.d.ts +12 -2
- package/dist/src/auth/BetterAuthShell.js +40 -7
- package/dist/src/auth/ResetPasswordPage.d.ts +12 -0
- package/dist/src/auth/ResetPasswordPage.js +98 -0
- package/dist/src/auth/auth-refusal.d.ts +10 -0
- package/dist/src/auth/auth-refusal.js +14 -0
- package/dist/src/auth/better-auth-config.js +4 -0
- package/dist/src/auth/provider.d.ts +1 -0
- package/dist/src/auth/session-state.d.ts +8 -3
- package/dist/src/auth/session-state.js +8 -3
- package/dist/src/components/settings/people/PeoplePanel.d.ts +1 -0
- package/dist/src/components/settings/people/PeoplePanel.js +72 -0
- package/dist/src/components/settings/people/PersonActionDialog.d.ts +11 -0
- package/dist/src/components/settings/people/PersonActionDialog.js +52 -0
- package/dist/src/components/settings/people/ResetLinkDialog.d.ts +11 -0
- package/dist/src/components/settings/people/ResetLinkDialog.js +23 -0
- package/dist/src/hooks/usePeople.d.ts +174 -0
- package/dist/src/hooks/usePeople.js +28 -0
- package/dist/src/hooks/usePersonAction.d.ts +17 -0
- package/dist/src/hooks/usePersonAction.js +60 -0
- package/dist/src/lib/error-classifier.d.ts +16 -4
- package/dist/src/lib/error-classifier.js +28 -7
- package/dist/src/lib/network-error.d.ts +8 -0
- package/dist/src/lib/network-error.js +12 -1
- package/dist/src/lib/people.d.ts +49 -0
- package/dist/src/lib/people.js +125 -0
- package/dist/src/lib/rum-adapter.js +4 -1
- package/dist/src/routeTree.gen.d.ts +29 -3
- package/dist/src/routeTree.gen.js +14 -0
- package/dist/src/routes/reset-password/$token.d.ts +5 -0
- package/dist/src/routes/reset-password/$token.js +10 -0
- package/dist/src/routes/settings/accounts.js +3 -2
- package/dist/src/routes/settings/advanced.js +3 -2
- package/dist/src/routes/settings/appearance.js +3 -2
- package/dist/src/routes/settings/calendars.js +3 -2
- package/dist/src/routes/settings/filters.js +3 -2
- package/dist/src/routes/settings/folders.js +3 -2
- package/dist/src/routes/settings/labels.js +3 -2
- package/dist/src/routes/settings/people.d.ts +1 -0
- package/dist/src/routes/settings/people.js +20 -0
- package/dist/src/routes/settings/senders.js +3 -2
- package/dist/src/routes/settings/warnings.js +3 -2
- package/dist/src/routes/settings.d.ts +5 -0
- package/dist/src/routes/settings.js +23 -1
- package/package.json +2 -2
|
@@ -11,6 +11,7 @@ import { Route as MailMailboxIdRouteImport } from './routes/mail/$mailboxId';
|
|
|
11
11
|
import { Route as MailBriefRouteImport } from './routes/mail/brief';
|
|
12
12
|
import { Route as MailFlaggedRouteImport } from './routes/mail/flagged';
|
|
13
13
|
import { Route as MailOutboxRouteImport } from './routes/mail/outbox';
|
|
14
|
+
import { Route as ResetPasswordTokenRouteImport } from './routes/reset-password/$token';
|
|
14
15
|
import { Route as SettingsIndexRouteImport } from './routes/settings/index';
|
|
15
16
|
import { Route as SettingsAccountsRouteImport } from './routes/settings/accounts';
|
|
16
17
|
import { Route as SettingsAdvancedRouteImport } from './routes/settings/advanced';
|
|
@@ -19,6 +20,7 @@ import { Route as SettingsCalendarsRouteImport } from './routes/settings/calenda
|
|
|
19
20
|
import { Route as SettingsFiltersRouteImport } from './routes/settings/filters';
|
|
20
21
|
import { Route as SettingsFoldersRouteImport } from './routes/settings/folders';
|
|
21
22
|
import { Route as SettingsLabelsRouteImport } from './routes/settings/labels';
|
|
23
|
+
import { Route as SettingsPeopleRouteImport } from './routes/settings/people';
|
|
22
24
|
import { Route as SettingsSendersRouteImport } from './routes/settings/senders';
|
|
23
25
|
import { Route as SettingsSuggestedVipsRouteImport } from './routes/settings/suggested-vips';
|
|
24
26
|
import { Route as SettingsWarningsRouteImport } from './routes/settings/warnings';
|
|
@@ -166,6 +168,7 @@ declare const MailOutboxRoute: import("@tanstack/router-core").Route<Register, i
|
|
|
166
168
|
}, import("zod/v4/core").$strip>, import("@tanstack/router-core").ResolveParams<"/mail">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, ({ context: { queryClient } }: import("@tanstack/router-core").LoaderFnContext<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/mail", import("@tanstack/router-core").ResolveParams<"/mail">, {}, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, unknown, undefined>) => void, unknown, unknown, unknown, unknown, undefined>, "/outbox", "/mail/outbox", "/mail/outbox", "/mail/outbox", import("zod").ZodObject<{
|
|
167
169
|
q: import("zod").ZodOptional<import("zod").ZodString>;
|
|
168
170
|
}, import("zod/v4/core").$strip>, import("@tanstack/router-core").ResolveParams<"/outbox">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
171
|
+
declare const ResetPasswordTokenRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/reset-password/$token", "/reset-password/$token", "/reset-password/$token", "/reset-password/$token", undefined, import("@tanstack/router-core").ResolveParams<"/reset-password/$token">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, () => never, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
169
172
|
declare const SettingsIndexRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/", "/settings/", "/settings/", "/settings/", undefined, import("@tanstack/router-core").ResolveParams<"/">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
170
173
|
declare const SettingsAccountsRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/accounts", "/settings/accounts", "/settings/accounts", "/settings/accounts", import("zod").ZodObject<{
|
|
171
174
|
editAccountId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
@@ -181,6 +184,7 @@ declare const SettingsCalendarsRoute: import("@tanstack/router-core").Route<Regi
|
|
|
181
184
|
declare const SettingsFiltersRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/filters", "/settings/filters", "/settings/filters", "/settings/filters", undefined, import("@tanstack/router-core").ResolveParams<"/filters">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
182
185
|
declare const SettingsFoldersRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/folders", "/settings/folders", "/settings/folders", "/settings/folders", undefined, import("@tanstack/router-core").ResolveParams<"/folders">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
183
186
|
declare const SettingsLabelsRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/labels", "/settings/labels", "/settings/labels", "/settings/labels", undefined, import("@tanstack/router-core").ResolveParams<"/labels">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
187
|
+
declare const SettingsPeopleRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/people", "/settings/people", "/settings/people", "/settings/people", undefined, import("@tanstack/router-core").ResolveParams<"/people">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
184
188
|
declare const SettingsSendersRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/senders", "/settings/senders", "/settings/senders", "/settings/senders", undefined, import("@tanstack/router-core").ResolveParams<"/senders">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
185
189
|
declare const SettingsSuggestedVipsRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/suggested-vips", "/settings/suggested-vips", "/settings/suggested-vips", "/settings/suggested-vips", undefined, import("@tanstack/router-core").ResolveParams<"/suggested-vips">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
186
190
|
declare const SettingsWarningsRoute: import("@tanstack/router-core").Route<Register, import("@tanstack/router-core").Route<Register, import("@tanstack/react-router").RootRoute<Register, undefined, import("./router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/warnings", "/settings/warnings", "/settings/warnings", "/settings/warnings", undefined, import("@tanstack/router-core").ResolveParams<"/warnings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -578,6 +582,7 @@ export interface FileRoutesByFullPath {
|
|
|
578
582
|
'/mail/brief': typeof MailBriefRouteWithChildren;
|
|
579
583
|
'/mail/flagged': typeof MailFlaggedRouteWithChildren;
|
|
580
584
|
'/mail/outbox': typeof MailOutboxRouteWithChildren;
|
|
585
|
+
'/reset-password/$token': typeof ResetPasswordTokenRoute;
|
|
581
586
|
'/settings/accounts': typeof SettingsAccountsRoute;
|
|
582
587
|
'/settings/advanced': typeof SettingsAdvancedRoute;
|
|
583
588
|
'/settings/appearance': typeof SettingsAppearanceRoute;
|
|
@@ -585,6 +590,7 @@ export interface FileRoutesByFullPath {
|
|
|
585
590
|
'/settings/filters': typeof SettingsFiltersRoute;
|
|
586
591
|
'/settings/folders': typeof SettingsFoldersRoute;
|
|
587
592
|
'/settings/labels': typeof SettingsLabelsRoute;
|
|
593
|
+
'/settings/people': typeof SettingsPeopleRoute;
|
|
588
594
|
'/settings/senders': typeof SettingsSendersRoute;
|
|
589
595
|
'/settings/suggested-vips': typeof SettingsSuggestedVipsRoute;
|
|
590
596
|
'/settings/warnings': typeof SettingsWarningsRoute;
|
|
@@ -628,6 +634,7 @@ export interface FileRoutesByTo {
|
|
|
628
634
|
'/': typeof IndexRoute;
|
|
629
635
|
'/import': typeof ImportRoute;
|
|
630
636
|
'/onboarding': typeof OnboardingRoute;
|
|
637
|
+
'/reset-password/$token': typeof ResetPasswordTokenRoute;
|
|
631
638
|
'/settings/accounts': typeof SettingsAccountsRoute;
|
|
632
639
|
'/settings/advanced': typeof SettingsAdvancedRoute;
|
|
633
640
|
'/settings/appearance': typeof SettingsAppearanceRoute;
|
|
@@ -635,6 +642,7 @@ export interface FileRoutesByTo {
|
|
|
635
642
|
'/settings/filters': typeof SettingsFiltersRoute;
|
|
636
643
|
'/settings/folders': typeof SettingsFoldersRoute;
|
|
637
644
|
'/settings/labels': typeof SettingsLabelsRoute;
|
|
645
|
+
'/settings/people': typeof SettingsPeopleRoute;
|
|
638
646
|
'/settings/senders': typeof SettingsSendersRoute;
|
|
639
647
|
'/settings/suggested-vips': typeof SettingsSuggestedVipsRoute;
|
|
640
648
|
'/settings/warnings': typeof SettingsWarningsRoute;
|
|
@@ -680,6 +688,7 @@ export interface FileRoutesById {
|
|
|
680
688
|
'/mail/brief': typeof MailBriefRouteWithChildren;
|
|
681
689
|
'/mail/flagged': typeof MailFlaggedRouteWithChildren;
|
|
682
690
|
'/mail/outbox': typeof MailOutboxRouteWithChildren;
|
|
691
|
+
'/reset-password/$token': typeof ResetPasswordTokenRoute;
|
|
683
692
|
'/settings/accounts': typeof SettingsAccountsRoute;
|
|
684
693
|
'/settings/advanced': typeof SettingsAdvancedRoute;
|
|
685
694
|
'/settings/appearance': typeof SettingsAppearanceRoute;
|
|
@@ -687,6 +696,7 @@ export interface FileRoutesById {
|
|
|
687
696
|
'/settings/filters': typeof SettingsFiltersRoute;
|
|
688
697
|
'/settings/folders': typeof SettingsFoldersRoute;
|
|
689
698
|
'/settings/labels': typeof SettingsLabelsRoute;
|
|
699
|
+
'/settings/people': typeof SettingsPeopleRoute;
|
|
690
700
|
'/settings/senders': typeof SettingsSendersRoute;
|
|
691
701
|
'/settings/suggested-vips': typeof SettingsSuggestedVipsRoute;
|
|
692
702
|
'/settings/warnings': typeof SettingsWarningsRoute;
|
|
@@ -728,10 +738,10 @@ export interface FileRoutesById {
|
|
|
728
738
|
}
|
|
729
739
|
export interface FileRouteTypes {
|
|
730
740
|
fileRoutesByFullPath: FileRoutesByFullPath;
|
|
731
|
-
fullPaths: '/' | '/calendar' | '/import' | '/mail' | '/onboarding' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar/' | '/mail/' | '/settings/' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/mail/$mailboxId/' | '/mail/brief/' | '/mail/flagged/' | '/mail/outbox/' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date/' | '/mail/$mailboxId/$threadId/' | '/mail/brief/$threadId/' | '/mail/flagged/$threadId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/';
|
|
741
|
+
fullPaths: '/' | '/calendar' | '/import' | '/mail' | '/onboarding' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/reset-password/$token' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/people' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar/' | '/mail/' | '/settings/' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/mail/$mailboxId/' | '/mail/brief/' | '/mail/flagged/' | '/mail/outbox/' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date/' | '/mail/$mailboxId/$threadId/' | '/mail/brief/$threadId/' | '/mail/flagged/$threadId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/';
|
|
732
742
|
fileRoutesByTo: FileRoutesByTo;
|
|
733
|
-
to: '/' | '/import' | '/onboarding' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar' | '/mail' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId';
|
|
734
|
-
id: '__root__' | '/' | '/calendar' | '/import' | '/mail' | '/onboarding' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar/' | '/mail/' | '/settings/' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/mail/$mailboxId/' | '/mail/brief/' | '/mail/flagged/' | '/mail/outbox/' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date/' | '/mail/$mailboxId/$threadId/' | '/mail/brief/$threadId/' | '/mail/flagged/$threadId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/';
|
|
743
|
+
to: '/' | '/import' | '/onboarding' | '/reset-password/$token' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/people' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar' | '/mail' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId';
|
|
744
|
+
id: '__root__' | '/' | '/calendar' | '/import' | '/mail' | '/onboarding' | '/settings' | '/mail/$mailboxId' | '/mail/brief' | '/mail/flagged' | '/mail/outbox' | '/reset-password/$token' | '/settings/accounts' | '/settings/advanced' | '/settings/appearance' | '/settings/calendars' | '/settings/filters' | '/settings/folders' | '/settings/labels' | '/settings/people' | '/settings/senders' | '/settings/suggested-vips' | '/settings/warnings' | '/calendar/' | '/mail/' | '/settings/' | '/calendar/$view/$date' | '/mail/$mailboxId/$threadId' | '/mail/brief/$threadId' | '/mail/flagged/$threadId' | '/mail/$mailboxId/' | '/mail/brief/' | '/mail/flagged/' | '/mail/outbox/' | '/calendar/$view/$date/$calendarObjectId' | '/calendar/$view/$date/new' | '/mail/$mailboxId/$threadId/$messageId' | '/mail/$mailboxId/compose/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId' | '/mail/brief/compose/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId' | '/mail/flagged/compose/{-$outboxMessageId}' | '/mail/outbox/compose/{-$outboxMessageId}' | '/mail/outbox/draft/$outboxMessageId' | '/calendar/$view/$date/' | '/mail/$mailboxId/$threadId/' | '/mail/brief/$threadId/' | '/mail/flagged/$threadId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId' | '/calendar/$view/$date/$calendarObjectId/edit' | '/calendar/$view/$date/suggestion/$suggestionId' | '/calendar/$view/$date/task/$calendarTaskId' | '/calendar/$view/$date/$calendarObjectId/' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/edit' | '/mail/$mailboxId/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/brief/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/mail/flagged/$threadId/$messageId/$mode/{-$outboxMessageId}' | '/calendar/$view/$date/$calendarObjectId/$recurrenceId/';
|
|
735
745
|
fileRoutesById: FileRoutesById;
|
|
736
746
|
}
|
|
737
747
|
export interface RootRouteChildren {
|
|
@@ -741,6 +751,7 @@ export interface RootRouteChildren {
|
|
|
741
751
|
MailRoute: typeof MailRouteWithChildren;
|
|
742
752
|
OnboardingRoute: typeof OnboardingRoute;
|
|
743
753
|
SettingsRoute: typeof SettingsRouteWithChildren;
|
|
754
|
+
ResetPasswordTokenRoute: typeof ResetPasswordTokenRoute;
|
|
744
755
|
}
|
|
745
756
|
declare module '@tanstack/react-router' {
|
|
746
757
|
interface FileRoutesByPath {
|
|
@@ -828,6 +839,13 @@ declare module '@tanstack/react-router' {
|
|
|
828
839
|
preLoaderRoute: typeof MailOutboxRouteImport;
|
|
829
840
|
parentRoute: typeof MailRoute;
|
|
830
841
|
};
|
|
842
|
+
'/reset-password/$token': {
|
|
843
|
+
id: '/reset-password/$token';
|
|
844
|
+
path: '/reset-password/$token';
|
|
845
|
+
fullPath: '/reset-password/$token';
|
|
846
|
+
preLoaderRoute: typeof ResetPasswordTokenRouteImport;
|
|
847
|
+
parentRoute: typeof rootRouteImport;
|
|
848
|
+
};
|
|
831
849
|
'/settings/': {
|
|
832
850
|
id: '/settings/';
|
|
833
851
|
path: '/';
|
|
@@ -884,6 +902,13 @@ declare module '@tanstack/react-router' {
|
|
|
884
902
|
preLoaderRoute: typeof SettingsLabelsRouteImport;
|
|
885
903
|
parentRoute: typeof SettingsRoute;
|
|
886
904
|
};
|
|
905
|
+
'/settings/people': {
|
|
906
|
+
id: '/settings/people';
|
|
907
|
+
path: '/people';
|
|
908
|
+
fullPath: '/settings/people';
|
|
909
|
+
preLoaderRoute: typeof SettingsPeopleRouteImport;
|
|
910
|
+
parentRoute: typeof SettingsRoute;
|
|
911
|
+
};
|
|
887
912
|
'/settings/senders': {
|
|
888
913
|
id: '/settings/senders';
|
|
889
914
|
path: '/senders';
|
|
@@ -1401,6 +1426,7 @@ interface SettingsRouteChildren {
|
|
|
1401
1426
|
SettingsFiltersRoute: typeof SettingsFiltersRoute;
|
|
1402
1427
|
SettingsFoldersRoute: typeof SettingsFoldersRoute;
|
|
1403
1428
|
SettingsLabelsRoute: typeof SettingsLabelsRoute;
|
|
1429
|
+
SettingsPeopleRoute: typeof SettingsPeopleRoute;
|
|
1404
1430
|
SettingsSendersRoute: typeof SettingsSendersRoute;
|
|
1405
1431
|
SettingsSuggestedVipsRoute: typeof SettingsSuggestedVipsRoute;
|
|
1406
1432
|
SettingsWarningsRoute: typeof SettingsWarningsRoute;
|
|
@@ -17,6 +17,7 @@ import { Route as MailMailboxIdRouteImport } from './routes/mail/$mailboxId';
|
|
|
17
17
|
import { Route as MailBriefRouteImport } from './routes/mail/brief';
|
|
18
18
|
import { Route as MailFlaggedRouteImport } from './routes/mail/flagged';
|
|
19
19
|
import { Route as MailOutboxRouteImport } from './routes/mail/outbox';
|
|
20
|
+
import { Route as ResetPasswordTokenRouteImport } from './routes/reset-password/$token';
|
|
20
21
|
import { Route as SettingsIndexRouteImport } from './routes/settings/index';
|
|
21
22
|
import { Route as SettingsAccountsRouteImport } from './routes/settings/accounts';
|
|
22
23
|
import { Route as SettingsAdvancedRouteImport } from './routes/settings/advanced';
|
|
@@ -25,6 +26,7 @@ import { Route as SettingsCalendarsRouteImport } from './routes/settings/calenda
|
|
|
25
26
|
import { Route as SettingsFiltersRouteImport } from './routes/settings/filters';
|
|
26
27
|
import { Route as SettingsFoldersRouteImport } from './routes/settings/folders';
|
|
27
28
|
import { Route as SettingsLabelsRouteImport } from './routes/settings/labels';
|
|
29
|
+
import { Route as SettingsPeopleRouteImport } from './routes/settings/people';
|
|
28
30
|
import { Route as SettingsSendersRouteImport } from './routes/settings/senders';
|
|
29
31
|
import { Route as SettingsSuggestedVipsRouteImport } from './routes/settings/suggested-vips';
|
|
30
32
|
import { Route as SettingsWarningsRouteImport } from './routes/settings/warnings';
|
|
@@ -120,6 +122,11 @@ const MailOutboxRoute = MailOutboxRouteImport.update({
|
|
|
120
122
|
path: '/outbox',
|
|
121
123
|
getParentRoute: () => MailRoute,
|
|
122
124
|
});
|
|
125
|
+
const ResetPasswordTokenRoute = ResetPasswordTokenRouteImport.update({
|
|
126
|
+
id: '/reset-password/$token',
|
|
127
|
+
path: '/reset-password/$token',
|
|
128
|
+
getParentRoute: () => rootRouteImport,
|
|
129
|
+
});
|
|
123
130
|
const SettingsIndexRoute = SettingsIndexRouteImport.update({
|
|
124
131
|
id: '/',
|
|
125
132
|
path: '/',
|
|
@@ -160,6 +167,11 @@ const SettingsLabelsRoute = SettingsLabelsRouteImport.update({
|
|
|
160
167
|
path: '/labels',
|
|
161
168
|
getParentRoute: () => SettingsRoute,
|
|
162
169
|
});
|
|
170
|
+
const SettingsPeopleRoute = SettingsPeopleRouteImport.update({
|
|
171
|
+
id: '/people',
|
|
172
|
+
path: '/people',
|
|
173
|
+
getParentRoute: () => SettingsRoute,
|
|
174
|
+
});
|
|
163
175
|
const SettingsSendersRoute = SettingsSendersRouteImport.update({
|
|
164
176
|
id: '/senders',
|
|
165
177
|
path: '/senders',
|
|
@@ -426,6 +438,7 @@ const SettingsRouteChildren = {
|
|
|
426
438
|
SettingsFiltersRoute: SettingsFiltersRoute,
|
|
427
439
|
SettingsFoldersRoute: SettingsFoldersRoute,
|
|
428
440
|
SettingsLabelsRoute: SettingsLabelsRoute,
|
|
441
|
+
SettingsPeopleRoute: SettingsPeopleRoute,
|
|
429
442
|
SettingsSendersRoute: SettingsSendersRoute,
|
|
430
443
|
SettingsSuggestedVipsRoute: SettingsSuggestedVipsRoute,
|
|
431
444
|
SettingsWarningsRoute: SettingsWarningsRoute,
|
|
@@ -439,6 +452,7 @@ const rootRouteChildren = {
|
|
|
439
452
|
MailRoute: MailRouteWithChildren,
|
|
440
453
|
OnboardingRoute: OnboardingRoute,
|
|
441
454
|
SettingsRoute: SettingsRouteWithChildren,
|
|
455
|
+
ResetPasswordTokenRoute: ResetPasswordTokenRoute,
|
|
442
456
|
};
|
|
443
457
|
export const routeTree = rootRouteImport
|
|
444
458
|
._addFileChildren(rootRouteChildren)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The reset page itself stands before the sign-in gate (`BetterAuthShell`). Once
|
|
3
|
+
* the password is set and the reader signs in, the app opens at its start.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Route: import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, undefined, import("../../router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/reset-password/$token", "/reset-password/$token", "/reset-password/$token", "/reset-password/$token", undefined, import("@tanstack/router-core").ResolveParams<"/reset-password/$token">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, () => never, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createFileRoute, redirect } from "@tanstack/react-router";
|
|
2
|
+
/**
|
|
3
|
+
* The reset page itself stands before the sign-in gate (`BetterAuthShell`). Once
|
|
4
|
+
* the password is set and the reader signs in, the app opens at its start.
|
|
5
|
+
*/
|
|
6
|
+
export const Route = createFileRoute("/reset-password/$token")({
|
|
7
|
+
beforeLoad: () => {
|
|
8
|
+
throw redirect({ to: "/" });
|
|
9
|
+
},
|
|
10
|
+
});
|
|
@@ -13,7 +13,7 @@ import { DangerZone } from "../../components/settings/DangerZone";
|
|
|
13
13
|
import { REDIRECT_STALL_MESSAGE, useRedirectEnded, } from "../../hooks/useRedirectEnded";
|
|
14
14
|
import { useReturnFromRedirect } from "../../hooks/useReturnFromRedirect";
|
|
15
15
|
import { formatRelativeTime } from "../../lib/format";
|
|
16
|
-
import { SETTINGS_ID_TO_PATH,
|
|
16
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
17
17
|
import { accountsHelp } from "./-shared/help-copy";
|
|
18
18
|
const accountsSearchSchema = z.object({
|
|
19
19
|
editAccountId: z.string().optional(),
|
|
@@ -145,6 +145,7 @@ _jsx("div", { className: "space-y-3", role: "status", "aria-busy": "true", "aria
|
|
|
145
145
|
function AccountsSettings() {
|
|
146
146
|
const search = Route.useSearch();
|
|
147
147
|
const navigate = useNavigate({ from: Route.fullPath });
|
|
148
|
+
const navItems = useSettingsNavItems();
|
|
148
149
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
149
150
|
const [showForm, setShowForm] = useState(false);
|
|
150
151
|
const [showAddWizard, setShowAddWizard] = useState(false);
|
|
@@ -309,7 +310,7 @@ function AccountsSettings() {
|
|
|
309
310
|
if (path)
|
|
310
311
|
void navigate({ to: path });
|
|
311
312
|
};
|
|
312
|
-
return (_jsxs(SettingsShell, { items:
|
|
313
|
+
return (_jsxs(SettingsShell, { items: navItems, activeId: "accounts", title: "Accounts", description: "Every account keeps syncing \u2014 muted ones just stay out of unified views.", help: accountsHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: [successMessage && (_jsx(Banner, { tone: "success", variant: "soft", "data-testid": "oauth-success-banner", onDismiss: () => setSuccessMessage(null), children: successMessage })), oauthErrorMessage && (_jsx(Banner, { tone: "danger", variant: "soft", "data-testid": "oauth-error-banner", onDismiss: () => setOauthErrorMessage(null), children: oauthErrorMessage })), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx(Badge, { tone: "neutral", children: isPending || isError
|
|
313
314
|
? "accounts"
|
|
314
315
|
: `${config.accounts.length} ${config.accounts.length === 1 ? "account" : "accounts"}` }), _jsx(Button, { variant: "primary", size: "sm", icon: _jsx(Plus, { className: "size-3.5" }), onClick: () => setShowAddWizard(true), children: "Add account" })] }), isPending ? (_jsx(LoadingSkeleton, {})) : isError ? (_jsx(ErrorState, { title: "Couldn't load accounts", error: error, onRetry: () => {
|
|
315
316
|
refetch();
|
|
@@ -11,18 +11,19 @@ import { SelfUpdatePanel } from "../../components/settings/SelfUpdatePanel";
|
|
|
11
11
|
import { TlsRootCaDownload } from "../../components/settings/TlsRootCaDownload";
|
|
12
12
|
import { AppVersion } from "../../components/ui/AppVersion";
|
|
13
13
|
import { getRuntimeConfig } from "../../runtime-config";
|
|
14
|
-
import { SETTINGS_ID_TO_PATH,
|
|
14
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
15
15
|
import { advancedHelp } from "./-shared/help-copy";
|
|
16
16
|
export const Route = createFileRoute("/settings/advanced")({
|
|
17
17
|
component: AdvancedSettings,
|
|
18
18
|
});
|
|
19
19
|
function AdvancedSettings() {
|
|
20
20
|
const navigate = useNavigate();
|
|
21
|
+
const navItems = useSettingsNavItems();
|
|
21
22
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
22
23
|
const handleSelectNav = (id) => {
|
|
23
24
|
const path = SETTINGS_ID_TO_PATH[id];
|
|
24
25
|
if (path)
|
|
25
26
|
void navigate({ to: path });
|
|
26
27
|
};
|
|
27
|
-
return (_jsxs(SettingsShell, { items:
|
|
28
|
+
return (_jsxs(SettingsShell, { items: navItems, activeId: "advanced", title: "Advanced", description: "Notification rules, export, and diagnostics.", help: advancedHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: [getRuntimeConfig().updateMode === "self" && _jsx(SelfUpdatePanel, {}), _jsx("div", { className: "mt-6 border-t border-line pt-4", children: _jsx(ConfigTransferPanel, {}) }), _jsx("div", { className: "mt-6 border-t border-line pt-4", children: _jsx("p", { className: "text-sm text-fg-muted", children: "Notification rules are coming in a future release." }) }), _jsx(TlsRootCaDownload, {}), _jsxs("div", { className: "border-t border-line pt-4 mt-4", children: [_jsx("p", { className: "text-sm font-medium text-fg mb-1", children: "About" }), _jsx(AppVersion, {})] })] }));
|
|
28
29
|
}
|
|
@@ -11,7 +11,7 @@ import { SegmentedControl, SettingsShell } from "@remit/ui";
|
|
|
11
11
|
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
12
12
|
import { useState } from "react";
|
|
13
13
|
import { getThemePreference, setThemePreference, } from "../../lib/theme-preference";
|
|
14
|
-
import { SETTINGS_ID_TO_PATH,
|
|
14
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
15
15
|
import { appearanceHelp } from "./-shared/help-copy";
|
|
16
16
|
export const Route = createFileRoute("/settings/appearance")({
|
|
17
17
|
component: AppearanceSettings,
|
|
@@ -30,6 +30,7 @@ function readDensity() {
|
|
|
30
30
|
/* ------------------------------------------------------------------ */
|
|
31
31
|
function AppearanceSettings() {
|
|
32
32
|
const navigate = useNavigate();
|
|
33
|
+
const navItems = useSettingsNavItems();
|
|
33
34
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
34
35
|
const [density, setDensity] = useState(readDensity);
|
|
35
36
|
// Read the current stored preference so the picker reflects the boot-time value
|
|
@@ -50,7 +51,7 @@ function AppearanceSettings() {
|
|
|
50
51
|
if (path)
|
|
51
52
|
void navigate({ to: path });
|
|
52
53
|
};
|
|
53
|
-
return (_jsx(SettingsShell, { items:
|
|
54
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "appearance", title: "Appearance", description: "Display density and colour theme \u2014 instant-apply.", help: appearanceHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: _jsxs("div", { className: "space-y-5", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-sm font-medium text-fg", children: "Density" }), _jsx(SegmentedControl, { name: "density", "aria-label": "Density", value: density, onChange: handleDensity, options: [
|
|
54
55
|
{ value: "comfortable", label: "Comfortable" },
|
|
55
56
|
{ value: "compact", label: "Compact" },
|
|
56
57
|
] }), _jsx("p", { className: "text-xs text-fg-subtle", children: "Controls the spacing of message rows in the mail list." })] }), _jsxs("div", { className: "space-y-2", children: [_jsx("p", { className: "text-sm font-medium text-fg", children: "Theme" }), _jsx(SegmentedControl, { name: "theme", "aria-label": "Theme", value: theme, onChange: handleTheme, options: [
|
|
@@ -10,19 +10,20 @@ import { CalendarSubscriptionStatus } from "../../components/settings/CalendarSu
|
|
|
10
10
|
import { useCalendarCollectionWrites } from "../../hooks/calendar/useCalendarCollectionWrites";
|
|
11
11
|
import { useCalendarSubscriptions } from "../../hooks/calendar/useCalendarSubscriptions";
|
|
12
12
|
import { useCalendars } from "../../hooks/calendar/useCalendars";
|
|
13
|
-
import { SETTINGS_ID_TO_PATH,
|
|
13
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
14
14
|
export const Route = createFileRoute("/settings/calendars")({
|
|
15
15
|
component: CalendarsSettings,
|
|
16
16
|
});
|
|
17
17
|
const calendarsHelp = (_jsxs("div", { className: "space-y-3", children: [_jsx("p", { children: "Each calendar has a name, a time zone its floating times are read in, and an address CalDAV clients reach it by. The address is fixed when the calendar is added; the name and zone can change. Deleting a calendar deletes every event in it. The default calendar is where accepted invitations land, so it cannot be deleted." }), _jsx("p", { children: "A subscription address lets Apple Calendar, Google Calendar, Outlook and Thunderbird show a calendar from here, read-only and kept up to date." }), _jsx("p", { children: "Those clients never sign in, so the address itself is the credential. Anyone who has it can read the calendar; nobody who has it can change anything." }), _jsx("p", { children: "Only a hash of the address is stored, so it is shown once and cannot be looked up later. Replacing it breaks every subscription built on the old one, which is how a shared address is taken back." }), _jsx("p", { children: "Subscribing works the other way round: paste another calendar's iCal address and its events show here, read-only, refreshed on a schedule." })] }));
|
|
18
18
|
function CalendarsSettings() {
|
|
19
19
|
const navigate = useNavigate();
|
|
20
|
+
const navItems = useSettingsNavItems();
|
|
20
21
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
21
22
|
const { calendars, collections, timeZoneByCalendarId, isLoading } = useCalendars();
|
|
22
23
|
const subscriptions = useCalendarSubscriptions();
|
|
23
24
|
const { createCalendar, isWriting } = useCalendarCollectionWrites();
|
|
24
25
|
const [createProblem, setCreateProblem] = useState("");
|
|
25
|
-
return (_jsx(SettingsShell, { items:
|
|
26
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "calendars", title: "Calendars", description: "Add, rename and delete calendars, subscribe to a calendar feed, and share one with any client that can subscribe to a URL.", help: calendarsHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((open) => !open), onSelect: (id) => {
|
|
26
27
|
const path = SETTINGS_ID_TO_PATH[id];
|
|
27
28
|
if (path)
|
|
28
29
|
void navigate({ to: path });
|
|
@@ -15,7 +15,7 @@ import { filterRunReportHref, filterToggleReportHref, } from "../../lib/filter-r
|
|
|
15
15
|
import { buildMailboxRoleMap, labelForMailbox } from "../../lib/folder-roles";
|
|
16
16
|
import { buildMoveOptions, folderDelimiter } from "../../lib/move-options";
|
|
17
17
|
import { filterRunStatus } from "../../lib/organize/filter-run";
|
|
18
|
-
import { SETTINGS_ID_TO_PATH,
|
|
18
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
19
19
|
export const Route = createFileRoute("/settings/filters")({
|
|
20
20
|
component: FiltersSettings,
|
|
21
21
|
});
|
|
@@ -73,6 +73,7 @@ export function AccountFilters({ account, }) {
|
|
|
73
73
|
}
|
|
74
74
|
function FiltersSettings() {
|
|
75
75
|
const navigate = useNavigate();
|
|
76
|
+
const navItems = useSettingsNavItems();
|
|
76
77
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
77
78
|
const { data: config, isPending, isError, error, refetch, } = useQuery(configOperationsGetConfigOptions());
|
|
78
79
|
const handleSelectNav = (id) => {
|
|
@@ -80,7 +81,7 @@ function FiltersSettings() {
|
|
|
80
81
|
if (path)
|
|
81
82
|
void navigate({ to: path });
|
|
82
83
|
};
|
|
83
|
-
return (_jsx(SettingsShell, { items:
|
|
84
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "filters", title: "Filters", description: "Standing and temporary rules created by Organize, per account.", help: filtersHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: isPending ? (
|
|
84
85
|
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-label on loading skeleton provides useful context for assistive tech
|
|
85
86
|
_jsx("div", { className: "h-24 animate-pulse rounded-sm border border-line bg-surface", "aria-busy": "true", "aria-label": "Loading accounts" })) : isError ? (_jsx(ErrorState, { title: "Couldn't load accounts", error: error, onRetry: () => {
|
|
86
87
|
refetch();
|
|
@@ -12,7 +12,7 @@ import { guardFolderDeletion } from "../../lib/delete-folder";
|
|
|
12
12
|
import { softErrorStatuses } from "../../lib/error-classifier";
|
|
13
13
|
import { folderFailure } from "../../lib/folder-failure";
|
|
14
14
|
import { buildMailboxRoleMap, CANONICAL_TO_NAV_ROLE, labelForMailbox, NAV_ROLE_TO_CANONICAL, } from "../../lib/folder-roles";
|
|
15
|
-
import { SETTINGS_ID_TO_PATH,
|
|
15
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
16
16
|
export const Route = createFileRoute("/settings/folders")({
|
|
17
17
|
component: FoldersSettings,
|
|
18
18
|
});
|
|
@@ -127,6 +127,7 @@ function AccountFolders({ account }) {
|
|
|
127
127
|
}
|
|
128
128
|
function FoldersSettings() {
|
|
129
129
|
const navigate = useNavigate();
|
|
130
|
+
const navItems = useSettingsNavItems();
|
|
130
131
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
131
132
|
const { data: config, isPending, isError, error, refetch, } = useQuery(configOperationsGetConfigOptions());
|
|
132
133
|
const handleSelectNav = (id) => {
|
|
@@ -134,7 +135,7 @@ function FoldersSettings() {
|
|
|
134
135
|
if (path)
|
|
135
136
|
void navigate({ to: path });
|
|
136
137
|
};
|
|
137
|
-
return (_jsx(SettingsShell, { items:
|
|
138
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "folders", title: "Folder roles", description: "Appoint which real folder fills each canonical role, per account.", help: _jsx(FolderRolesHelp, {}), helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: isPending ? (
|
|
138
139
|
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-label on loading skeleton provides useful context for assistive tech
|
|
139
140
|
_jsx("div", { className: "h-24 animate-pulse rounded-sm border border-line bg-surface", "aria-busy": "true", "aria-label": "Loading accounts" })) : isError ? (_jsx(ErrorState, { title: "Couldn't load accounts", error: error, onRetry: () => {
|
|
140
141
|
refetch();
|
|
@@ -7,7 +7,7 @@ import { useState } from "react";
|
|
|
7
7
|
import { LabelsList } from "../../components/settings/LabelsList";
|
|
8
8
|
import { useCreateLabel, useDeleteLabel, useLabelList, useUpdateLabel, } from "../../hooks/useLabels";
|
|
9
9
|
import { deleteLabelConfirmCopy } from "../../lib/organize/label-delete-copy";
|
|
10
|
-
import { SETTINGS_ID_TO_PATH,
|
|
10
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
11
11
|
export const Route = createFileRoute("/settings/labels")({
|
|
12
12
|
component: LabelsSettings,
|
|
13
13
|
});
|
|
@@ -56,6 +56,7 @@ function AccountLabels({ account }) {
|
|
|
56
56
|
}
|
|
57
57
|
function LabelsSettings() {
|
|
58
58
|
const navigate = useNavigate();
|
|
59
|
+
const navItems = useSettingsNavItems();
|
|
59
60
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
60
61
|
const { data: config, isPending, isError, error, refetch, } = useQuery(configOperationsGetConfigOptions());
|
|
61
62
|
const handleSelectNav = (id) => {
|
|
@@ -63,7 +64,7 @@ function LabelsSettings() {
|
|
|
63
64
|
if (path)
|
|
64
65
|
void navigate({ to: path });
|
|
65
66
|
};
|
|
66
|
-
return (_jsx(SettingsShell, { items:
|
|
67
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "labels", title: "Labels", description: "Mark mail without moving it, per account.", help: labelsHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: isPending ? (
|
|
67
68
|
// biome-ignore lint/a11y/useAriaPropsSupportedByRole: aria-label on loading skeleton provides useful context for assistive tech
|
|
68
69
|
_jsx("div", { className: "h-24 animate-pulse rounded-sm border border-line bg-surface", "aria-busy": "true", "aria-label": "Loading accounts" })) : isError ? (_jsx(ErrorState, { title: "Couldn't load accounts", error: error, onRetry: () => {
|
|
69
70
|
refetch();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Route: import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, undefined, import("../../router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/people", "/settings/people", "/settings/people", "/settings/people", undefined, import("@tanstack/router-core").ResolveParams<"/people">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { SettingsShell } from "@remit/ui";
|
|
3
|
+
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
4
|
+
import { useState } from "react";
|
|
5
|
+
import { PeoplePanel } from "../../components/settings/people/PeoplePanel";
|
|
6
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
7
|
+
export const Route = createFileRoute("/settings/people")({
|
|
8
|
+
component: PeopleSettings,
|
|
9
|
+
});
|
|
10
|
+
const peopleHelp = (_jsxs("div", { className: "space-y-3", children: [_jsx("p", { children: "Anyone signed in here can manage every account. Each action asks for your own password first, and is recorded with who took it and from where." }), _jsx("p", { children: "Disabling an account signs that person out within 15 minutes and stops their calendar feed links. Their mail stays. You cannot disable your own account, so one account always stays on." }), _jsx("p", { children: "A reset link works once, for 24 hours, and is shown only once. Making one stops the old password at once." }), _jsxs("p", { children: ["The person who runs this server can turn all sign-in off with", " ", _jsx("code", { children: "remit sign-in off" }), ", and recover an account from the host with", " ", _jsx("code", { children: "remit people enable" }), " or ", _jsx("code", { children: "remit people reset" }), "."] })] }));
|
|
11
|
+
function PeopleSettings() {
|
|
12
|
+
const navigate = useNavigate();
|
|
13
|
+
const navItems = useSettingsNavItems();
|
|
14
|
+
const [helpOpen, setHelpOpen] = useState(true);
|
|
15
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "people", title: "People", description: "Everyone with an account on this server.", help: peopleHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((open) => !open), onSelect: (id) => {
|
|
16
|
+
const path = SETTINGS_ID_TO_PATH[id];
|
|
17
|
+
if (path)
|
|
18
|
+
void navigate({ to: path });
|
|
19
|
+
}, onBackToMail: () => void navigate({ to: "/mail" }), children: _jsx(PeoplePanel, {}) }));
|
|
20
|
+
}
|
|
@@ -17,7 +17,7 @@ import { Search, Star, X } from "lucide-react";
|
|
|
17
17
|
import { useCallback, useEffect, useState } from "react";
|
|
18
18
|
import { useDebouncedValue } from "../../hooks/useDebouncedValue";
|
|
19
19
|
import { formatDate } from "../../lib/format";
|
|
20
|
-
import { SETTINGS_ID_TO_PATH,
|
|
20
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
21
21
|
import { sendersHelp } from "./-shared/help-copy";
|
|
22
22
|
export const Route = createFileRoute("/settings/senders")({
|
|
23
23
|
component: SendersSettings,
|
|
@@ -167,6 +167,7 @@ export function SearchGroupPane({ group, query, onCount, }) {
|
|
|
167
167
|
/* ------------------------------------------------------------------ */
|
|
168
168
|
function SendersSettings() {
|
|
169
169
|
const navigate = useNavigate();
|
|
170
|
+
const navItems = useSettingsNavItems();
|
|
170
171
|
const [group, setGroup] = useState("vip");
|
|
171
172
|
const [query, setQuery] = useState("");
|
|
172
173
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
@@ -189,7 +190,7 @@ function SendersSettings() {
|
|
|
189
190
|
if (path)
|
|
190
191
|
void navigate({ to: path });
|
|
191
192
|
};
|
|
192
|
-
return (_jsx(SettingsShell, { items:
|
|
193
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "senders", title: "Senders & Rules", description: "Per-sender preferences \u2014 set with one key from any message, managed here.", flush: true, help: sendersHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: _jsxs("div", { className: "flex min-h-0 flex-1 flex-col lg:flex-row", children: [_jsx(SenderGroupSwitch, { active: group, onSelect: (g) => {
|
|
193
194
|
setGroup(g);
|
|
194
195
|
setQuery("");
|
|
195
196
|
}, options: ["vip", "muted", "blocked"].map((g) => ({
|
|
@@ -3,18 +3,19 @@ import { SettingsShell } from "@remit/ui";
|
|
|
3
3
|
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { WarningsPanel } from "../../components/settings/WarningsPanel";
|
|
6
|
-
import { SETTINGS_ID_TO_PATH,
|
|
6
|
+
import { SETTINGS_ID_TO_PATH, useSettingsNavItems } from "../settings";
|
|
7
7
|
import { warningsHelp } from "./-shared/help-copy";
|
|
8
8
|
export const Route = createFileRoute("/settings/warnings")({
|
|
9
9
|
component: WarningsSettings,
|
|
10
10
|
});
|
|
11
11
|
function WarningsSettings() {
|
|
12
12
|
const navigate = useNavigate();
|
|
13
|
+
const navItems = useSettingsNavItems();
|
|
13
14
|
const [helpOpen, setHelpOpen] = useState(true);
|
|
14
15
|
const handleSelectNav = (id) => {
|
|
15
16
|
const path = SETTINGS_ID_TO_PATH[id];
|
|
16
17
|
if (path)
|
|
17
18
|
void navigate({ to: path });
|
|
18
19
|
};
|
|
19
|
-
return (_jsx(SettingsShell, { items:
|
|
20
|
+
return (_jsx(SettingsShell, { items: navItems, activeId: "warnings", title: "Warnings", description: "Messages that failed to sync, and messages set aside.", help: warningsHelp, helpOpen: helpOpen, onToggleHelp: () => setHelpOpen((v) => !v), onSelect: handleSelectNav, onBackToMail: () => void navigate({ to: "/mail" }), children: _jsx(WarningsPanel, {}) }));
|
|
20
21
|
}
|
|
@@ -11,4 +11,9 @@
|
|
|
11
11
|
import type { SettingsNavItem } from "@remit/ui";
|
|
12
12
|
export declare const SETTINGS_NAV_ITEMS: SettingsNavItem[];
|
|
13
13
|
export declare const SETTINGS_ID_TO_PATH: Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* The nav every settings page renders. People shows only once the server lists
|
|
16
|
+
* people: it answers 404 while self sign-up is open or off self-host.
|
|
17
|
+
*/
|
|
18
|
+
export declare const useSettingsNavItems: () => SettingsNavItem[];
|
|
14
19
|
export declare const Route: import("@tanstack/router-core").Route<import("@tanstack/react-router").Register, import("@tanstack/react-router").RootRoute<import("@tanstack/react-router").Register, undefined, import("../router").RouterContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>, "/settings", "/settings", "/settings", "/settings", undefined, import("@tanstack/router-core").ResolveParams<"/settings">, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, import("@tanstack/router-core").AnyContext, {}, undefined, unknown, unknown, unknown, unknown, undefined>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { createFileRoute, Outlet } from "@tanstack/react-router";
|
|
3
|
-
import { CalendarDays, Filter, FolderTree, Inbox, Palette, Tag, Users, } from "lucide-react";
|
|
3
|
+
import { CalendarDays, Filter, FolderTree, Inbox, Palette, Tag, UserCog, Users, } from "lucide-react";
|
|
4
4
|
import { AdvancedNavIcon } from "../components/settings/AdvancedNavIcon";
|
|
5
5
|
import { WarningsNavIcon } from "../components/settings/WarningsNavIcon";
|
|
6
|
+
import { usePeople } from "../hooks/usePeople";
|
|
6
7
|
/* ------------------------------------------------------------------ */
|
|
7
8
|
/* Nav items — single source of truth shared by all settings pages */
|
|
8
9
|
/* ------------------------------------------------------------------ */
|
|
@@ -54,8 +55,29 @@ export const SETTINGS_ID_TO_PATH = {
|
|
|
54
55
|
calendars: "/settings/calendars",
|
|
55
56
|
appearance: "/settings/appearance",
|
|
56
57
|
warnings: "/settings/warnings",
|
|
58
|
+
people: "/settings/people",
|
|
57
59
|
advanced: "/settings/advanced",
|
|
58
60
|
};
|
|
61
|
+
const PEOPLE_NAV_ITEM = {
|
|
62
|
+
id: "people",
|
|
63
|
+
label: "People",
|
|
64
|
+
icon: _jsx(UserCog, { className: "size-4" }),
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The nav every settings page renders. People shows only once the server lists
|
|
68
|
+
* people: it answers 404 while self sign-up is open or off self-host.
|
|
69
|
+
*/
|
|
70
|
+
export const useSettingsNavItems = () => {
|
|
71
|
+
const people = usePeople();
|
|
72
|
+
if (!people.isSuccess)
|
|
73
|
+
return SETTINGS_NAV_ITEMS;
|
|
74
|
+
const advanced = SETTINGS_NAV_ITEMS.findIndex((item) => item.id === "advanced");
|
|
75
|
+
return [
|
|
76
|
+
...SETTINGS_NAV_ITEMS.slice(0, advanced),
|
|
77
|
+
PEOPLE_NAV_ITEM,
|
|
78
|
+
...SETTINGS_NAV_ITEMS.slice(advanced),
|
|
79
|
+
];
|
|
80
|
+
};
|
|
59
81
|
/* ------------------------------------------------------------------ */
|
|
60
82
|
/* Route — pass-through */
|
|
61
83
|
/* ------------------------------------------------------------------ */
|