@remit/web-client 0.0.344 → 0.0.346
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/harness/vite-preset.js +0 -10
- package/dist/src/components/calendar/CalendarLoadFailed.js +2 -2
- package/dist/src/components/calendar/CalendarScreen.js +2 -2
- package/dist/src/components/calendar/CalendarWaiting.js +1 -1
- package/dist/src/components/calendar/EventMoves.js +1 -1
- package/dist/src/components/compose/FullCompose.js +1 -1
- package/dist/src/components/config-import/ConfigImportWizard.js +1 -1
- package/dist/src/components/config-import/steps.js +6 -6
- package/dist/src/components/layout/CalendarTopBar.js +1 -1
- package/dist/src/components/layout/Drawer.js +1 -1
- package/dist/src/components/mail/AuthenticityBanner.js +1 -1
- package/dist/src/components/mail/DailyBrief.js +3 -3
- package/dist/src/components/mail/DraftsView.js +2 -2
- package/dist/src/components/mail/EmptyTrashBar.js +2 -2
- package/dist/src/components/mail/IntelligencePane.js +1 -1
- package/dist/src/components/mail/LabelApplyTrigger.js +1 -1
- package/dist/src/components/mail/MailListHeader.js +1 -1
- package/dist/src/components/mail/MailNav.js +1 -1
- package/dist/src/components/mail/MessageActionMenu.js +2 -2
- package/dist/src/components/mail/MessageBodyErrorBanner.js +2 -2
- package/dist/src/components/mail/MessageCard.js +1 -1
- package/dist/src/components/mail/MobileMessageBar.js +1 -1
- package/dist/src/components/mail/MoveToTrigger.js +1 -1
- package/dist/src/components/mail/NavMenuButton.js +1 -1
- package/dist/src/components/mail/OutboxPane.js +6 -6
- package/dist/src/components/onboarding/OnboardingWizard.js +6 -6
- package/dist/src/components/settings/AccountFormPanel.js +3 -3
- package/dist/src/components/settings/AdvancedNavIcon.js +1 -1
- package/dist/src/components/settings/CalendarCreateCard.js +1 -1
- package/dist/src/components/settings/CalendarDetailsForm.js +2 -2
- package/dist/src/components/settings/CalendarFeedCard.js +2 -2
- package/dist/src/components/settings/CalendarSubscribeCard.js +1 -1
- package/dist/src/components/settings/CalendarSubscriptionStatus.js +1 -1
- package/dist/src/components/settings/ConfigExportCard.js +2 -2
- package/dist/src/components/settings/DeleteAccountDialog.js +2 -2
- package/dist/src/components/settings/DeleteFolderDialog.js +8 -8
- package/dist/src/components/settings/FilterEditor.js +5 -5
- package/dist/src/components/settings/FiltersList.js +2 -2
- package/dist/src/components/settings/LabelsList.js +2 -2
- package/dist/src/components/settings/TlsRootCaDownload.js +1 -1
- package/dist/src/components/settings/WarningsNavIcon.js +1 -1
- package/dist/src/components/settings/WarningsPanel.js +1 -1
- package/dist/src/components/settings/people/PeoplePanel.js +2 -2
- package/dist/src/components/settings/people/PersonActionDialog.js +1 -1
- package/dist/src/components/settings/people/ResetLinkDialog.js +1 -1
- package/dist/src/components/ui/BugReportButton.js +1 -1
- package/dist/src/components/ui/FatalErrorOverlay.js +2 -2
- package/dist/src/components/ui/SignedOutOverlay.js +1 -1
- package/dist/src/routes/settings/accounts.js +3 -3
- package/dist/src/routes/settings/senders.js +1 -1
- package/dist/src/routes/settings.js +2 -2
- package/package.json +2 -3
|
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
3
3
|
import { accountDetailOperationsUpdateAccountMutation, accountOperationsCreateAccountMutation, accountOperationsTestConnectionMutation, configOperationsGetConfigQueryKey, } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
|
|
4
4
|
import { Button, ComposeLanguageSetting, cn, Input, PasswordInput, Select, SlidePanel, securityToApi, } from "@remit/ui";
|
|
5
|
+
import { Check, LoaderCircle, X } from "@remit/ui/icons";
|
|
5
6
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
|
6
|
-
import { Check, Loader2, X } from "lucide-react";
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { useForm } from "react-hook-form";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -326,10 +326,10 @@ export const AccountFormPanel = ({ isOpen, onClose, account, focusSmtp, }) => {
|
|
|
326
326
|
? "Saving signature..."
|
|
327
327
|
: "This signature will be appended to new emails." })] }) })] })), isEditing && languagesSection] }) }));
|
|
328
328
|
}
|
|
329
|
-
return (_jsx(SlidePanel, { isOpen: isOpen, onClose: onClose, title: isEditing ? "Edit Account" : "Add Account", footer: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", form: "account-form", variant: "primary", disabled: isSaving, children: isSaving ? "Saving..." : "Save Account" })] }), children: _jsxs("form", { id: "account-form", onSubmit: handleSubmit, className: "space-y-6", children: [_jsxs("section", { children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider mb-3", children: "Account Information" }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "account-provider", className: "text-sm font-medium mb-1.5 block", children: "Provider" }), _jsxs(Select, { id: "account-provider", value: presetId, onChange: (e) => handlePresetChange(e.target.value), children: [_jsx("option", { value: "", children: "Custom / other" }), PROVIDER_PRESETS.map((preset) => (_jsx("option", { value: preset.id, children: preset.label }, preset.id)))] }), _jsx("p", { className: "text-xs text-fg-muted mt-1", children: "Pick your email provider to fill in server settings automatically, or choose Custom to enter them by hand." })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-email", className: "text-sm font-medium mb-1.5 block", children: "Email Address" }), _jsx(Input, { id: "account-email", ...form.register("email"), placeholder: "alice@example.com" }), form.formState.errors.email && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.email.message }))] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-displayName", className: "text-sm font-medium mb-1.5 block", children: "Display name (optional)" }), _jsx(Input, { id: "account-displayName", ...form.register("displayName"), placeholder: "Alice" }), _jsx("p", { className: "text-xs text-fg-muted mt-1", children: "What to call this account in Remit. Leave blank to use a name derived from the address." })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-username", className: "text-sm font-medium mb-1.5 block", children: "Username" }), _jsx(Input, { id: "account-username", ...form.register("username"), placeholder: "Same as email if empty" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-password", className: "text-sm font-medium mb-1.5 block", children: "Password" }), _jsx(PasswordInput, { id: "account-password", ...form.register("password"), placeholder: isEditing ? "Leave empty to keep current" : "" }), form.formState.errors.password && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.password.message })), selectedPreset && (_jsxs("p", { className: "text-xs text-fg-muted mt-1", children: [selectedPreset.passwordHelp.text, " ", _jsx("a", { href: selectedPreset.passwordHelp.url, target: "_blank", rel: "noopener noreferrer", className: "text-accent hover:underline", children: "Get an app password" })] }))] })] })] }), _jsxs("section", { children: [_jsxs("div", { className: "flex items-center justify-between mb-3", children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider", children: "Incoming Mail (IMAP)" }), selectedPreset && (_jsx("button", { type: "button", onClick: () => setAdvancedOpen((v) => !v), className: "text-xs text-fg-muted hover:text-fg transition-colors", children: advancedOpen ? "Use preset settings" : "Advanced" }))] }), serversLocked && (_jsxs("p", { className: "text-xs text-fg-muted mb-3", children: ["Server settings are pre-filled for ", selectedPreset?.label, " and locked. Choose Advanced to edit them by hand."] })), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "imap-host", className: "text-sm font-medium mb-1.5 block", children: "Server" }), _jsx(Input, { id: "imap-host", ...form.register("imapHost"), readOnly: serversLocked, placeholder: "imap.example.com" }), form.formState.errors.imapHost && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.imapHost.message }))] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "imap-port", className: "text-sm font-medium mb-1.5 block", children: "Port" }), _jsx(Input, { id: "imap-port", ...form.register("imapPort"), readOnly: serversLocked, type: "number" })] }), _jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium mb-1.5 block", children: "Security" }), _jsxs("div", { className: "space-y-1.5 mt-2", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: form.watch("imapTls"), onChange: () => handleSecurityChange("tls") }), "TLS (Port 993)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("imapTls") && form.watch("imapStartTls"), onChange: () => handleSecurityChange("starttls") }), "STARTTLS (Port 143)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("imapTls") && !form.watch("imapStartTls"), onChange: () => handleSecurityChange("none") }), "None (Unencrypted)"] })] })] })] }), _jsx(Button, { type: "button", variant: "secondary", onClick: handleTestImap, disabled: testMutation.isPending, className: "w-full", icon: testMutation.isPending ? (_jsx(
|
|
329
|
+
return (_jsx(SlidePanel, { isOpen: isOpen, onClose: onClose, title: isEditing ? "Edit Account" : "Add Account", footer: _jsxs(_Fragment, { children: [_jsx(Button, { type: "button", variant: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { type: "submit", form: "account-form", variant: "primary", disabled: isSaving, children: isSaving ? "Saving..." : "Save Account" })] }), children: _jsxs("form", { id: "account-form", onSubmit: handleSubmit, className: "space-y-6", children: [_jsxs("section", { children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider mb-3", children: "Account Information" }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "account-provider", className: "text-sm font-medium mb-1.5 block", children: "Provider" }), _jsxs(Select, { id: "account-provider", value: presetId, onChange: (e) => handlePresetChange(e.target.value), children: [_jsx("option", { value: "", children: "Custom / other" }), PROVIDER_PRESETS.map((preset) => (_jsx("option", { value: preset.id, children: preset.label }, preset.id)))] }), _jsx("p", { className: "text-xs text-fg-muted mt-1", children: "Pick your email provider to fill in server settings automatically, or choose Custom to enter them by hand." })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-email", className: "text-sm font-medium mb-1.5 block", children: "Email Address" }), _jsx(Input, { id: "account-email", ...form.register("email"), placeholder: "alice@example.com" }), form.formState.errors.email && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.email.message }))] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-displayName", className: "text-sm font-medium mb-1.5 block", children: "Display name (optional)" }), _jsx(Input, { id: "account-displayName", ...form.register("displayName"), placeholder: "Alice" }), _jsx("p", { className: "text-xs text-fg-muted mt-1", children: "What to call this account in Remit. Leave blank to use a name derived from the address." })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-username", className: "text-sm font-medium mb-1.5 block", children: "Username" }), _jsx(Input, { id: "account-username", ...form.register("username"), placeholder: "Same as email if empty" })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "account-password", className: "text-sm font-medium mb-1.5 block", children: "Password" }), _jsx(PasswordInput, { id: "account-password", ...form.register("password"), placeholder: isEditing ? "Leave empty to keep current" : "" }), form.formState.errors.password && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.password.message })), selectedPreset && (_jsxs("p", { className: "text-xs text-fg-muted mt-1", children: [selectedPreset.passwordHelp.text, " ", _jsx("a", { href: selectedPreset.passwordHelp.url, target: "_blank", rel: "noopener noreferrer", className: "text-accent hover:underline", children: "Get an app password" })] }))] })] })] }), _jsxs("section", { children: [_jsxs("div", { className: "flex items-center justify-between mb-3", children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider", children: "Incoming Mail (IMAP)" }), selectedPreset && (_jsx("button", { type: "button", onClick: () => setAdvancedOpen((v) => !v), className: "text-xs text-fg-muted hover:text-fg transition-colors", children: advancedOpen ? "Use preset settings" : "Advanced" }))] }), serversLocked && (_jsxs("p", { className: "text-xs text-fg-muted mb-3", children: ["Server settings are pre-filled for ", selectedPreset?.label, " and locked. Choose Advanced to edit them by hand."] })), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "imap-host", className: "text-sm font-medium mb-1.5 block", children: "Server" }), _jsx(Input, { id: "imap-host", ...form.register("imapHost"), readOnly: serversLocked, placeholder: "imap.example.com" }), form.formState.errors.imapHost && (_jsx("p", { className: "text-sm text-danger mt-1", children: form.formState.errors.imapHost.message }))] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "imap-port", className: "text-sm font-medium mb-1.5 block", children: "Port" }), _jsx(Input, { id: "imap-port", ...form.register("imapPort"), readOnly: serversLocked, type: "number" })] }), _jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium mb-1.5 block", children: "Security" }), _jsxs("div", { className: "space-y-1.5 mt-2", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: form.watch("imapTls"), onChange: () => handleSecurityChange("tls") }), "TLS (Port 993)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("imapTls") && form.watch("imapStartTls"), onChange: () => handleSecurityChange("starttls") }), "STARTTLS (Port 143)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("imapTls") && !form.watch("imapStartTls"), onChange: () => handleSecurityChange("none") }), "None (Unencrypted)"] })] })] })] }), _jsx(Button, { type: "button", variant: "secondary", onClick: handleTestImap, disabled: testMutation.isPending, className: "w-full", icon: testMutation.isPending ? (_jsx(LoaderCircle, { className: "size-4 animate-spin" })) : undefined, children: testMutation.isPending ? "Testing..." : "Test IMAP Connection" }), testMutation.data && (_jsxs("div", { className: cn("p-2 rounded-md text-sm", testMutation.data.imapSuccess
|
|
330
330
|
? "bg-positive/10 text-positive"
|
|
331
331
|
: "bg-danger-soft text-danger"), children: [testMutation.data.imapSuccess ? (_jsx(Check, { className: "inline size-4 mr-1" })) : (_jsx(X, { className: "inline size-4 mr-1" })), testMutation.data.imapSuccess ? "IMAP Connected" : imapError] }))] })] }), _jsxs("section", { ref: smtpSectionRef, "data-testid": "smtp-section", children: [_jsxs("div", { className: "flex items-center justify-between mb-3", children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider", children: "Outgoing Mail (SMTP)" }), !serversLocked && (_jsx("button", { type: "button", onClick: handlePrefillFromImap, disabled: !form.watch("imapHost"), className: "text-xs text-fg-muted hover:text-fg transition-colors disabled:opacity-50", children: "Pre-fill from IMAP" }))] }), _jsxs("div", { className: "space-y-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-host", className: "text-sm font-medium mb-1.5 block", children: "Server" }), _jsx(Input, { id: "smtp-host", ...form.register("smtpHost"), readOnly: serversLocked, placeholder: "smtp.example.com" })] }), _jsxs("div", { className: "grid grid-cols-2 gap-3", children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-port", className: "text-sm font-medium mb-1.5 block", children: "Port" }), _jsx(Input, { id: "smtp-port", ...form.register("smtpPort"), readOnly: serversLocked, type: "number" })] }), _jsxs("div", { children: [_jsx("span", { className: "text-sm font-medium mb-1.5 block", children: "Security" }), _jsxs("div", { className: "space-y-1.5 mt-2", children: [_jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: form.watch("smtpTls") === true, onChange: () => handleSmtpSecurityChange("tls") }), "TLS (Port 465)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("smtpTls") &&
|
|
332
|
-
form.watch("smtpStartTls") === true, onChange: () => handleSmtpSecurityChange("starttls") }), "STARTTLS (Port 587)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("smtpTls") && !form.watch("smtpStartTls"), onChange: () => handleSmtpSecurityChange("none") }), "None (Unencrypted)"] })] })] })] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "checkbox", ...form.register("useDifferentSmtpCreds") }), "Use different credentials for SMTP"] }), form.watch("useDifferentSmtpCreds") && (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-username", className: "text-sm font-medium mb-1.5 block", children: "SMTP Username" }), _jsx(Input, { id: "smtp-username", ...form.register("smtpUsername") })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-password", className: "text-sm font-medium mb-1.5 block", children: "SMTP Password" }), _jsx(PasswordInput, { id: "smtp-password", ...form.register("smtpPassword") })] })] })), _jsx(Button, { type: "button", variant: "secondary", onClick: handleTestSmtp, disabled: testMutation.isPending || !form.watch("smtpHost"), className: "w-full", icon: testMutation.isPending ? (_jsx(
|
|
332
|
+
form.watch("smtpStartTls") === true, onChange: () => handleSmtpSecurityChange("starttls") }), "STARTTLS (Port 587)"] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "radio", disabled: serversLocked, checked: !form.watch("smtpTls") && !form.watch("smtpStartTls"), onChange: () => handleSmtpSecurityChange("none") }), "None (Unencrypted)"] })] })] })] }), _jsxs("label", { className: "flex items-center gap-2 text-sm", children: [_jsx("input", { type: "checkbox", ...form.register("useDifferentSmtpCreds") }), "Use different credentials for SMTP"] }), form.watch("useDifferentSmtpCreds") && (_jsxs(_Fragment, { children: [_jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-username", className: "text-sm font-medium mb-1.5 block", children: "SMTP Username" }), _jsx(Input, { id: "smtp-username", ...form.register("smtpUsername") })] }), _jsxs("div", { children: [_jsx("label", { htmlFor: "smtp-password", className: "text-sm font-medium mb-1.5 block", children: "SMTP Password" }), _jsx(PasswordInput, { id: "smtp-password", ...form.register("smtpPassword") })] })] })), _jsx(Button, { type: "button", variant: "secondary", onClick: handleTestSmtp, disabled: testMutation.isPending || !form.watch("smtpHost"), className: "w-full", icon: testMutation.isPending ? (_jsx(LoaderCircle, { className: "size-4 animate-spin" })) : undefined, children: testMutation.isPending ? "Testing..." : "Test SMTP Connection" }), testMutation.data?.smtpSuccess !== undefined && (_jsxs("div", { className: cn("p-2 rounded-md text-sm", testMutation.data.smtpSuccess
|
|
333
333
|
? "bg-positive/10 text-positive"
|
|
334
334
|
: "bg-danger-soft text-danger"), children: [testMutation.data.smtpSuccess ? (_jsx(Check, { className: "inline size-4 mr-1" })) : (_jsx(X, { className: "inline size-4 mr-1" })), testMutation.data.smtpSuccess ? "SMTP Connected" : smtpError] }))] })] }), isEditing && (_jsxs("section", { children: [_jsx("h3", { className: "text-2xs font-semibold text-fg-subtle uppercase tracking-wider mb-3", children: "Signature" }), _jsx("div", { className: "space-y-3", children: _jsxs("div", { children: [_jsx("label", { htmlFor: "email-sig-edit", className: "text-sm font-medium mb-1.5 block", children: "Email Signature" }), _jsx("textarea", { id: "email-sig-edit", value: signatureText, onChange: (e) => setSignatureText(e.target.value), onBlur: handleSignatureBlur, rows: 5, className: "w-full px-3 py-2 border border-line rounded-md bg-surface-sunken text-sm text-fg placeholder:text-fg-subtle focus-within:border-line-strong focus-within:ring-2 focus-within:ring-ring/30 transition-colors resize-y outline-none", placeholder: "Enter your email signature..." }), _jsx("p", { className: "text-xs text-fg-muted mt-1", children: isSignatureSaving
|
|
335
335
|
? "Saving signature..."
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* stays silent.
|
|
8
8
|
*/
|
|
9
9
|
import { AttentionDot } from "@remit/ui";
|
|
10
|
-
import { Wrench } from "
|
|
10
|
+
import { Wrench } from "@remit/ui/icons";
|
|
11
11
|
import { useOptionalSelfUpdate } from "../../hooks/use-system-update";
|
|
12
12
|
export function AdvancedNavIcon() {
|
|
13
13
|
const selfUpdate = useOptionalSelfUpdate();
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* comes back in the server's words where the button is.
|
|
9
9
|
*/
|
|
10
10
|
import { Banner, Button, Card, CardBody, CardHeader, CardTitle, Input, } from "@remit/ui";
|
|
11
|
-
import { Plus } from "
|
|
11
|
+
import { Plus } from "@remit/ui/icons";
|
|
12
12
|
import { useId, useState } from "react";
|
|
13
13
|
import { UNZONED_CALENDAR } from "../../hooks/calendar";
|
|
14
14
|
import { calendarUrlSegmentFor } from "../../lib/calendar-collection-copy";
|
|
@@ -9,7 +9,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
9
9
|
* from a full one without reading all of its time.
|
|
10
10
|
*/
|
|
11
11
|
import { Banner, Button, ConfirmDialog, Input } from "@remit/ui";
|
|
12
|
-
import { Save,
|
|
12
|
+
import { Save, Trash } from "@remit/ui/icons";
|
|
13
13
|
import { useId, useState } from "react";
|
|
14
14
|
import { deleteCalendarConfirmCopy } from "../../lib/calendar-collection-copy";
|
|
15
15
|
import { TimeZoneSelect } from "./TimeZoneSelect";
|
|
@@ -27,7 +27,7 @@ export function CalendarDetailsForm({ calendarName, timezone, isBusy, problem, o
|
|
|
27
27
|
if (!changed || trimmed === "")
|
|
28
28
|
return;
|
|
29
29
|
onSave({ displayName: trimmed, timezone: zone });
|
|
30
|
-
}, children: [_jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("label", { htmlFor: nameId, className: "text-xs font-medium text-fg-muted", children: "Name" }), _jsx(Input, { id: nameId, value: displayName, maxLength: 140, disabled: isBusy, onChange: (event) => setDisplayName(event.target.value) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { htmlFor: zoneId, className: "text-xs font-medium text-fg-muted", children: "Time zone" }), _jsx(TimeZoneSelect, { id: zoneId, value: zone, disabled: isBusy, onChange: setZone })] })] }), problem !== "" && (_jsxs(Banner, { tone: "danger", variant: "soft", children: [_jsxs("p", { className: "font-medium", children: [calendarName, " was not changed."] }), _jsx("p", { className: "mt-0.5 break-words", children: problem })] })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { type: "submit", variant: "secondary", size: "sm", disabled: isBusy || !changed || trimmed === "", icon: _jsx(Save, { className: "size-3.5" }), children: "Save changes" }), _jsx(Button, { type: "button", variant: "danger", size: "sm", disabled: isBusy, icon: _jsx(
|
|
30
|
+
}, children: [_jsxs("div", { className: "grid gap-3 sm:grid-cols-2", children: [_jsxs("div", { className: "space-y-1", children: [_jsx("label", { htmlFor: nameId, className: "text-xs font-medium text-fg-muted", children: "Name" }), _jsx(Input, { id: nameId, value: displayName, maxLength: 140, disabled: isBusy, onChange: (event) => setDisplayName(event.target.value) })] }), _jsxs("div", { className: "space-y-1", children: [_jsx("label", { htmlFor: zoneId, className: "text-xs font-medium text-fg-muted", children: "Time zone" }), _jsx(TimeZoneSelect, { id: zoneId, value: zone, disabled: isBusy, onChange: setZone })] })] }), problem !== "" && (_jsxs(Banner, { tone: "danger", variant: "soft", children: [_jsxs("p", { className: "font-medium", children: [calendarName, " was not changed."] }), _jsx("p", { className: "mt-0.5 break-words", children: problem })] })), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { type: "submit", variant: "secondary", size: "sm", disabled: isBusy || !changed || trimmed === "", icon: _jsx(Save, { className: "size-3.5" }), children: "Save changes" }), _jsx(Button, { type: "button", variant: "danger", size: "sm", disabled: isBusy, icon: _jsx(Trash, { className: "size-3.5" }), onClick: () => setConfirming(true), children: "Delete calendar" })] })] }), _jsx(ConfirmDialog, { isOpen: confirming, title: copy.title, description: copy.description, confirmLabel: "Delete calendar", destructive: true, onConfirm: () => {
|
|
31
31
|
setConfirming(false);
|
|
32
32
|
onDelete();
|
|
33
33
|
}, onCancel: () => setConfirming(false) })] }));
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* them is indistinguishable from a calendar that cannot be shared at all.
|
|
9
9
|
*/
|
|
10
10
|
import { Badge, Banner, Button, Card, CardBody, CardHeader, CardTitle, ConfirmDialog, ErrorState, formatErrorMessage, } from "@remit/ui";
|
|
11
|
-
import { Check, Copy, Link2, RefreshCw,
|
|
11
|
+
import { Check, Copy, Link2, RefreshCw, Trash } from "@remit/ui/icons";
|
|
12
12
|
import { useEffect, useId, useRef, useState } from "react";
|
|
13
13
|
import { revokeFeedConfirmCopy, rotateFeedConfirmCopy, } from "../../lib/calendar-feed-copy";
|
|
14
14
|
import { formatDatePreset } from "../../lib/format";
|
|
@@ -32,7 +32,7 @@ function MintedAddress({ calendarName, url, onDismiss, }) {
|
|
|
32
32
|
function ActiveFeed({ createdAt, rotatedAt, isBusy, onRotate, onRevoke, }) {
|
|
33
33
|
return (_jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx(Badge, { tone: "positive", children: "shared" }), _jsxs("span", { className: "text-xs text-fg-muted", children: ["Address created ", formatDatePreset(createdAt, "medium"), rotatedAt > 0
|
|
34
34
|
? `, last replaced ${formatDatePreset(rotatedAt, "medium")}`
|
|
35
|
-
: ""] })] }), _jsx("p", { className: "text-sm text-fg-muted", children: "The address itself is not stored in readable form, so it cannot be shown again. Replace it if you no longer know where it went." }), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { variant: "secondary", size: "sm", disabled: isBusy, icon: _jsx(RefreshCw, { className: "size-3.5" }), onClick: onRotate, children: "Replace address" }), _jsx(Button, { variant: "danger", size: "sm", disabled: isBusy, icon: _jsx(
|
|
35
|
+
: ""] })] }), _jsx("p", { className: "text-sm text-fg-muted", children: "The address itself is not stored in readable form, so it cannot be shown again. Replace it if you no longer know where it went." }), _jsxs("div", { className: "flex flex-wrap gap-2", children: [_jsx(Button, { variant: "secondary", size: "sm", disabled: isBusy, icon: _jsx(RefreshCw, { className: "size-3.5" }), onClick: onRotate, children: "Replace address" }), _jsx(Button, { variant: "danger", size: "sm", disabled: isBusy, icon: _jsx(Trash, { className: "size-3.5" }), onClick: onRevoke, children: "Stop sharing" })] })] }));
|
|
36
36
|
}
|
|
37
37
|
export function CalendarFeedCard({ calendarName, details, state, mintedUrl, isBusy, actionError, onMint, onRevoke, onDismissMinted, onRetry, }) {
|
|
38
38
|
const [pending, setPending] = useState("none");
|
|
@@ -7,7 +7,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
7
7
|
* refusal here means nothing was added, and the banner says so in those words.
|
|
8
8
|
*/
|
|
9
9
|
import { Banner, Button, Card, CardBody, CardHeader, CardTitle, formatErrorMessage, Input, } from "@remit/ui";
|
|
10
|
-
import { CalendarPlus } from "
|
|
10
|
+
import { CalendarPlus } from "@remit/ui/icons";
|
|
11
11
|
import { useId, useState } from "react";
|
|
12
12
|
export const SUBSCRIBE_TITLE = "Subscribe to a calendar";
|
|
13
13
|
export function CalendarSubscribeCard({ isBusy, error, onSubscribe, }) {
|
|
@@ -8,7 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
* credential, so only its host is named.
|
|
9
9
|
*/
|
|
10
10
|
import { Badge, Banner, Button, formatErrorMessage } from "@remit/ui";
|
|
11
|
-
import { Pause, Play } from "
|
|
11
|
+
import { Pause, Play } from "@remit/ui/icons";
|
|
12
12
|
import { subscriptionHostOf } from "../../lib/calendar-subscription";
|
|
13
13
|
import { formatDatePreset } from "../../lib/format";
|
|
14
14
|
export function CalendarSubscriptionStatus({ calendarName, subscriptionUrl, enabled, fetchedAt, error, isBusy, actionError, onSetEnabled, }) {
|
|
@@ -9,8 +9,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
9
9
|
* or whether they missed something.
|
|
10
10
|
*/
|
|
11
11
|
import { Badge, Button, Card, CardBody, CardHeader, CardTitle, } from "@remit/ui";
|
|
12
|
-
import { Download,
|
|
12
|
+
import { Download, FileBraces, LoaderCircle } from "@remit/ui/icons";
|
|
13
13
|
export function ConfigExportCard({ fileName, state = "ready", error, onDownload, onImport, }) {
|
|
14
14
|
const downloading = state === "downloading";
|
|
15
|
-
return (_jsxs(Card, { className: "max-w-xl", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Configuration file" }) }), _jsxs(CardBody, { children: [_jsx("p", { className: "text-sm text-fg-muted", children: "One versioned JSON document carrying every setting this instance holds: accounts and their servers, folder roles, rules, labels, flagged senders and appearance. No passwords and no OAuth tokens \u2014 you sign in again wherever you import it." }), state === "failed" && (_jsxs("div", { className: "mt-3 space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-3 py-2.5", children: [_jsx("p", { className: "text-sm font-medium text-danger", children: "The config file could not be written." }), _jsxs("p", { className: "text-xs text-fg-muted", children: ["Nothing was downloaded. Try again \u2014 if it keeps failing, use", " ", _jsx("code", { className: "rounded bg-surface-sunken px-1 py-0.5", children: "remit config save" }), " ", "on the host in the meantime."] }), error && (_jsx("code", { className: "block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted", children: error }))] })), _jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [_jsx(Button, { variant: "secondary", size: "sm", disabled: downloading, icon: downloading ? (_jsx(
|
|
15
|
+
return (_jsxs(Card, { className: "max-w-xl", children: [_jsx(CardHeader, { children: _jsx(CardTitle, { children: "Configuration file" }) }), _jsxs(CardBody, { children: [_jsx("p", { className: "text-sm text-fg-muted", children: "One versioned JSON document carrying every setting this instance holds: accounts and their servers, folder roles, rules, labels, flagged senders and appearance. No passwords and no OAuth tokens \u2014 you sign in again wherever you import it." }), state === "failed" && (_jsxs("div", { className: "mt-3 space-y-2 rounded-sm border border-danger/40 bg-danger-soft px-3 py-2.5", children: [_jsx("p", { className: "text-sm font-medium text-danger", children: "The config file could not be written." }), _jsxs("p", { className: "text-xs text-fg-muted", children: ["Nothing was downloaded. Try again \u2014 if it keeps failing, use", " ", _jsx("code", { className: "rounded bg-surface-sunken px-1 py-0.5", children: "remit config save" }), " ", "on the host in the meantime."] }), error && (_jsx("code", { className: "block rounded bg-surface-sunken px-2.5 py-2 text-2xs text-fg-muted", children: error }))] })), _jsxs("div", { className: "mt-3 flex flex-wrap items-center gap-2", children: [_jsx(Button, { variant: "secondary", size: "sm", disabled: downloading, icon: downloading ? (_jsx(LoaderCircle, { className: "size-3.5 animate-spin" })) : (_jsx(Download, { className: "size-3.5" })), onClick: onDownload, children: downloading ? "Preparing…" : `Download ${fileName}` }), _jsx(Badge, { tone: "neutral", children: "no passwords" })] }), _jsxs("p", { className: "mt-3 text-2xs text-fg-subtle", children: ["On the host, the same file comes from", " ", _jsxs("code", { className: "rounded bg-surface-sunken px-1 py-0.5", children: ["remit config save ~/", fileName] }), "."] }), _jsxs("div", { className: "mt-5 border-t border-line pt-4", children: [_jsx("p", { className: "text-sm font-medium text-fg", children: "Import a config file" }), _jsx("p", { className: "mt-1 text-sm text-fg-muted", children: "Read a file from another Reader into this one. It shows what will change before anything is written, and asks for each account's credentials afterwards." }), _jsx(Button, { className: "mt-3", variant: "secondary", size: "sm", icon: _jsx(FileBraces, { className: "size-3.5" }), onClick: onImport, children: "Import a config file" })] })] })] }));
|
|
16
16
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { meOperationsCreateExportMutation, meOperationsDeleteMeMutation, } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
|
|
3
3
|
import { Button, Dialog, Input } from "@remit/ui";
|
|
4
|
+
import { Download, TriangleAlert, X } from "@remit/ui/icons";
|
|
4
5
|
import { useMutation } from "@tanstack/react-query";
|
|
5
|
-
import { AlertTriangle, Download, X } from "lucide-react";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { useAuthProvider } from "../../auth/provider";
|
|
8
8
|
function DeleteAccountDialogView({ open, onClose, accountEmail, signOut, }) {
|
|
@@ -35,7 +35,7 @@ function DeleteAccountDialogView({ open, onClose, accountEmail, signOut, }) {
|
|
|
35
35
|
setMismatch(false);
|
|
36
36
|
mutation.mutate({ body: { confirmEmail: confirmEmail.trim() } });
|
|
37
37
|
};
|
|
38
|
-
return (_jsxs(Dialog, { open: open, onClose: handleClose, title: "Delete your Remit account", children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(
|
|
38
|
+
return (_jsxs(Dialog, { open: open, onClose: handleClose, title: "Delete your Remit account", children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(TriangleAlert, { className: "size-4 shrink-0 text-danger" }), _jsx("span", { className: "flex-1 text-sm font-semibold text-fg", children: "Delete your Remit account" }), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(X, { className: "size-3.5" }), onClick: handleClose, "aria-label": "Cancel" })] }), deleted ? (_jsxs("div", { className: "px-5 py-6 text-sm text-fg-muted", children: [_jsx("p", { className: "font-medium text-fg", children: "Account deletion scheduled." }), _jsx("p", { className: "mt-1", children: "Your data will be erased shortly. Signing you out\u2026" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-4 px-5 py-4 text-sm text-fg-muted", children: [_jsx("p", { children: "This permanently erases everything Remit holds for you:" }), _jsxs("ul", { className: "space-y-1.5 text-xs", children: [_jsxs("li", { className: "flex gap-2", children: [_jsx("span", { className: "text-danger", children: "\u2022" }), "All connected accounts disconnected and access tokens revoked."] }), _jsxs("li", { className: "flex gap-2", children: [_jsx("span", { className: "text-danger", children: "\u2022" }), "Synced mail cache and search index."] }), _jsxs("li", { className: "flex gap-2", children: [_jsx("span", { className: "text-danger", children: "\u2022" }), "AI history and insights."] }), _jsxs("li", { className: "flex gap-2", children: [_jsx("span", { className: "text-danger", children: "\u2022" }), "Preferences and rules."] })] }), _jsxs("div", { className: "rounded-sm border border-line bg-surface-sunken px-3 py-2 text-xs", children: [_jsx("strong", { className: "text-fg", children: "Your mail at Gmail / IMAP is not deleted." }), " ", "This only removes Remit's copy and its access \u2014 the mail stays in your provider mailboxes."] }), _jsxs("div", { className: "text-xs", children: [_jsxs("button", { type: "button", onClick: () => exportMutation.mutate({}), "aria-busy": exportMutation.isPending, className: "inline-flex items-center gap-1.5 font-medium text-accent hover:underline", children: [_jsx(Download, { className: "size-3.5" }), exportMutation.isPending
|
|
39
39
|
? "Requesting export…"
|
|
40
40
|
: "Export my data first"] }), exportMutation.isSuccess && (
|
|
41
41
|
// biome-ignore lint/a11y/useSemanticElements: <p> with role="status" preserves block layout; <output> is inline
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Banner, Button, Dialog, FolderTreePicker, } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { FolderInput, LoaderCircle, Trash, TriangleAlert, X, } from "@remit/ui/icons";
|
|
4
4
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
5
|
import { useCreateMailbox } from "../../hooks/useCreateMailbox";
|
|
6
6
|
import { useDeleteFolder } from "../../hooks/useDeleteFolder";
|
|
@@ -84,33 +84,33 @@ export function DeleteFolderDialog({ open, accountId, folder, mailboxes, appoint
|
|
|
84
84
|
const messageCount = arrivedSinceSync ?? folder.messageCount;
|
|
85
85
|
const body = (() => {
|
|
86
86
|
if (phase === "moving") {
|
|
87
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(
|
|
87
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(LoaderCircle, { className: "size-8 animate-spin text-accent-2" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Moving emails\u2026" }), _jsx("p", { className: "text-xs text-fg-muted", role: "status", "aria-live": "polite", children: progress ? moveProgressLabel(progress) : "Moved 0 of 0" })] }));
|
|
88
88
|
}
|
|
89
89
|
if (phase === "checking") {
|
|
90
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(
|
|
90
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(LoaderCircle, { className: "size-8 animate-spin text-accent-2" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Checking the folder on the mail server\u2026" }), _jsx("p", { className: "text-xs text-fg-muted", role: "status", "aria-live": "polite", children: `Waiting ${checkElapsed}. Nothing is deleted until the server answers.` })] }));
|
|
91
91
|
}
|
|
92
92
|
if (phase === "check-stalled") {
|
|
93
93
|
return (_jsxs("div", { className: "space-y-4 px-5 py-4", children: [_jsx(Banner, { tone: "warning", variant: "soft", children: `The mail server hasn't reported back on this folder yet — ${checkElapsed} so far. Nothing has been deleted.` }), _jsx("p", { className: "text-xs text-fg-muted", children: "A sync covers the whole account, so a busy mailbox can take a while to come round to this folder." }), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: handleClose, children: "Cancel" }), _jsx(Button, { size: "sm", onClick: () => handleDeleteEmpty(), children: "Keep waiting" })] })] }));
|
|
94
94
|
}
|
|
95
95
|
if (phase === "deleting" || phase === "done") {
|
|
96
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(
|
|
96
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(LoaderCircle, { className: "size-8 animate-spin text-accent-2" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Deleting folder\u2026" })] }));
|
|
97
97
|
}
|
|
98
98
|
if (phase === "error") {
|
|
99
99
|
return (_jsxs("div", { className: "space-y-4 px-5 py-4", children: [_jsx(Banner, { tone: "danger", variant: "soft", children: errorMessage ?? "Something went wrong. Please try again." }), progress && (_jsxs("p", { className: "text-xs text-fg-muted", children: [moveProgressLabel(progress), ". Already-moved emails stay moved \u2014 re-open delete to continue with the rest."] })), _jsx("div", { className: "flex justify-end", children: _jsx(Button, { variant: "secondary", size: "sm", onClick: handleClose, children: "Close" }) })] }));
|
|
100
100
|
}
|
|
101
101
|
if (stage === "confirm-empty") {
|
|
102
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: _jsxs("p", { children: ["Delete ", _jsx("strong", { className: "text-fg", children: name }), "? This folder is empty and will be removed from the server."] }) }), _jsxs("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: handleClose, children: "Cancel" }), _jsx(Button, { variant: "danger", size: "sm", icon: _jsx(
|
|
102
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: _jsxs("p", { children: ["Delete ", _jsx("strong", { className: "text-fg", children: name }), "? This folder is empty and will be removed from the server."] }) }), _jsxs("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: handleClose, children: "Cancel" }), _jsx(Button, { variant: "danger", size: "sm", icon: _jsx(Trash, { className: "size-3.5" }), onClick: () => handleDeleteEmpty(), children: "Delete folder" })] })] }));
|
|
103
103
|
}
|
|
104
104
|
if (stage === "choose-fate") {
|
|
105
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: [arrivedSinceSync !== undefined && (_jsx(Banner, { tone: "warning", variant: "soft", children: `This folder is not empty: the mail server reports ${emailCount(arrivedSinceSync)} in it. Nothing was deleted.` })), _jsxs("p", { children: [_jsx("strong", { className: "text-fg", children: name }), " holds", " ", emailCount(messageCount), ". What should happen to them?"] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("button", { type: "button", onClick: () => setStage("confirm-delete-all"), className: "flex w-full items-center gap-3 rounded-sm border border-line px-3 py-2.5 text-left hover:bg-surface-raised", children: [_jsx(
|
|
105
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: [arrivedSinceSync !== undefined && (_jsx(Banner, { tone: "warning", variant: "soft", children: `This folder is not empty: the mail server reports ${emailCount(arrivedSinceSync)} in it. Nothing was deleted.` })), _jsxs("p", { children: [_jsx("strong", { className: "text-fg", children: name }), " holds", " ", emailCount(messageCount), ". What should happen to them?"] }), _jsxs("div", { className: "space-y-2", children: [_jsxs("button", { type: "button", onClick: () => setStage("confirm-delete-all"), className: "flex w-full items-center gap-3 rounded-sm border border-line px-3 py-2.5 text-left hover:bg-surface-raised", children: [_jsx(Trash, { className: "size-4 shrink-0 text-danger" }), _jsxs("span", { className: "flex-1", children: [_jsx("span", { className: "block text-sm font-medium text-fg", children: "Delete them with the folder" }), _jsx("span", { className: "block text-xs text-fg-muted", children: "The emails are removed from the server and can't be recovered." })] })] }), _jsxs("button", { type: "button", onClick: () => setStage("pick-destination"), className: "flex w-full items-center gap-3 rounded-sm border border-line px-3 py-2.5 text-left hover:bg-surface-raised", children: [_jsx(FolderInput, { className: "size-4 shrink-0 text-accent-2" }), _jsxs("span", { className: "flex-1", children: [_jsx("span", { className: "block text-sm font-medium text-fg", children: "Move them to another folder" }), _jsx("span", { className: "block text-xs text-fg-muted", children: "Keep the emails, then delete the emptied folder." })] })] })] })] }), _jsx("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: _jsx(Button, { variant: "secondary", size: "sm", onClick: handleClose, children: "Cancel" }) })] }));
|
|
106
106
|
}
|
|
107
107
|
if (stage === "confirm-delete-all") {
|
|
108
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: _jsxs("p", { children: ["Delete ", _jsx("strong", { className: "text-fg", children: name }), " and its", " ", emailCount(messageCount), "? The messages are removed from the server with the folder and can't be recovered."] }) }), _jsxs("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: () => setStage("choose-fate"), children: "Back" }), _jsx(Button, { variant: "danger", size: "sm", icon: _jsx(
|
|
108
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: _jsxs("p", { children: ["Delete ", _jsx("strong", { className: "text-fg", children: name }), " and its", " ", emailCount(messageCount), "? The messages are removed from the server with the folder and can't be recovered."] }) }), _jsxs("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: () => setStage("choose-fate"), children: "Back" }), _jsx(Button, { variant: "danger", size: "sm", icon: _jsx(Trash, { className: "size-3.5" }), onClick: () => deleteMailbox(), children: "Delete folder and emails" })] })] }));
|
|
109
109
|
}
|
|
110
110
|
return (_jsxs("div", { className: "flex h-[26rem] flex-col", children: [_jsxs("p", { className: "px-5 pt-4 text-sm text-fg-muted", children: ["Move the ", emailCount(messageCount), " in", " ", _jsx("strong", { className: "text-fg", children: name }), " to:"] }), _jsx("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: _jsx(FolderTreePicker, { folders: destinations, selectedId: destinationId, delimiter: mailboxes[0]?.hierarchyDelimiter ?? "/", onSelect: setDestinationId, onCreateFolder: createFolderIn, onCancel: () => {
|
|
111
111
|
setDestinationId(undefined);
|
|
112
112
|
setStage("choose-fate");
|
|
113
113
|
}, labels: { filterPlaceholder: "Move emails to…" } }) }), destination && (_jsx("footer", { className: "shrink-0 border-t border-line p-2", children: _jsx(Button, { variant: "danger", onClick: () => moveThenDelete(destination.id), className: "h-11 w-full font-semibold", children: _jsx("span", { className: "truncate", children: `Move ${emailCount(messageCount)} to ${destination.label}` }) }) }))] }));
|
|
114
114
|
})();
|
|
115
|
-
return (_jsxs(Dialog, { open: open, onClose: handleClose, title: title, children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(
|
|
115
|
+
return (_jsxs(Dialog, { open: open, onClose: handleClose, title: title, children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(TriangleAlert, { className: "size-4 shrink-0 text-danger" }), _jsx("span", { className: "flex-1 text-sm font-semibold text-fg", children: title }), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(X, { className: "size-3.5" }), onClick: handleClose, "aria-label": "Cancel" })] }), body] }));
|
|
116
116
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, FilterRuleEditor, previewCountSummary, } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { CircleCheck, LoaderCircle } from "@remit/ui/icons";
|
|
4
4
|
import { useMemo, useRef, useState } from "react";
|
|
5
5
|
import { useCreateMailbox } from "../../hooks/useCreateMailbox";
|
|
6
6
|
import { useCreateLabel } from "../../hooks/useLabels";
|
|
@@ -124,17 +124,17 @@ export function FilterEditor({ accountId, filter, folders, delimiter, labels, on
|
|
|
124
124
|
return (_jsx(FilterRuleEditor, { rule: rule, folders: folders, delimiter: delimiter, labels: labels, preview: preview, clauseFields: SUPPORTED_CLAUSE_FIELDS, persisted: true, clauseEdit: clauseEdit, onStartAddClause: startAddClause, onStartEditClause: startEditClause, onRemoveClause: removeClause, onChangeDraftField: changeDraftField, onChangeDraftValue: changeDraftValue, onSubmitClause: submitClause, onCancelClause: () => setClauseEdit(undefined), onChangeMatchOperator: changeMatchOperator, onChangeMove: changeMove, onCreateFolder: createFolderIn, onChangeLabel: changeLabel, onCreateLabel: onCreateLabel, onChangeName: changeName, onChangeScope: changeScope, onChangeUntil: changeUntil, onCommit: commit, onCancel: onClose }));
|
|
125
125
|
}
|
|
126
126
|
function SavingState() {
|
|
127
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(
|
|
127
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-10 text-center", children: [_jsx(LoaderCircle, { className: "size-8 animate-spin text-accent-2" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Saving changes\u2026" })] }));
|
|
128
128
|
}
|
|
129
129
|
function FilterUpdated({ onClose }) {
|
|
130
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [_jsx(
|
|
130
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [_jsx(CircleCheck, { className: "size-8 text-positive" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Filter updated" }), _jsx(Button, { variant: "primary", onClick: onClose, className: "mt-2", children: "Done" })] }));
|
|
131
131
|
}
|
|
132
132
|
function ReapplyOffer({ preview, blocked, onReapply, onClose, }) {
|
|
133
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [_jsx(
|
|
133
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [_jsx(CircleCheck, { className: "size-8 text-positive" }), _jsx("p", { className: "text-sm font-medium text-fg", children: "Rule saved" }), _jsxs("p", { className: "max-w-xs text-xs text-fg-muted", children: ["New mail follows the rule automatically. ", preview, " \u2014 move the mail already in your mailbox too?"] }), _jsxs("div", { className: "mt-2 flex gap-2", children: [_jsx(Button, { variant: "primary", onClick: onReapply, disabled: blocked, children: "Move existing mail" }), _jsx(Button, { variant: "ghost", onClick: onClose, children: "Not now" })] })] }));
|
|
134
134
|
}
|
|
135
135
|
function ReapplyProgress({ progress, isDone, onClose, }) {
|
|
136
136
|
const failed = progress.state === "Failed";
|
|
137
|
-
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [!isDone ? (_jsx(
|
|
137
|
+
return (_jsxs("div", { className: "flex flex-col items-center gap-3 px-5 py-8 text-center", children: [!isDone ? (_jsx(LoaderCircle, { className: "size-8 animate-spin text-accent-2" })) : failed ? (_jsx("span", { className: "text-sm font-semibold text-danger", children: "Move failed" })) : (_jsx(CircleCheck, { className: "size-8 text-positive" })), !isDone && (_jsx("p", { className: "text-sm font-medium text-fg", children: "Moving existing mail\u2026" })), isDone && !failed && (_jsxs("div", { className: "text-sm text-fg", children: [_jsx("p", { className: "font-medium", children: "Done" }), _jsxs("p", { className: "mt-1 text-xs text-fg-muted", children: [progress.appliedCount, " of ", progress.matchedCount, " moved", progress.failedCount > 0
|
|
138
138
|
? ` · ${progress.failedCount} failed`
|
|
139
139
|
: "", "."] })] })), isDone && failed && (_jsx("p", { className: "max-w-xs text-xs text-fg-muted", children: progress.errorMessage || "Something went wrong. Please try again." })), isDone && (_jsx(Button, { variant: "primary", onClick: onClose, className: "mt-2", children: "Done" }))] }));
|
|
140
140
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Badge, Button, LabelChip } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { Trash } from "@remit/ui/icons";
|
|
4
4
|
import { disabledReasonCopy, filterDisplayStatus, formatExpiresAt, } from "../../lib/organize/filter-status";
|
|
5
5
|
import { NO_ACTION } from "../../lib/organize/organize-model";
|
|
6
6
|
const runStatusLine = (status) => {
|
|
@@ -53,6 +53,6 @@ export function FiltersList({ filters, mailboxName, labelById, onEdit, onDelete,
|
|
|
53
53
|
labelId: label.id,
|
|
54
54
|
name: label.name,
|
|
55
55
|
color: label.color,
|
|
56
|
-
} }) }))] }), runnable && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onRunNow(filter.filterId), disabled: busy, "aria-label": `Run now: filter ${filter.name}`, children: busy ? "Running…" : "Run now" })), !expired && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onToggle(filter.filterId, disabled), disabled: togglingFilterId === filter.filterId, "aria-label": `${disabled ? "Turn on" : "Turn off"} filter ${filter.name}`, children: disabled ? "Turn on" : "Turn off" })), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(
|
|
56
|
+
} }) }))] }), runnable && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onRunNow(filter.filterId), disabled: busy, "aria-label": `Run now: filter ${filter.name}`, children: busy ? "Running…" : "Run now" })), !expired && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => onToggle(filter.filterId, disabled), disabled: togglingFilterId === filter.filterId, "aria-label": `${disabled ? "Turn on" : "Turn off"} filter ${filter.name}`, children: disabled ? "Turn on" : "Turn off" })), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(Trash, { className: "size-4 text-danger" }), onClick: () => onDelete(filter.filterId), disabled: deletingFilterId === filter.filterId, "aria-label": `Delete filter ${filter.name}` })] }, filter.filterId));
|
|
57
57
|
}) }));
|
|
58
58
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Input, LabelChip, labelColorOptions, Select } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { Trash } from "@remit/ui/icons";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
/**
|
|
6
6
|
* The account's labels, each renamable and recolorable inline and deletable
|
|
@@ -33,5 +33,5 @@ export function LabelsList({ labels, onRename, onRecolor, onDelete, deletingLabe
|
|
|
33
33
|
setDraftName(label.name);
|
|
34
34
|
}, "aria-label": `Rename label ${label.name}`, className: "flex items-center gap-2 rounded-sm text-left hover:opacity-80", children: _jsx(LabelChip, { label: label }) })), _jsx("p", { className: "mt-0.5 text-xs text-fg-subtle", children: label.filterCount === 0
|
|
35
35
|
? "Not used in any filter"
|
|
36
|
-
: `Used in ${label.filterCount} ${label.filterCount === 1 ? "filter" : "filters"}` })] }), _jsx(Select, { "aria-label": `Color for ${label.name}`, value: label.color, onChange: (event) => onRecolor(label.labelId, event.target.value), className: "w-28 shrink-0", children: labelColorOptions.map((color) => (_jsx("option", { value: color, children: color }, color))) }), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(
|
|
36
|
+
: `Used in ${label.filterCount} ${label.filterCount === 1 ? "filter" : "filters"}` })] }), _jsx(Select, { "aria-label": `Color for ${label.name}`, value: label.color, onChange: (event) => onRecolor(label.labelId, event.target.value), className: "w-28 shrink-0", children: labelColorOptions.map((color) => (_jsx("option", { value: color, children: color }, color))) }), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(Trash, { className: "size-4 text-danger" }), onClick: () => onDelete(label), disabled: deletingLabelId === label.labelId, "aria-label": `Delete label ${label.name}` })] }, label.labelId))) }));
|
|
37
37
|
}
|
|
@@ -6,7 +6,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
* over SSH.
|
|
7
7
|
*/
|
|
8
8
|
import { ButtonLink } from "@remit/ui";
|
|
9
|
-
import { ShieldCheck } from "
|
|
9
|
+
import { ShieldCheck } from "@remit/ui/icons";
|
|
10
10
|
import { getRuntimeConfig } from "../../runtime-config";
|
|
11
11
|
export function TlsRootCaDownload() {
|
|
12
12
|
if (getRuntimeConfig().tlsMode !== "internal")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { AttentionDot } from "@remit/ui";
|
|
3
|
-
import { TriangleAlert } from "
|
|
3
|
+
import { TriangleAlert } from "@remit/ui/icons";
|
|
4
4
|
import { useWarningsAttention } from "../../hooks/useWarningsAttention";
|
|
5
5
|
export function WarningsNavIcon() {
|
|
6
6
|
const attention = useWarningsAttention();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { configOperationsGetConfigOptions } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
|
|
3
3
|
import { Button, formatErrorMessage, formatQuarantineReport, formatSyncWarningReport, MessageReportDialog, QuarantineSection, quarantineIssueTitle, quarantineReportSections, SyncWarningSection, syncWarningIssueTitle, } from "@remit/ui";
|
|
4
|
+
import { Bug } from "@remit/ui/icons";
|
|
4
5
|
import { useQuery } from "@tanstack/react-query";
|
|
5
|
-
import { Bug } from "lucide-react";
|
|
6
6
|
import { useMemo, useState } from "react";
|
|
7
7
|
import { SignInAgain } from "../../auth/SignInAgain";
|
|
8
8
|
import { useResultFolderIndex } from "../../hooks/useResultFolderIndex";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Banner, Button, DropdownMenu, DropdownMenuItem, DropdownMenuSeparator, } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { Ellipsis } from "@remit/ui/icons";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
5
|
import { usePeople } from "../../../hooks/usePeople";
|
|
6
6
|
import { classifyPeopleFailure, formatPersonDate, peopleListFailureReason, peopleReportHref, personActionCopy, } from "../../../lib/people";
|
|
@@ -17,7 +17,7 @@ function ActionFailedBanner({ failure }) {
|
|
|
17
17
|
}
|
|
18
18
|
function PersonMenu({ person, onPick, }) {
|
|
19
19
|
const disabled = person.status === "Disabled";
|
|
20
|
-
return (_jsxs(DropdownMenu, { trigger: _jsxs(_Fragment, { children: [_jsx(
|
|
20
|
+
return (_jsxs(DropdownMenu, { trigger: _jsxs(_Fragment, { children: [_jsx(Ellipsis, { className: "size-4", "aria-hidden": "true" }), _jsxs("span", { className: "sr-only", children: ["Actions for ", person.email] })] }), children: [_jsx(DropdownMenuItem, { onClick: () => onPick("SignOut"), children: "Sign out everywhere" }), _jsx(DropdownMenuItem, { onClick: () => onPick("ResetPassword"), children: "Reset password" }), _jsx(DropdownMenuSeparator, {}), disabled ? (_jsx(DropdownMenuItem, { onClick: () => onPick("Enable"), children: "Enable" })) : (_jsx(DropdownMenuItem, { onClick: () => onPick("Disable"), disabled: person.isCaller, destructive: !person.isCaller, children: _jsxs("span", { className: "flex flex-col", children: [_jsx("span", { children: "Disable" }), person.isCaller && (_jsx("span", { className: "text-xs text-fg-subtle", children: "Not your own account" }))] }) }))] }));
|
|
21
21
|
}
|
|
22
22
|
function PeopleTable({ people, onPick, }) {
|
|
23
23
|
const now = new Date();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Dialog, PasswordInput } from "@remit/ui";
|
|
3
|
-
import { X } from "
|
|
3
|
+
import { X } from "@remit/ui/icons";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { usePersonAction, } from "../../../hooks/usePersonAction";
|
|
6
6
|
import { classifyPeopleFailure, personActionCopy } from "../../../lib/people";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button, Dialog } from "@remit/ui";
|
|
3
|
-
import { Check, Copy } from "
|
|
3
|
+
import { Check, Copy } from "@remit/ui/icons";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
const ignoreDismiss = () => undefined;
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Bug } from "
|
|
2
|
+
import { Bug } from "@remit/ui/icons";
|
|
3
3
|
import { openBugReport } from "../../lib/bug-report";
|
|
4
4
|
/**
|
|
5
5
|
* The mobile drawer's bug-report row — a full-width labeled control beside
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useOverlayScope } from "@remit/ui";
|
|
3
|
-
import {
|
|
3
|
+
import { OctagonAlert } from "@remit/ui/icons";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
5
|
import { buildBugReportContext, buildBugReportDetails, buildGitHubIssueUrl, } from "../../lib/bug-report";
|
|
6
6
|
import { getCurrentFatalError, subscribeFatalError, } from "../../lib/fatal-error";
|
|
@@ -67,5 +67,5 @@ export const FatalErrorScreen = ({ fatal, onRetry }) => {
|
|
|
67
67
|
const description = fatal.recoverable
|
|
68
68
|
? "The server returned an unexpected error. This is not your fault — nothing was saved or sent. Retry, or report a bug so we can fix it."
|
|
69
69
|
: "Something went wrong and this page can't recover. This is not your fault — nothing was saved or sent. Go to your inbox, or report a bug so we can fix it.";
|
|
70
|
-
return (_jsxs("div", { role: "alert", "aria-live": "assertive", "data-testid": "fatal-error-overlay", className: "fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white", children: [_jsx(
|
|
70
|
+
return (_jsxs("div", { role: "alert", "aria-live": "assertive", "data-testid": "fatal-error-overlay", className: "fixed inset-0 z-[1000] flex flex-col items-center justify-center gap-6 bg-red-700 p-6 text-center text-white", children: [_jsx(OctagonAlert, { className: "size-16 shrink-0", "aria-hidden": "true" }), _jsxs("div", { className: "max-w-lg space-y-3", children: [_jsx("h1", { className: "text-2xl font-bold tracking-tight", children: "Something broke" }), _jsx("p", { className: "text-base text-red-50", children: description }), _jsx("p", { className: "break-words font-mono text-sm text-red-100", children: fatal.message }), _jsxs("p", { className: "font-mono text-xs text-red-200", children: ["Reference: ", fatal.correlationId] })] }), _jsxs("div", { className: "flex flex-wrap items-center justify-center gap-3", children: [fatal.recoverable ? (_jsx("button", { type: "button", onClick: handleRetry, className: "inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50", children: "Retry" })) : (_jsx("a", { href: SAFE_ROUTE, className: "inline-flex min-h-11 items-center rounded-md bg-white px-5 text-sm font-semibold text-red-700 transition-colors hover:bg-red-50", children: "Go to inbox" })), _jsx("button", { type: "button", onClick: handleReportBug, className: "inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10", children: "Report a bug" }), _jsx("button", { type: "button", onClick: handleCopyDetails, className: "inline-flex min-h-11 items-center rounded-md border border-white/70 px-5 text-sm font-semibold text-white transition-colors hover:bg-white/10", children: copied ? "Copied" : "Copy full details" })] })] }));
|
|
71
71
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useModalFocus, useOverlayScope } from "@remit/ui";
|
|
3
|
-
import { LogIn } from "
|
|
3
|
+
import { LogIn } from "@remit/ui/icons";
|
|
4
4
|
import { useEffect, useRef, useState } from "react";
|
|
5
5
|
import { useAuthProvider } from "../../auth/provider";
|
|
6
6
|
import { isSignedOut, resetSignedOut, subscribeSignedOut, } from "../../lib/signed-out";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { accountDetailOperationsDeleteAccountMutation, configOperationsGetConfigOptions, configOperationsGetConfigQueryKey, microsoftOAuthOperationsMicrosoftOAuthStartMutation, } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
|
|
3
3
|
import { ACCOUNT_SERVICE_ROWS, AccountHealthCard, Badge, Banner, Button, Dialog, ErrorState, RowActions, SettingsShell, } from "@remit/ui";
|
|
4
|
+
import { LoaderCircle, Plus, Trash, TriangleAlert, X } from "@remit/ui/icons";
|
|
4
5
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
5
6
|
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
6
|
-
import { AlertTriangle, Loader2, Plus, Trash2, X } from "lucide-react";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { z } from "zod";
|
|
9
9
|
import { OnboardingWizard, } from "../../components/onboarding/OnboardingWizard";
|
|
@@ -357,7 +357,7 @@ function AccountsSettings() {
|
|
|
357
357
|
const trailingButton = (_jsx(RowActions, { actions: [primaryAction], destructive: {
|
|
358
358
|
label: "Delete account",
|
|
359
359
|
iconOnly: true,
|
|
360
|
-
icon: _jsx(
|
|
360
|
+
icon: _jsx(Trash, { className: "size-3.5" }),
|
|
361
361
|
onClick: () => setDeletingAccountId(account.accountId),
|
|
362
362
|
} }));
|
|
363
363
|
return (_jsxs("div", { className: "space-y-2", children: [_jsx(AccountHealthCard, { label: accountLabel(account), email: account.email, connector: isOAuthAccount ? "Microsoft 365" : "IMAP", syncLabel: deriveSyncLabel(account), state: deriveState(account),
|
|
@@ -382,7 +382,7 @@ function AccountsSettings() {
|
|
|
382
382
|
}, onCancel: () => {
|
|
383
383
|
setShowAddWizard(false);
|
|
384
384
|
setMicrosoftReturn(undefined);
|
|
385
|
-
} }) })), _jsx(AccountFormPanel, { isOpen: showForm || !!editingAccountId, account: accountToEdit, focusSmtp: focusSmtp, onClose: handleClosePanel }), _jsxs(Dialog, { open: !!deletingAccountId, onClose: () => setDeletingAccountId(null), title: "Delete account", children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(
|
|
385
|
+
} }) })), _jsx(AccountFormPanel, { isOpen: showForm || !!editingAccountId, account: accountToEdit, focusSmtp: focusSmtp, onClose: handleClosePanel }), _jsxs(Dialog, { open: !!deletingAccountId, onClose: () => setDeletingAccountId(null), title: "Delete account", children: [_jsxs("header", { className: "flex items-center gap-2 border-b border-line px-5 py-3", children: [_jsx(TriangleAlert, { className: "size-4 shrink-0 text-danger" }), _jsx("span", { className: "flex-1 text-sm font-semibold text-fg", children: "Delete account" }), _jsx(Button, { variant: "ghost", size: "sm", icon: _jsx(X, { className: "size-3.5" }), onClick: () => setDeletingAccountId(null), "aria-label": "Cancel" })] }), _jsxs("div", { className: "space-y-3 px-5 py-4 text-sm text-fg-muted", children: [_jsx("p", { className: "text-center text-lg font-medium text-fg", children: "Are you sure?" }), accountToDelete && (_jsx("p", { className: "text-center", children: accountToDelete.email })), _jsxs("ul", { className: "list-inside list-disc space-y-1", children: [_jsx("li", { children: "Remove the account from your settings" }), _jsx("li", { children: "Stop syncing mail for this account" }), _jsx("li", { children: "Delete all associated data (within 24 hours)" })] })] }), _jsxs("footer", { className: "flex items-center justify-end gap-2 border-t border-line px-5 py-3", children: [_jsx(Button, { variant: "secondary", size: "sm", onClick: () => setDeletingAccountId(null), children: "Cancel" }), _jsx(Button, { variant: "danger", size: "sm", "aria-busy": deleteMutation.isPending, icon: deleteMutation.isPending ? (_jsx(LoaderCircle, { className: "size-3.5 animate-spin" })) : undefined, onClick: () => {
|
|
386
386
|
if (deleteMutation.isPending)
|
|
387
387
|
return;
|
|
388
388
|
if (deletingAccountId) {
|
|
@@ -11,9 +11,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
11
11
|
*/
|
|
12
12
|
import { addressDetailOperationsUpdateAddressMutation, addressOperationsSearchAddressesOptions, meOperationsListVipSuggestionsOptions, meOperationsListVipSuggestionsQueryKey, } from "@remit/api-http-client/@tanstack/react-query.gen.ts";
|
|
13
13
|
import { Button, ErrorState, Input, Kbd, SenderFlagRow, SenderGroupSwitch, SettingsShell, } from "@remit/ui";
|
|
14
|
+
import { Search, Star, X } from "@remit/ui/icons";
|
|
14
15
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
|
|
15
16
|
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
|
16
|
-
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";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { CalendarDays, FolderTree, Funnel, Inbox, Palette, Sparkles, Tag, UserCog, Users, } from "@remit/ui/icons";
|
|
2
3
|
import { createFileRoute, Outlet } from "@tanstack/react-router";
|
|
3
|
-
import { CalendarDays, Filter, FolderTree, Inbox, Palette, Sparkles, Tag, UserCog, Users, } from "lucide-react";
|
|
4
4
|
import { AdvancedNavIcon } from "../components/settings/AdvancedNavIcon";
|
|
5
5
|
import { WarningsNavIcon } from "../components/settings/WarningsNavIcon";
|
|
6
6
|
import { usePeople } from "../hooks/usePeople";
|
|
@@ -23,7 +23,7 @@ export const SETTINGS_NAV_ITEMS = [
|
|
|
23
23
|
{
|
|
24
24
|
id: "filters",
|
|
25
25
|
label: "Filters",
|
|
26
|
-
icon: _jsx(
|
|
26
|
+
icon: _jsx(Funnel, { className: "size-4" }),
|
|
27
27
|
},
|
|
28
28
|
{
|
|
29
29
|
id: "labels",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remit/web-client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.346",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Remit web client, published as composable primitives — the app shell, auth shells, and runtime config. A distributor imports what it composes and bundles it.",
|
|
6
6
|
"exports": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@hookform/resolvers": "5.4.0",
|
|
94
|
-
"@remit/ui": "0.0.
|
|
94
|
+
"@remit/ui": "0.0.237",
|
|
95
95
|
"@tanstack/react-query": "5.101.2",
|
|
96
96
|
"@tanstack/react-query-devtools": "5.101.2",
|
|
97
97
|
"@tanstack/react-router": "1.170.18",
|
|
@@ -103,7 +103,6 @@
|
|
|
103
103
|
"i18next": "24.2.3",
|
|
104
104
|
"i18next-browser-languagedetector": "8.2.1",
|
|
105
105
|
"i18next-http-backend": "4.0.4",
|
|
106
|
-
"lucide-react": "0.468.0",
|
|
107
106
|
"p-map": "2.1.0",
|
|
108
107
|
"react-hook-form": "7.82.0",
|
|
109
108
|
"react-i18next": "15.7.4",
|