@alepha/ui 0.27.0 → 0.27.1
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/README.md +56 -15
- package/dist/components/account/account-connections.d.ts.map +1 -1
- package/dist/components/account/account-connections.js +24 -13
- package/dist/components/account/account-connections.js.map +1 -1
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
- package/dist/components/account/account-delete-dialog.js +12 -8
- package/dist/components/account/account-delete-dialog.js.map +1 -1
- package/dist/components/account/account-header.d.ts.map +1 -1
- package/dist/components/account/account-header.js +3 -1
- package/dist/components/account/account-header.js.map +1 -1
- package/dist/components/account/account-keys.d.ts.map +1 -1
- package/dist/components/account/account-keys.js +35 -21
- package/dist/components/account/account-keys.js.map +1 -1
- package/dist/components/account/account-mfa-dialog.d.ts +20 -0
- package/dist/components/account/account-mfa-dialog.d.ts.map +1 -0
- package/dist/components/account/account-mfa-dialog.js +149 -0
- package/dist/components/account/account-mfa-dialog.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -1
- package/dist/components/account/account-password-dialog.js +15 -10
- package/dist/components/account/account-password-dialog.js.map +1 -1
- package/dist/components/account/account-profile.d.ts.map +1 -1
- package/dist/components/account/account-profile.js +25 -25
- package/dist/components/account/account-profile.js.map +1 -1
- package/dist/components/account/account-router.d.ts +76 -2
- package/dist/components/account/account-router.d.ts.map +1 -1
- package/dist/components/account/account-router.js +44 -4
- package/dist/components/account/account-router.js.map +1 -1
- package/dist/components/account/account-security.d.ts +11 -1
- package/dist/components/account/account-security.d.ts.map +1 -1
- package/dist/components/account/account-security.js +119 -32
- package/dist/components/account/account-security.js.map +1 -1
- package/dist/components/account/account-sessions.d.ts.map +1 -1
- package/dist/components/account/account-sessions.js +46 -24
- package/dist/components/account/account-sessions.js.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.js +4 -9
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-status-badge.js +3 -3
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -1
- package/dist/components/admin/admin-jobs-status-labels.d.ts +26 -0
- package/dist/components/admin/admin-jobs-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-labels.js +46 -0
- package/dist/components/admin/admin-jobs-status-labels.js.map +1 -0
- package/dist/components/admin/admin-layout.d.ts.map +1 -1
- package/dist/components/admin/admin-layout.js +5 -3
- package/dist/components/admin/admin-layout.js.map +1 -1
- package/dist/components/admin/admin-notifications-detail-tabs.d.ts +21 -0
- package/dist/components/admin/admin-notifications-detail-tabs.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-detail-tabs.js +122 -0
- package/dist/components/admin/admin-notifications-detail-tabs.js.map +1 -0
- package/dist/components/admin/admin-notifications-detail.d.ts +23 -0
- package/dist/components/admin/admin-notifications-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-detail.js +48 -0
- package/dist/components/admin/admin-notifications-detail.js.map +1 -0
- package/dist/components/admin/admin-notifications-preview-body.d.ts +13 -0
- package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-preview-body.js +64 -0
- package/dist/components/admin/admin-notifications-preview-body.js.map +1 -0
- package/dist/components/admin/admin-notifications-preview-tab.d.ts +24 -0
- package/dist/components/admin/admin-notifications-preview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-preview-tab.js +35 -0
- package/dist/components/admin/admin-notifications-preview-tab.js.map +1 -0
- package/dist/components/admin/admin-notifications-raw-tab.d.ts +18 -0
- package/dist/components/admin/admin-notifications-raw-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-raw-tab.js +53 -0
- package/dist/components/admin/admin-notifications-raw-tab.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-badge.d.ts +17 -0
- package/dist/components/admin/admin-notifications-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-badge.js +32 -0
- package/dist/components/admin/admin-notifications-status-badge.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-labels.d.ts +17 -0
- package/dist/components/admin/admin-notifications-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-labels.js +33 -0
- package/dist/components/admin/admin-notifications-status-labels.js.map +1 -0
- package/dist/components/admin/admin-notifications-status-tones.d.ts +44 -0
- package/dist/components/admin/admin-notifications-status-tones.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-status-tones.js +64 -0
- package/dist/components/admin/admin-notifications-status-tones.js.map +1 -0
- package/dist/components/admin/admin-notifications-template-label.d.ts +16 -0
- package/dist/components/admin/admin-notifications-template-label.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-template-label.js +24 -0
- package/dist/components/admin/admin-notifications-template-label.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +13 -2
- package/dist/components/admin/admin-notifications.d.ts.map +1 -1
- package/dist/components/admin/admin-notifications.js +264 -29
- package/dist/components/admin/admin-notifications.js.map +1 -1
- package/dist/components/admin/admin-router.d.ts +29 -2
- package/dist/components/admin/admin-router.d.ts.map +1 -1
- package/dist/components/admin/admin-router.js +68 -8
- package/dist/components/admin/admin-router.js.map +1 -1
- package/dist/components/admin/admin-sessions.d.ts.map +1 -1
- package/dist/components/admin/admin-sessions.js +1 -1
- package/dist/components/admin/admin-sessions.js.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +12 -2
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-security-tab.js +63 -44
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail.js +20 -15
- package/dist/components/admin/admin-user-detail.js.map +1 -1
- package/dist/components/admin/admin-users.js +1 -1
- package/dist/components/admin/admin-users.js.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-executions-panel.js +4 -12
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -1
- package/dist/components/admin/admin-workflows-status-badge.js +3 -3
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -1
- package/dist/components/admin/admin-workflows-status-labels.d.ts +19 -0
- package/dist/components/admin/admin-workflows-status-labels.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-labels.js +48 -0
- package/dist/components/admin/admin-workflows-status-labels.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +6 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
- package/dist/components/alepha-table/alepha-table.js +33 -5
- package/dist/components/alepha-table/alepha-table.js.map +1 -1
- package/dist/components/auth/auth-login.d.ts.map +1 -1
- package/dist/components/auth/auth-login.js +27 -17
- package/dist/components/auth/auth-login.js.map +1 -1
- package/dist/components/auth/auth-mfa-step.d.ts +25 -0
- package/dist/components/auth/auth-mfa-step.d.ts.map +1 -0
- package/dist/components/auth/auth-mfa-step.js +122 -0
- package/dist/components/auth/auth-mfa-step.js.map +1 -0
- package/dist/components/auth/auth-register.js +2 -2
- package/dist/components/auth/auth-register.js.map +1 -1
- package/dist/components/auth/auth-reset-password.js +2 -2
- package/dist/components/auth/auth-router.d.ts +20 -0
- package/dist/components/auth/auth-router.d.ts.map +1 -1
- package/dist/components/auth/provider-labels.d.ts.map +1 -1
- package/dist/components/auth/provider-labels.js +1 -0
- package/dist/components/auth/provider-labels.js.map +1 -1
- package/dist/components/control/control.d.ts +11 -2
- package/dist/components/control/control.d.ts.map +1 -1
- package/dist/components/control/control.js +7 -2
- package/dist/components/control/control.js.map +1 -1
- package/dist/components/control-array/control-array.d.ts.map +1 -1
- package/dist/components/control-array/control-array.js +55 -10
- package/dist/components/control-array/control-array.js.map +1 -1
- package/dist/components/control-number/control-number.d.ts +5 -0
- package/dist/components/control-number/control-number.d.ts.map +1 -1
- package/dist/components/control-number/control-number.js +1 -0
- package/dist/components/control-number/control-number.js.map +1 -1
- package/dist/components/control-object/control-object.d.ts +12 -1
- package/dist/components/control-object/control-object.d.ts.map +1 -1
- package/dist/components/control-object/control-object.js +2 -1
- package/dist/components/control-object/control-object.js.map +1 -1
- package/dist/components/control-password/control-password.d.ts.map +1 -1
- package/dist/components/control-password/control-password.js +1 -0
- package/dist/components/control-password/control-password.js.map +1 -1
- package/dist/components/detail/detail-layout.d.ts +6 -0
- package/dist/components/detail/detail-layout.d.ts.map +1 -1
- package/dist/components/detail/detail-layout.js +2 -1
- package/dist/components/detail/detail-layout.js.map +1 -1
- package/dist/components/email-body-frame/email-body-frame.d.ts +37 -0
- package/dist/components/email-body-frame/email-body-frame.d.ts.map +1 -0
- package/dist/components/email-body-frame/email-body-frame.js +44 -0
- package/dist/components/email-body-frame/email-body-frame.js.map +1 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.d.ts +33 -0
- package/dist/components/markdown-view/diagram/DiagramLabel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/{FlowchartDiagramLabel.js → DiagramLabel.js} +15 -6
- package/dist/components/markdown-view/diagram/DiagramLabel.js.map +1 -0
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts +0 -5
- package/dist/components/markdown-view/diagram/FlowchartDiagram.d.ts.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js +2 -6
- package/dist/components/markdown-view/diagram/FlowchartDiagram.js.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramCluster.js.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.d.ts.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js +2 -3
- package/dist/components/markdown-view/diagram/FlowchartDiagramEdge.js.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.d.ts.map +1 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js +2 -3
- package/dist/components/markdown-view/diagram/FlowchartDiagramNode.js.map +1 -1
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts +20 -11
- package/dist/components/markdown-view/diagram/MermaidFence.d.ts.map +1 -1
- package/dist/components/markdown-view/diagram/MermaidFence.js +48 -13
- package/dist/components/markdown-view/diagram/MermaidFence.js.map +1 -1
- package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts +50 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.js +141 -0
- package/dist/components/markdown-view/diagram/SequenceDiagram.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts +23 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js +101 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramFragment.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts +23 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js +77 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramMessage.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts +16 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.js +39 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramNote.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts +20 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js +61 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipant.js.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts +27 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js +65 -0
- package/dist/components/markdown-view/diagram/SequenceDiagramParticipantActor.js.map +1 -0
- package/dist/components/markdown-view/diagram/layoutSequence.d.ts +155 -0
- package/dist/components/markdown-view/diagram/layoutSequence.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/layoutSequence.js +478 -0
- package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceModel.d.ts +132 -0
- package/dist/components/markdown-view/diagram/sequenceModel.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceModel.js +0 -0
- package/dist/components/markdown-view/diagram/sequenceParser.d.ts +32 -0
- package/dist/components/markdown-view/diagram/sequenceParser.d.ts.map +1 -0
- package/dist/components/markdown-view/diagram/sequenceParser.js +312 -0
- package/dist/components/markdown-view/diagram/sequenceParser.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.css +65 -0
- package/dist/components/markdown-view/markdown-view.d.ts +18 -11
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
- package/dist/components/markdown-view/markdown-view.js +30 -16
- package/dist/components/markdown-view/markdown-view.js.map +1 -1
- package/dist/components/nav-shell/nav-page.d.ts +7 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-page.js.map +1 -1
- package/dist/components/nav-shell/nav-tree-util.d.ts +64 -2
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -1
- package/dist/components/nav-shell/nav-tree-util.js +29 -6
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -1
- package/dist/components/nav-shell/spotlight.d.ts +3 -2
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -1
- package/dist/components/nav-shell/spotlight.js +9 -6
- package/dist/components/nav-shell/spotlight.js.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +9 -2
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.d.ts +6 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-entries.js +8 -3
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -1
- package/dist/components/nav-shell/use-nav-tree.js +1 -1
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +1 -1
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.js +1 -0
- package/dist/components/ui/alert-dialog.js.map +1 -1
- package/dist/components/ui/alert.d.ts +2 -2
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/alert.js +1 -0
- package/dist/components/ui/alert.js.map +1 -1
- package/dist/components/ui/avatar.d.ts +2 -2
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar.js +1 -0
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +2 -2
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.js +1 -0
- package/dist/components/ui/breadcrumb.js.map +1 -1
- package/dist/components/ui/card.d.ts +2 -2
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/card.js +1 -0
- package/dist/components/ui/card.js.map +1 -1
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/combobox.d.ts +1 -1
- package/dist/components/ui/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox.js.map +1 -1
- package/dist/components/ui/command.d.ts +2 -2
- package/dist/components/ui/command.d.ts.map +1 -1
- package/dist/components/ui/command.js +1 -0
- package/dist/components/ui/command.js.map +1 -1
- package/dist/components/ui/context-menu.d.ts +2 -2
- package/dist/components/ui/context-menu.d.ts.map +1 -1
- package/dist/components/ui/context-menu.js +1 -0
- package/dist/components/ui/context-menu.js.map +1 -1
- package/dist/components/ui/dialog.d.ts +1 -1
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog.js +1 -0
- package/dist/components/ui/dialog.js.map +1 -1
- package/dist/components/ui/drawer.d.ts +1 -1
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/drawer.js.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.js +1 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/empty.d.ts +1 -1
- package/dist/components/ui/empty.d.ts.map +1 -1
- package/dist/components/ui/empty.js.map +1 -1
- package/dist/components/ui/hover-card.d.ts +1 -1
- package/dist/components/ui/hover-card.js.map +1 -1
- package/dist/components/ui/input-group.d.ts +2 -2
- package/dist/components/ui/input-group.d.ts.map +1 -1
- package/dist/components/ui/input-group.js +1 -0
- package/dist/components/ui/input-group.js.map +1 -1
- package/dist/components/ui/input-otp.d.ts +1 -1
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/input-otp.js.map +1 -1
- package/dist/components/ui/input.d.ts +1 -1
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/input.js +1 -0
- package/dist/components/ui/input.js.map +1 -1
- package/dist/components/ui/label.d.ts +1 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/label.js +1 -0
- package/dist/components/ui/label.js.map +1 -1
- package/dist/components/ui/menubar.d.ts +2 -2
- package/dist/components/ui/menubar.d.ts.map +1 -1
- package/dist/components/ui/menubar.js +1 -0
- package/dist/components/ui/menubar.js.map +1 -1
- package/dist/components/ui/pagination.d.ts +1 -1
- package/dist/components/ui/pagination.d.ts.map +1 -1
- package/dist/components/ui/pagination.js +1 -0
- package/dist/components/ui/pagination.js.map +1 -1
- package/dist/components/ui/popover.d.ts +1 -1
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/popover.js +1 -0
- package/dist/components/ui/popover.js.map +1 -1
- package/dist/components/ui/progress.d.ts +1 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/progress.js.map +1 -1
- package/dist/components/ui/segmented.d.ts +11 -0
- package/dist/components/ui/segmented.d.ts.map +1 -1
- package/dist/components/ui/segmented.js +6 -2
- package/dist/components/ui/segmented.js.map +1 -1
- package/dist/components/ui/select.d.ts +1 -1
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +1 -0
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/sheet.d.ts +2 -2
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sheet.js +1 -0
- package/dist/components/ui/sheet.js.map +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/table.d.ts +2 -2
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/table.js +1 -0
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tabs.js.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea.js +1 -0
- package/dist/components/ui/textarea.js.map +1 -1
- package/dist/components/ui/tooltip.d.ts +1 -11
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tooltip.js +0 -10
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/hooks/use-mobile.d.ts +1 -1
- package/dist/hooks/use-mobile.js +1 -1
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/lib/i18n-fr.d.ts.map +1 -1
- package/dist/lib/i18n-fr.js +252 -2
- package/dist/lib/i18n-fr.js.map +1 -1
- package/package.json +5 -5
- package/src/components/account/__tests__/account-router.spec.ts +25 -0
- package/src/components/account/__tests__/account-security-mfa-gate.browser.spec.tsx +76 -0
- package/src/components/account/account-connections.tsx +50 -18
- package/src/components/account/account-delete-dialog.tsx +24 -9
- package/src/components/account/account-header.tsx +4 -1
- package/src/components/account/account-keys.tsx +73 -29
- package/src/components/account/account-mfa-dialog.tsx +233 -0
- package/src/components/account/account-password-dialog.tsx +42 -12
- package/src/components/account/account-profile.tsx +66 -25
- package/src/components/account/account-router.tsx +47 -6
- package/src/components/account/account-security.tsx +209 -22
- package/src/components/account/account-sessions.tsx +87 -22
- package/src/components/action-error-toaster/__tests__/action-error-toaster.browser.spec.tsx +114 -0
- package/src/components/admin/__tests__/admin-nav-i18n.browser.spec.tsx +152 -0
- package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +128 -0
- package/src/components/admin/__tests__/admin-notifications-raw-tab.browser.spec.tsx +76 -0
- package/src/components/admin/__tests__/admin-notifications-status-badge.browser.spec.tsx +121 -0
- package/src/components/admin/__tests__/admin-router.spec.ts +27 -0
- package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +152 -0
- package/src/components/admin/__tests__/admin-user-detail-security-tab.browser.spec.tsx +92 -0
- package/src/components/admin/admin-jobs-executions-panel.tsx +8 -11
- package/src/components/admin/admin-jobs-status-badge.tsx +4 -5
- package/src/components/admin/admin-jobs-status-labels.ts +46 -0
- package/src/components/admin/admin-layout.tsx +9 -3
- package/src/components/admin/admin-notifications-detail-tabs.tsx +167 -0
- package/src/components/admin/admin-notifications-detail.tsx +100 -0
- package/src/components/admin/admin-notifications-preview-body.tsx +104 -0
- package/src/components/admin/admin-notifications-preview-tab.tsx +55 -0
- package/src/components/admin/admin-notifications-raw-tab.tsx +76 -0
- package/src/components/admin/admin-notifications-status-badge.tsx +44 -0
- package/src/components/admin/admin-notifications-status-labels.ts +42 -0
- package/src/components/admin/admin-notifications-status-tones.ts +85 -0
- package/src/components/admin/admin-notifications-template-label.ts +22 -0
- package/src/components/admin/admin-notifications.tsx +398 -31
- package/src/components/admin/admin-router.tsx +65 -8
- package/src/components/admin/admin-sessions.tsx +10 -3
- package/src/components/admin/admin-user-detail-security-tab.tsx +70 -5
- package/src/components/admin/admin-user-detail-sessions-tab.tsx +10 -3
- package/src/components/admin/admin-user-detail.tsx +92 -23
- package/src/components/admin/admin-users.tsx +1 -1
- package/src/components/admin/admin-workflows-executions-panel.tsx +8 -16
- package/src/components/admin/admin-workflows-status-badge.tsx +4 -5
- package/src/components/admin/admin-workflows-status-labels.ts +51 -0
- package/src/components/alepha-table/__tests__/alepha-table-row-key.browser.spec.tsx +106 -0
- package/src/components/alepha-table/alepha-table.tsx +50 -10
- package/src/components/auth/auth-login.tsx +37 -18
- package/src/components/auth/auth-mfa-step.tsx +177 -0
- package/src/components/auth/auth-register.tsx +1 -1
- package/src/components/auth/provider-labels.ts +4 -0
- package/src/components/control/__tests__/control-autofocus.browser.spec.tsx +107 -0
- package/src/components/control/control.tsx +20 -5
- package/src/components/control-array/__tests__/control-array-child-change.browser.spec.tsx +90 -0
- package/src/components/control-array/control-array.tsx +85 -13
- package/src/components/control-number/control-number.tsx +7 -0
- package/src/components/control-object/__tests__/control-object-clear.browser.spec.tsx +100 -0
- package/src/components/control-object/control-object.tsx +21 -2
- package/src/components/control-password/control-password.tsx +2 -1
- package/src/components/detail/__tests__/detail-layout.browser.spec.tsx +36 -0
- package/src/components/detail/detail-layout.tsx +20 -1
- package/src/components/email-body-frame/__tests__/email-body-frame.browser.spec.tsx +52 -0
- package/src/components/email-body-frame/email-body-frame.tsx +81 -0
- package/src/components/markdown-view/__tests__/markdown-view-mermaid.browser.spec.tsx +65 -2
- package/src/components/markdown-view/diagram/{FlowchartDiagramLabel.tsx → DiagramLabel.tsx} +14 -4
- package/src/components/markdown-view/diagram/FlowchartDiagram.tsx +1 -6
- package/src/components/markdown-view/diagram/FlowchartDiagramCluster.tsx +1 -1
- package/src/components/markdown-view/diagram/FlowchartDiagramEdge.tsx +2 -3
- package/src/components/markdown-view/diagram/FlowchartDiagramNode.tsx +2 -3
- package/src/components/markdown-view/diagram/MermaidFence.tsx +65 -15
- package/src/components/markdown-view/diagram/SequenceDiagram.tsx +203 -0
- package/src/components/markdown-view/diagram/SequenceDiagramFragment.tsx +120 -0
- package/src/components/markdown-view/diagram/SequenceDiagramMessage.tsx +100 -0
- package/src/components/markdown-view/diagram/SequenceDiagramNote.tsx +46 -0
- package/src/components/markdown-view/diagram/SequenceDiagramParticipant.tsx +80 -0
- package/src/components/markdown-view/diagram/SequenceDiagramParticipantActor.tsx +74 -0
- package/src/components/markdown-view/diagram/__tests__/sequence-diagram.browser.spec.tsx +267 -0
- package/src/components/markdown-view/diagram/layoutSequence.spec.ts +535 -0
- package/src/components/markdown-view/diagram/layoutSequence.ts +764 -0
- package/src/components/markdown-view/diagram/sequenceModel.ts +141 -0
- package/src/components/markdown-view/diagram/sequenceParser.spec.ts +495 -0
- package/src/components/markdown-view/diagram/sequenceParser.ts +443 -0
- package/src/components/markdown-view/markdown-view.css +65 -0
- package/src/components/markdown-view/markdown-view.tsx +34 -16
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +107 -1
- package/src/components/nav-shell/nav-page.tsx +8 -0
- package/src/components/nav-shell/nav-tree-util.ts +95 -2
- package/src/components/nav-shell/spotlight.tsx +22 -8
- package/src/components/nav-shell/use-nav-breadcrumbs.ts +9 -2
- package/src/components/nav-shell/use-nav-entries.ts +18 -2
- package/src/components/nav-shell/use-nav-tree.ts +4 -1
- package/src/components/ui/alert-dialog.tsx +1 -1
- package/src/components/ui/alert.tsx +2 -2
- package/src/components/ui/avatar.tsx +3 -3
- package/src/components/ui/breadcrumb.tsx +3 -3
- package/src/components/ui/card.tsx +5 -5
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/combobox.tsx +8 -8
- package/src/components/ui/command.tsx +4 -4
- package/src/components/ui/context-menu.tsx +7 -7
- package/src/components/ui/dialog.tsx +1 -1
- package/src/components/ui/drawer.tsx +6 -6
- package/src/components/ui/dropdown-menu.tsx +8 -14
- package/src/components/ui/empty.tsx +3 -3
- package/src/components/ui/hover-card.tsx +1 -1
- package/src/components/ui/input-group.tsx +2 -2
- package/src/components/ui/input-otp.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/components/ui/label.tsx +1 -1
- package/src/components/ui/menubar.tsx +9 -9
- package/src/components/ui/pagination.tsx +1 -1
- package/src/components/ui/popover.tsx +1 -1
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/segmented.tsx +28 -0
- package/src/components/ui/select.tsx +1 -1
- package/src/components/ui/sheet.tsx +4 -4
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +6 -9
- package/src/components/ui/tabs.tsx +1 -1
- package/src/components/ui/textarea.tsx +1 -1
- package/src/components/ui/tooltip.tsx +3 -11
- package/src/components/use-dialog/__tests__/use-dialog-providers.browser.spec.tsx +61 -0
- package/src/hooks/use-mobile.ts +1 -1
- package/src/lib/__tests__/i18n-fr.spec.ts +27 -5
- package/src/lib/i18n-fr.ts +308 -1
- package/dist/components/language-toggle/language-toggle.d.ts +0 -8
- package/dist/components/language-toggle/language-toggle.d.ts.map +0 -1
- package/dist/components/language-toggle/language-toggle.js +0 -49
- package/dist/components/language-toggle/language-toggle.js.map +0 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts +0 -23
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.d.ts.map +0 -1
- package/dist/components/markdown-view/diagram/FlowchartDiagramLabel.js.map +0 -1
- package/dist/components/ui/accordion.d.ts +0 -7
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js +0 -55
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/aspect-ratio.d.ts +0 -5
- package/dist/components/ui/aspect-ratio.d.ts.map +0 -1
- package/dist/components/ui/aspect-ratio.js +0 -15
- package/dist/components/ui/aspect-ratio.js.map +0 -1
- package/dist/components/ui/carousel.d.ts +0 -29
- package/dist/components/ui/carousel.d.ts.map +0 -1
- package/dist/components/ui/carousel.js +0 -144
- package/dist/components/ui/carousel.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts +0 -6
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js +0 -26
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/direction.d.ts +0 -2
- package/dist/components/ui/direction.d.ts.map +0 -1
- package/dist/components/ui/direction.js +0 -3
- package/dist/components/ui/item.d.ts +0 -23
- package/dist/components/ui/item.d.ts.map +0 -1
- package/dist/components/ui/item.js +0 -122
- package/dist/components/ui/item.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts +0 -12
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js +0 -84
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/radio-group.d.ts +0 -6
- package/dist/components/ui/radio-group.d.ts.map +0 -1
- package/dist/components/ui/radio-group.js +0 -29
- package/dist/components/ui/radio-group.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts +0 -5
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js +0 -38
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/toggle-group.d.ts +0 -12
- package/dist/components/ui/toggle-group.d.ts.map +0 -1
- package/dist/components/ui/toggle-group.js +0 -60
- package/dist/components/ui/toggle-group.js.map +0 -1
- package/dist/components/ui/toggle.d.ts +0 -9
- package/dist/components/ui/toggle.d.ts.map +0 -1
- package/dist/components/ui/toggle.js +0 -38
- package/dist/components/ui/toggle.js.map +0 -1
- package/src/components/language-toggle/language-toggle.tsx +0 -66
- package/src/components/ui/accordion.tsx +0 -77
- package/src/components/ui/aspect-ratio.tsx +0 -22
- package/src/components/ui/carousel.tsx +0 -258
- package/src/components/ui/collapsible.tsx +0 -21
- package/src/components/ui/direction.tsx +0 -6
- package/src/components/ui/item.tsx +0 -200
- package/src/components/ui/navigation-menu.tsx +0 -170
- package/src/components/ui/radio-group.tsx +0 -37
- package/src/components/ui/scroll-area.tsx +0 -53
- package/src/components/ui/toggle-group.tsx +0 -93
- package/src/components/ui/toggle.tsx +0 -44
|
@@ -14,6 +14,7 @@ import type {
|
|
|
14
14
|
MyProfileController,
|
|
15
15
|
} from "alepha/api/users";
|
|
16
16
|
import { useClient } from "alepha/react";
|
|
17
|
+
import { useI18n } from "alepha/react/i18n";
|
|
17
18
|
import { type FormEvent, type ReactNode, useEffect, useState } from "react";
|
|
18
19
|
|
|
19
20
|
export interface AccountDeleteDialogProps {
|
|
@@ -66,6 +67,7 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
66
67
|
const accountApi = useClient<MyAccountController>();
|
|
67
68
|
const profileApi = useClient<MyProfileController>();
|
|
68
69
|
const toaster = useToast();
|
|
70
|
+
const { tr } = useI18n();
|
|
69
71
|
|
|
70
72
|
const [expected, setExpected] = useState<string | undefined>();
|
|
71
73
|
const [confirm, setConfirm] = useState("");
|
|
@@ -118,7 +120,13 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
118
120
|
message unwrapped. Showing it verbatim is the entire reason the emit
|
|
119
121
|
avoids `{ log: true }`; a generic "could not delete" would waste it.
|
|
120
122
|
*/
|
|
121
|
-
toaster.show(
|
|
123
|
+
toaster.show(
|
|
124
|
+
error?.message ??
|
|
125
|
+
tr("account.delete.error", {
|
|
126
|
+
default: "Could not delete your account",
|
|
127
|
+
}),
|
|
128
|
+
"danger",
|
|
129
|
+
);
|
|
122
130
|
} finally {
|
|
123
131
|
setSubmitting(false);
|
|
124
132
|
}
|
|
@@ -130,12 +138,16 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
130
138
|
<Dialog open={props.open} onOpenChange={(next) => !next && close()}>
|
|
131
139
|
<DialogContent>
|
|
132
140
|
<DialogHeader>
|
|
133
|
-
<DialogTitle>
|
|
141
|
+
<DialogTitle>
|
|
142
|
+
{tr("account.delete.title", { default: "Delete your account" })}
|
|
143
|
+
</DialogTitle>
|
|
134
144
|
</DialogHeader>
|
|
135
145
|
<form onSubmit={submit} className="flex flex-col gap-4">
|
|
136
146
|
<span className="text-muted-foreground text-sm">
|
|
137
|
-
|
|
138
|
-
|
|
147
|
+
{tr("account.delete.description", {
|
|
148
|
+
default:
|
|
149
|
+
"This permanently removes your account, its sign-in methods and every session. It cannot be undone.",
|
|
150
|
+
})}
|
|
139
151
|
</span>
|
|
140
152
|
|
|
141
153
|
{props.warning}
|
|
@@ -143,7 +155,9 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
143
155
|
{props.hasPassword ? (
|
|
144
156
|
<ControlPassword
|
|
145
157
|
id="deleteCurrentPassword"
|
|
146
|
-
label="
|
|
158
|
+
label={tr("account.delete.currentPassword", {
|
|
159
|
+
default: "Current password",
|
|
160
|
+
})}
|
|
147
161
|
value={currentPassword}
|
|
148
162
|
onChange={setCurrentPassword}
|
|
149
163
|
autoComplete="current-password"
|
|
@@ -153,8 +167,9 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
153
167
|
|
|
154
168
|
<div className="flex flex-col gap-1.5">
|
|
155
169
|
<Label htmlFor="deleteConfirm">
|
|
156
|
-
|
|
157
|
-
|
|
170
|
+
{tr("account.delete.confirmBefore", { default: "Type" })}{" "}
|
|
171
|
+
<span className="font-mono">{expected ?? "…"}</span>{" "}
|
|
172
|
+
{tr("account.delete.confirmAfter", { default: "to confirm" })}
|
|
158
173
|
</Label>
|
|
159
174
|
<Input
|
|
160
175
|
id="deleteConfirm"
|
|
@@ -167,14 +182,14 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
|
|
|
167
182
|
|
|
168
183
|
<div className="flex justify-end gap-2">
|
|
169
184
|
<Button type="button" variant="ghost" onClick={close}>
|
|
170
|
-
Cancel
|
|
185
|
+
{tr("account.delete.cancel", { default: "Cancel" })}
|
|
171
186
|
</Button>
|
|
172
187
|
<Button
|
|
173
188
|
type="submit"
|
|
174
189
|
variant="destructive"
|
|
175
190
|
disabled={submitting || !ready}
|
|
176
191
|
>
|
|
177
|
-
Delete account
|
|
192
|
+
{tr("account.delete.submit", { default: "Delete account" })}
|
|
178
193
|
</Button>
|
|
179
194
|
</div>
|
|
180
195
|
</form>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AppActions } from "@alepha/ui/components/app-actions/app-actions";
|
|
2
2
|
import { Button } from "@alepha/ui/components/ui/button";
|
|
3
|
+
import { useI18n } from "alepha/react/i18n";
|
|
3
4
|
import { Link, useRouter } from "alepha/react/router";
|
|
4
5
|
import { ArrowLeft } from "lucide-react";
|
|
5
6
|
|
|
@@ -38,6 +39,7 @@ export interface AccountHeaderProps {
|
|
|
38
39
|
*/
|
|
39
40
|
export const AccountHeader = (props: AccountHeaderProps) => {
|
|
40
41
|
const router = useRouter<any>();
|
|
42
|
+
const { tr } = useI18n();
|
|
41
43
|
const home = props.homeRouteName ?? "home";
|
|
42
44
|
|
|
43
45
|
return (
|
|
@@ -54,7 +56,8 @@ export const AccountHeader = (props: AccountHeaderProps) => {
|
|
|
54
56
|
role="link"
|
|
55
57
|
>
|
|
56
58
|
<ArrowLeft className="size-4" />
|
|
57
|
-
{props.backLabel ??
|
|
59
|
+
{props.backLabel ??
|
|
60
|
+
tr("account.header.back", { default: "Back to site" })}
|
|
58
61
|
</Button>
|
|
59
62
|
<AppActions />
|
|
60
63
|
</div>
|
|
@@ -15,6 +15,7 @@ import type { Infer } from "alepha";
|
|
|
15
15
|
import type { ApiKeyController, listApiKeyItemSchema } from "alepha/api/keys";
|
|
16
16
|
import { DateTimeProvider } from "alepha/datetime";
|
|
17
17
|
import { useClient, useInject } from "alepha/react";
|
|
18
|
+
import { useI18n } from "alepha/react/i18n";
|
|
18
19
|
import { Check, Clipboard, Plus, Trash2 } from "lucide-react";
|
|
19
20
|
import { type FormEvent, useState } from "react";
|
|
20
21
|
|
|
@@ -43,6 +44,7 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
43
44
|
const dt = useInject(DateTimeProvider);
|
|
44
45
|
const dialog = useDialog();
|
|
45
46
|
const toaster = useToast();
|
|
47
|
+
const { tr } = useI18n();
|
|
46
48
|
|
|
47
49
|
const [keys, setKeys] = useState<ApiKeyRow[]>(props.apiKeys ?? []);
|
|
48
50
|
const [createOpen, setCreateOpen] = useState(false);
|
|
@@ -61,7 +63,13 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
61
63
|
setName("");
|
|
62
64
|
setCreateOpen(false);
|
|
63
65
|
} catch (error: any) {
|
|
64
|
-
toaster.show(
|
|
66
|
+
toaster.show(
|
|
67
|
+
error?.message ??
|
|
68
|
+
tr("account.keys.createError", {
|
|
69
|
+
default: "Could not create that key",
|
|
70
|
+
}),
|
|
71
|
+
"danger",
|
|
72
|
+
);
|
|
65
73
|
} finally {
|
|
66
74
|
setCreating(false);
|
|
67
75
|
}
|
|
@@ -69,10 +77,15 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
69
77
|
|
|
70
78
|
const revoke = async (key: ApiKeyRow) => {
|
|
71
79
|
const ok = await dialog.confirm({
|
|
72
|
-
title:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
title: tr("account.keys.revokeTitle", {
|
|
81
|
+
default: "Revoke $1?",
|
|
82
|
+
args: [key.name],
|
|
83
|
+
}),
|
|
84
|
+
description: tr("account.keys.revokeDescription", {
|
|
85
|
+
default:
|
|
86
|
+
"Anything still using this key stops working immediately. This cannot be undone.",
|
|
87
|
+
}),
|
|
88
|
+
confirmLabel: tr("account.keys.revoke", { default: "Revoke" }),
|
|
76
89
|
destructive: true,
|
|
77
90
|
});
|
|
78
91
|
if (!ok) {
|
|
@@ -82,7 +95,13 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
82
95
|
await api.revokeMyApiKey({ params: { id: key.id } });
|
|
83
96
|
setKeys((prev) => prev.filter((it) => it.id !== key.id));
|
|
84
97
|
} catch (error: any) {
|
|
85
|
-
toaster.show(
|
|
98
|
+
toaster.show(
|
|
99
|
+
error?.message ??
|
|
100
|
+
tr("account.keys.revokeError", {
|
|
101
|
+
default: "Could not revoke that key",
|
|
102
|
+
}),
|
|
103
|
+
"danger",
|
|
104
|
+
);
|
|
86
105
|
}
|
|
87
106
|
};
|
|
88
107
|
|
|
@@ -97,26 +116,36 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
97
116
|
return (
|
|
98
117
|
<>
|
|
99
118
|
<SettingsSection
|
|
100
|
-
title="API keys"
|
|
101
|
-
description="
|
|
119
|
+
title={tr("account.keys.title", { default: "API keys" })}
|
|
120
|
+
description={tr("account.keys.description", {
|
|
121
|
+
default: "Keys act as you. Revoke any you no longer recognise.",
|
|
122
|
+
})}
|
|
102
123
|
>
|
|
103
124
|
{keys.map((key) => (
|
|
104
125
|
<SettingsRow
|
|
105
126
|
key={key.id}
|
|
106
127
|
label={key.name}
|
|
107
|
-
description={
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
128
|
+
description={
|
|
129
|
+
tr("account.keys.createdAt", {
|
|
130
|
+
default: "…$1 · created $2",
|
|
131
|
+
args: [key.tokenSuffix, dt.of(key.createdAt).fromNow()],
|
|
132
|
+
}) +
|
|
133
|
+
(key.lastUsedAt
|
|
134
|
+
? tr("account.keys.lastUsedAt", {
|
|
135
|
+
default: " · last used $1",
|
|
136
|
+
args: [dt.of(key.lastUsedAt).fromNow()],
|
|
137
|
+
})
|
|
138
|
+
: tr("account.keys.neverUsed", { default: " · never used" }))
|
|
139
|
+
}
|
|
114
140
|
>
|
|
115
141
|
<Button
|
|
116
142
|
variant="ghost"
|
|
117
143
|
size="sm"
|
|
118
144
|
onClick={() => revoke(key)}
|
|
119
|
-
aria-label={
|
|
145
|
+
aria-label={tr("account.keys.revokeAria", {
|
|
146
|
+
default: "Revoke $1",
|
|
147
|
+
args: [key.name],
|
|
148
|
+
})}
|
|
120
149
|
>
|
|
121
150
|
<Trash2 className="size-4" />
|
|
122
151
|
</Button>
|
|
@@ -124,8 +153,11 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
124
153
|
))}
|
|
125
154
|
|
|
126
155
|
<SettingsRow
|
|
127
|
-
label="Create a key"
|
|
128
|
-
description="
|
|
156
|
+
label={tr("account.keys.create", { default: "Create a key" })}
|
|
157
|
+
description={tr("account.keys.createDescription", {
|
|
158
|
+
default:
|
|
159
|
+
"Shown once, at creation. It cannot be recovered afterwards.",
|
|
160
|
+
})}
|
|
129
161
|
>
|
|
130
162
|
<Button
|
|
131
163
|
variant="secondary"
|
|
@@ -133,7 +165,7 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
133
165
|
onClick={() => setCreateOpen(true)}
|
|
134
166
|
>
|
|
135
167
|
<Plus className="size-4" />
|
|
136
|
-
New key
|
|
168
|
+
{tr("account.keys.new", { default: "New key" })}
|
|
137
169
|
</Button>
|
|
138
170
|
</SettingsRow>
|
|
139
171
|
</SettingsSection>
|
|
@@ -141,16 +173,22 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
141
173
|
<Dialog open={createOpen} onOpenChange={setCreateOpen}>
|
|
142
174
|
<DialogContent>
|
|
143
175
|
<DialogHeader>
|
|
144
|
-
<DialogTitle>
|
|
176
|
+
<DialogTitle>
|
|
177
|
+
{tr("account.keys.newTitle", { default: "New API key" })}
|
|
178
|
+
</DialogTitle>
|
|
145
179
|
</DialogHeader>
|
|
146
180
|
<form onSubmit={create} className="flex flex-col gap-4">
|
|
147
181
|
<div className="flex flex-col gap-1.5">
|
|
148
|
-
<Label htmlFor="apiKeyName">
|
|
182
|
+
<Label htmlFor="apiKeyName">
|
|
183
|
+
{tr("account.keys.name", { default: "Name" })}
|
|
184
|
+
</Label>
|
|
149
185
|
<Input
|
|
150
186
|
id="apiKeyName"
|
|
151
187
|
value={name}
|
|
152
188
|
onChange={(event) => setName(event.target.value)}
|
|
153
|
-
placeholder="
|
|
189
|
+
placeholder={tr("account.keys.namePlaceholder", {
|
|
190
|
+
default: "CI pipeline",
|
|
191
|
+
})}
|
|
154
192
|
required
|
|
155
193
|
/>
|
|
156
194
|
</div>
|
|
@@ -160,10 +198,10 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
160
198
|
variant="ghost"
|
|
161
199
|
onClick={() => setCreateOpen(false)}
|
|
162
200
|
>
|
|
163
|
-
Cancel
|
|
201
|
+
{tr("account.keys.cancel", { default: "Cancel" })}
|
|
164
202
|
</Button>
|
|
165
203
|
<Button type="submit" disabled={creating}>
|
|
166
|
-
Create
|
|
204
|
+
{tr("account.keys.submit", { default: "Create" })}
|
|
167
205
|
</Button>
|
|
168
206
|
</div>
|
|
169
207
|
</form>
|
|
@@ -183,12 +221,16 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
183
221
|
>
|
|
184
222
|
<DialogContent>
|
|
185
223
|
<DialogHeader>
|
|
186
|
-
<DialogTitle>
|
|
224
|
+
<DialogTitle>
|
|
225
|
+
{tr("account.keys.revealTitle", { default: "Copy your key now" })}
|
|
226
|
+
</DialogTitle>
|
|
187
227
|
</DialogHeader>
|
|
188
228
|
<div className="flex flex-col gap-4">
|
|
189
229
|
<span className="text-muted-foreground text-sm">
|
|
190
|
-
|
|
191
|
-
|
|
230
|
+
{tr("account.keys.revealDescription", {
|
|
231
|
+
default:
|
|
232
|
+
"This is the only time it is shown. Store it somewhere safe before closing this dialog.",
|
|
233
|
+
})}
|
|
192
234
|
</span>
|
|
193
235
|
<code className="bg-muted rounded-md border p-3 font-mono text-xs break-all">
|
|
194
236
|
{freshToken}
|
|
@@ -200,7 +242,9 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
200
242
|
) : (
|
|
201
243
|
<Clipboard className="size-4" />
|
|
202
244
|
)}
|
|
203
|
-
{copied
|
|
245
|
+
{copied
|
|
246
|
+
? tr("account.keys.copied", { default: "Copied" })
|
|
247
|
+
: tr("account.keys.copy", { default: "Copy" })}
|
|
204
248
|
</Button>
|
|
205
249
|
<Button
|
|
206
250
|
onClick={() => {
|
|
@@ -208,7 +252,7 @@ const AccountKeys = (props: AccountKeysProps) => {
|
|
|
208
252
|
setCopied(false);
|
|
209
253
|
}}
|
|
210
254
|
>
|
|
211
|
-
Done
|
|
255
|
+
{tr("account.keys.done", { default: "Done" })}
|
|
212
256
|
</Button>
|
|
213
257
|
</div>
|
|
214
258
|
</div>
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { Alert, AlertDescription } from "@alepha/ui/components/ui/alert";
|
|
2
|
+
import { Button } from "@alepha/ui/components/ui/button";
|
|
3
|
+
import {
|
|
4
|
+
Dialog,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogHeader,
|
|
7
|
+
DialogTitle,
|
|
8
|
+
} from "@alepha/ui/components/ui/dialog";
|
|
9
|
+
import {
|
|
10
|
+
InputOTP,
|
|
11
|
+
InputOTPGroup,
|
|
12
|
+
InputOTPSlot,
|
|
13
|
+
} from "@alepha/ui/components/ui/input-otp";
|
|
14
|
+
import { useToast } from "@alepha/ui/components/use-toast/use-toast";
|
|
15
|
+
import type { MyMfaController } from "alepha/api/users";
|
|
16
|
+
import { useClient, useQuery } from "alepha/react";
|
|
17
|
+
import { useI18n } from "alepha/react/i18n";
|
|
18
|
+
import { AlertTriangle } from "lucide-react";
|
|
19
|
+
import { useState } from "react";
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* What `enrollTotp` hands back: the secret in clear, the `otpauth://` URI,
|
|
23
|
+
* and that URI already rendered as an SVG QR code.
|
|
24
|
+
*/
|
|
25
|
+
interface TotpEnrollment {
|
|
26
|
+
secret: string;
|
|
27
|
+
uri: string;
|
|
28
|
+
qrSvg: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface AccountMfaDialogProps {
|
|
32
|
+
open: boolean;
|
|
33
|
+
onOpenChange: (open: boolean) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Called after enrollment completes, so the caller can refresh its status.
|
|
36
|
+
*/
|
|
37
|
+
onDone?: () => void | Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Enroll an authenticator app: scan, confirm, then write down the recovery
|
|
42
|
+
* codes.
|
|
43
|
+
*
|
|
44
|
+
* The recovery-code step is not a formality and is deliberately hard to
|
|
45
|
+
* skip past. The secret is stored encrypted and the codes hashed, so this
|
|
46
|
+
* dialog is the only moment either can ever be displayed; a user who closes
|
|
47
|
+
* it without keeping the codes has no way back in if they lose the phone,
|
|
48
|
+
* short of an administrator resetting the factor for them.
|
|
49
|
+
*/
|
|
50
|
+
export const AccountMfaDialog = (props: AccountMfaDialogProps) => {
|
|
51
|
+
const api = useClient<MyMfaController>();
|
|
52
|
+
const toaster = useToast();
|
|
53
|
+
const { tr } = useI18n();
|
|
54
|
+
|
|
55
|
+
const [code, setCode] = useState("");
|
|
56
|
+
const [recoveryCodes, setRecoveryCodes] = useState<string[]>();
|
|
57
|
+
const [submitting, setSubmitting] = useState(false);
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* A fresh enrollment is started each time the dialog opens, and the
|
|
61
|
+
* previous pending one is replaced server-side. `enabled` keys it to
|
|
62
|
+
* `props.open` so nothing is issued for a dialog nobody asked for.
|
|
63
|
+
*/
|
|
64
|
+
const { data: enrollment, error } = useQuery<TotpEnrollment>(
|
|
65
|
+
{
|
|
66
|
+
enabled: props.open,
|
|
67
|
+
handler: () => api.enrollTotp() as Promise<TotpEnrollment>,
|
|
68
|
+
},
|
|
69
|
+
[props.open],
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Closing resets the transient state, so reopening does not flash the
|
|
74
|
+
* previous run's recovery codes at whoever is next at the keyboard.
|
|
75
|
+
*/
|
|
76
|
+
const setOpen = (open: boolean) => {
|
|
77
|
+
if (!open) {
|
|
78
|
+
setCode("");
|
|
79
|
+
setRecoveryCodes(undefined);
|
|
80
|
+
}
|
|
81
|
+
props.onOpenChange(open);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const activate = async (value: string) => {
|
|
85
|
+
setSubmitting(true);
|
|
86
|
+
try {
|
|
87
|
+
const result = await api.activateTotp({ body: { code: value } });
|
|
88
|
+
setRecoveryCodes(result.recoveryCodes);
|
|
89
|
+
await props.onDone?.();
|
|
90
|
+
} catch (error: any) {
|
|
91
|
+
setCode("");
|
|
92
|
+
toaster.show(
|
|
93
|
+
error?.message ??
|
|
94
|
+
tr("account.mfa.invalidCode", { default: "That code is not valid" }),
|
|
95
|
+
"danger",
|
|
96
|
+
);
|
|
97
|
+
} finally {
|
|
98
|
+
setSubmitting(false);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
return (
|
|
103
|
+
<Dialog open={props.open} onOpenChange={setOpen}>
|
|
104
|
+
<DialogContent>
|
|
105
|
+
<DialogHeader>
|
|
106
|
+
<DialogTitle>
|
|
107
|
+
{recoveryCodes
|
|
108
|
+
? tr("account.mfa.recoveryTitle", {
|
|
109
|
+
default: "Save your recovery codes",
|
|
110
|
+
})
|
|
111
|
+
: tr("account.mfa.setupTitle", {
|
|
112
|
+
default: "Set up two-factor authentication",
|
|
113
|
+
})}
|
|
114
|
+
</DialogTitle>
|
|
115
|
+
</DialogHeader>
|
|
116
|
+
|
|
117
|
+
{recoveryCodes ? (
|
|
118
|
+
<div className="flex flex-col gap-4">
|
|
119
|
+
<Alert>
|
|
120
|
+
<AlertTriangle className="size-4" />
|
|
121
|
+
<AlertDescription>
|
|
122
|
+
{tr("account.mfa.recoveryDescription", {
|
|
123
|
+
default:
|
|
124
|
+
"Keep these somewhere safe. Each one works once, and this is the only time they can be shown.",
|
|
125
|
+
})}
|
|
126
|
+
</AlertDescription>
|
|
127
|
+
</Alert>
|
|
128
|
+
|
|
129
|
+
<div className="bg-muted grid grid-cols-2 gap-2 rounded-lg p-4 font-mono text-sm">
|
|
130
|
+
{recoveryCodes.map((recovery) => (
|
|
131
|
+
<span key={recovery}>{recovery}</span>
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
<Button
|
|
136
|
+
variant="secondary"
|
|
137
|
+
onClick={() => {
|
|
138
|
+
void navigator.clipboard?.writeText(recoveryCodes.join("\n"));
|
|
139
|
+
toaster.show(
|
|
140
|
+
tr("account.mfa.recoveryCopied", {
|
|
141
|
+
default: "Recovery codes copied",
|
|
142
|
+
}),
|
|
143
|
+
"success",
|
|
144
|
+
);
|
|
145
|
+
}}
|
|
146
|
+
>
|
|
147
|
+
{tr("account.mfa.copyCodes", { default: "Copy codes" })}
|
|
148
|
+
</Button>
|
|
149
|
+
|
|
150
|
+
<Button onClick={() => setOpen(false)}>
|
|
151
|
+
{tr("account.mfa.saved", { default: "I have saved them" })}
|
|
152
|
+
</Button>
|
|
153
|
+
</div>
|
|
154
|
+
) : (
|
|
155
|
+
<div className="flex flex-col gap-4">
|
|
156
|
+
<p className="text-muted-foreground text-sm">
|
|
157
|
+
{tr("account.mfa.setupDescription", {
|
|
158
|
+
default:
|
|
159
|
+
"Scan this with your authenticator app, then type the six-digit code it shows.",
|
|
160
|
+
})}
|
|
161
|
+
</p>
|
|
162
|
+
|
|
163
|
+
{error && (
|
|
164
|
+
<Alert variant="destructive">
|
|
165
|
+
<AlertTriangle className="size-4" />
|
|
166
|
+
<AlertDescription>
|
|
167
|
+
{tr("account.mfa.enrollError", {
|
|
168
|
+
default:
|
|
169
|
+
"Could not start the enrollment. Close this and try again.",
|
|
170
|
+
})}
|
|
171
|
+
</AlertDescription>
|
|
172
|
+
</Alert>
|
|
173
|
+
)}
|
|
174
|
+
|
|
175
|
+
{enrollment ? (
|
|
176
|
+
<>
|
|
177
|
+
<div
|
|
178
|
+
className="mx-auto w-48 rounded-lg bg-white p-3 [&>svg]:w-full"
|
|
179
|
+
// The QR is generated server-side, from a URI the server
|
|
180
|
+
// built itself. No user input reaches it.
|
|
181
|
+
dangerouslySetInnerHTML={{ __html: enrollment.qrSvg }}
|
|
182
|
+
/>
|
|
183
|
+
|
|
184
|
+
<details className="text-muted-foreground text-center text-xs">
|
|
185
|
+
<summary className="cursor-pointer">
|
|
186
|
+
{tr("account.mfa.cannotScan", {
|
|
187
|
+
default: "Cannot scan the code?",
|
|
188
|
+
})}
|
|
189
|
+
</summary>
|
|
190
|
+
<p className="mt-2 font-mono break-all">
|
|
191
|
+
{enrollment.secret}
|
|
192
|
+
</p>
|
|
193
|
+
</details>
|
|
194
|
+
|
|
195
|
+
<div className="flex justify-center">
|
|
196
|
+
<InputOTP
|
|
197
|
+
maxLength={6}
|
|
198
|
+
value={code}
|
|
199
|
+
disabled={submitting}
|
|
200
|
+
onChange={(value: string) => {
|
|
201
|
+
setCode(value);
|
|
202
|
+
if (value.length === 6) {
|
|
203
|
+
void activate(value);
|
|
204
|
+
}
|
|
205
|
+
}}
|
|
206
|
+
>
|
|
207
|
+
<InputOTPGroup>
|
|
208
|
+
{[0, 1, 2, 3, 4, 5].map((index) => (
|
|
209
|
+
<InputOTPSlot key={index} index={index} />
|
|
210
|
+
))}
|
|
211
|
+
</InputOTPGroup>
|
|
212
|
+
</InputOTP>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<Button
|
|
216
|
+
loading={submitting}
|
|
217
|
+
disabled={code.length !== 6}
|
|
218
|
+
onClick={() => activate(code)}
|
|
219
|
+
>
|
|
220
|
+
{tr("account.mfa.turnOn", { default: "Turn on" })}
|
|
221
|
+
</Button>
|
|
222
|
+
</>
|
|
223
|
+
) : (
|
|
224
|
+
<p className="text-muted-foreground text-center text-sm">
|
|
225
|
+
{tr("account.mfa.preparing", { default: "Preparing..." })}
|
|
226
|
+
</p>
|
|
227
|
+
)}
|
|
228
|
+
</div>
|
|
229
|
+
)}
|
|
230
|
+
</DialogContent>
|
|
231
|
+
</Dialog>
|
|
232
|
+
);
|
|
233
|
+
};
|