@alepha/ui 0.25.2 → 0.26.0
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/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/components/account/account-connections.d.ts +16 -0
- package/dist/components/account/account-connections.d.ts.map +1 -0
- package/dist/components/account/account-connections.js +76 -0
- package/dist/components/account/account-connections.js.map +1 -0
- package/dist/components/account/account-delete-dialog.d.ts +44 -0
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -0
- package/dist/components/account/account-delete-dialog.js +126 -0
- package/dist/components/account/account-delete-dialog.js.map +1 -0
- package/dist/components/account/account-header.d.ts +33 -0
- package/dist/components/account/account-header.d.ts.map +1 -0
- package/dist/components/account/account-header.js +41 -0
- package/dist/components/account/account-header.js.map +1 -0
- package/dist/components/account/account-keys.d.ts +23 -0
- package/dist/components/account/account-keys.d.ts.map +1 -0
- package/dist/components/account/account-keys.js +168 -0
- package/dist/components/account/account-keys.js.map +1 -0
- package/dist/components/account/account-layout.d.ts +32 -0
- package/dist/components/account/account-layout.d.ts.map +1 -0
- package/dist/components/account/account-layout.js +53 -0
- package/dist/components/account/account-layout.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts +31 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -0
- package/dist/components/account/account-password-dialog.js +120 -0
- package/dist/components/account/account-password-dialog.js.map +1 -0
- package/dist/components/account/account-profile.d.ts +27 -0
- package/dist/components/account/account-profile.d.ts.map +1 -0
- package/dist/components/account/account-profile.js +217 -0
- package/dist/components/account/account-profile.js.map +1 -0
- package/dist/components/account/account-router-options.d.ts +77 -0
- package/dist/components/account/account-router-options.d.ts.map +1 -0
- package/dist/components/account/account-router-options.js +22 -0
- package/dist/components/account/account-router-options.js.map +1 -0
- package/dist/components/account/account-router-page.d.ts +49 -0
- package/dist/components/account/account-router-page.d.ts.map +1 -0
- package/dist/components/account/account-router-page.js +61 -0
- package/dist/components/account/account-router-page.js.map +1 -0
- package/dist/components/account/account-router.d.ts +214 -0
- package/dist/components/account/account-router.d.ts.map +1 -0
- package/dist/components/account/account-router.js +216 -0
- package/dist/components/account/account-router.js.map +1 -0
- package/dist/components/account/account-security.d.ts +22 -0
- package/dist/components/account/account-security.d.ts.map +1 -0
- package/dist/components/account/account-security.js +107 -0
- package/dist/components/account/account-security.js.map +1 -0
- package/dist/components/account/account-sessions.d.ts +17 -0
- package/dist/components/account/account-sessions.d.ts.map +1 -0
- package/dist/components/account/account-sessions.js +108 -0
- package/dist/components/account/account-sessions.js.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts +39 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.js +40 -0
- package/dist/components/action-error-toaster/action-error-toaster.js.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts +16 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.js +117 -0
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -0
- package/dist/components/admin/admin-analytics-results.d.ts +15 -0
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-results.js +56 -0
- package/dist/components/admin/admin-analytics-results.js.map +1 -0
- package/dist/components/admin/admin-analytics.d.ts +9 -0
- package/dist/components/admin/admin-analytics.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics.js +66 -0
- package/dist/components/admin/admin-analytics.js.map +1 -0
- package/dist/components/admin/admin-audits.d.ts +4 -0
- package/dist/components/admin/admin-audits.d.ts.map +1 -0
- package/dist/components/admin/admin-audits.js +173 -0
- package/dist/components/admin/admin-audits.js.map +1 -0
- package/dist/components/admin/admin-files.d.ts +4 -0
- package/dist/components/admin/admin-files.d.ts.map +1 -0
- package/dist/components/admin/admin-files.js +237 -0
- package/dist/components/admin/admin-files.js.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +11 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.js +200 -0
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts +9 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.js +26 -0
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -0
- package/dist/components/admin/admin-jobs.d.ts +4 -0
- package/dist/components/admin/admin-jobs.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs.js +248 -0
- package/dist/components/admin/admin-jobs.js.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts +15 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.js +66 -0
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -0
- package/dist/components/admin/admin-keys.d.ts +4 -0
- package/dist/components/admin/admin-keys.d.ts.map +1 -0
- package/dist/components/admin/admin-keys.js +161 -0
- package/dist/components/admin/admin-keys.js.map +1 -0
- package/dist/components/admin/admin-layout.d.ts +33 -0
- package/dist/components/admin/admin-layout.d.ts.map +1 -0
- package/dist/components/admin/admin-layout.js +101 -0
- package/dist/components/admin/admin-layout.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +4 -0
- package/dist/components/admin/admin-notifications.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications.js +99 -0
- package/dist/components/admin/admin-notifications.js.map +1 -0
- package/dist/components/admin/admin-page.d.ts +16 -0
- package/dist/components/admin/admin-page.d.ts.map +1 -0
- package/dist/components/admin/admin-page.js +15 -0
- package/dist/components/admin/admin-page.js.map +1 -0
- package/dist/components/admin/admin-parameters.d.ts +26 -0
- package/dist/components/admin/admin-parameters.d.ts.map +1 -0
- package/dist/components/admin/admin-parameters.js +560 -0
- package/dist/components/admin/admin-parameters.js.map +1 -0
- package/dist/components/admin/admin-payments.d.ts +4 -0
- package/dist/components/admin/admin-payments.d.ts.map +1 -0
- package/dist/components/admin/admin-payments.js +72 -0
- package/dist/components/admin/admin-payments.js.map +1 -0
- package/dist/components/admin/admin-router-options.d.ts +135 -0
- package/dist/components/admin/admin-router-options.d.ts.map +1 -0
- package/dist/components/admin/admin-router-options.js +29 -0
- package/dist/components/admin/admin-router-options.js.map +1 -0
- package/dist/components/admin/admin-router-page.d.ts +54 -0
- package/dist/components/admin/admin-router-page.d.ts.map +1 -0
- package/dist/components/admin/admin-router-page.js +66 -0
- package/dist/components/admin/admin-router-page.js.map +1 -0
- package/dist/components/admin/admin-router.d.ts +169 -0
- package/dist/components/admin/admin-router.d.ts.map +1 -0
- package/dist/components/admin/admin-router.js +346 -0
- package/dist/components/admin/admin-router.js.map +1 -0
- package/dist/components/admin/admin-sessions.d.ts +4 -0
- package/dist/components/admin/admin-sessions.d.ts.map +1 -0
- package/dist/components/admin/admin-sessions.js +124 -0
- package/dist/components/admin/admin-sessions.js.map +1 -0
- package/dist/components/admin/admin-user-cell.d.ts +37 -0
- package/dist/components/admin/admin-user-cell.d.ts.map +1 -0
- package/dist/components/admin/admin-user-cell.js +35 -0
- package/dist/components/admin/admin-user-cell.js.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js +55 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +14 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js +162 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts +26 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js +60 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js +47 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts +10 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.js +13 -0
- package/dist/components/admin/admin-user-detail-password-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts +56 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js +73 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts +18 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js +21 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +20 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.js +70 -0
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +25 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js +64 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail.d.ts +39 -0
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail.js +386 -0
- package/dist/components/admin/admin-user-detail.js.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts +23 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.js +77 -0
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -0
- package/dist/components/admin/admin-users-status-filter.d.ts +13 -0
- package/dist/components/admin/admin-users-status-filter.d.ts.map +1 -0
- package/dist/components/admin/admin-users-status-filter.js +41 -0
- package/dist/components/admin/admin-users-status-filter.js.map +1 -0
- package/dist/components/admin/admin-users.d.ts +16 -0
- package/dist/components/admin/admin-users.d.ts.map +1 -0
- package/dist/components/admin/admin-users.js +325 -0
- package/dist/components/admin/admin-users.js.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +11 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js +190 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +9 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.js +153 -0
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts +12 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.js +30 -0
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -0
- package/dist/components/admin/admin-workflows.d.ts +4 -0
- package/dist/components/admin/admin-workflows.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows.js +145 -0
- package/dist/components/admin/admin-workflows.js.map +1 -0
- package/dist/components/admin/diff-lines.d.ts +13 -0
- package/dist/components/admin/diff-lines.d.ts.map +1 -0
- package/dist/components/admin/diff-lines.js +57 -0
- package/dist/components/admin/diff-lines.js.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts +36 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.js +58 -0
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -0
- package/dist/components/admin/parameter-history-item.d.ts +17 -0
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -0
- package/dist/components/admin/parameter-history-item.js +177 -0
- package/dist/components/admin/parameter-history-item.js.map +1 -0
- package/dist/components/admin/parameter-json-dialog.d.ts +13 -0
- package/dist/components/admin/parameter-json-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-json-dialog.js +63 -0
- package/dist/components/admin/parameter-json-dialog.js.map +1 -0
- package/dist/components/admin/parameter-save-dialog.d.ts +26 -0
- package/dist/components/admin/parameter-save-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-save-dialog.js +74 -0
- package/dist/components/admin/parameter-save-dialog.js.map +1 -0
- package/dist/components/admin/use-confirmed-action.d.ts +53 -0
- package/dist/components/admin/use-confirmed-action.d.ts.map +1 -0
- package/dist/components/admin/use-confirmed-action.js +50 -0
- package/dist/components/admin/use-confirmed-action.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +218 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table.js +565 -0
- package/dist/components/alepha-table/alepha-table.js.map +1 -0
- package/dist/components/alepha-table/use-table-selection.d.ts +34 -0
- package/dist/components/alepha-table/use-table-selection.d.ts.map +1 -0
- package/dist/components/alepha-table/use-table-selection.js +45 -0
- package/dist/components/alepha-table/use-table-selection.js.map +1 -0
- package/dist/components/app-actions/app-actions.d.ts +74 -0
- package/dist/components/app-actions/app-actions.d.ts.map +1 -0
- package/dist/components/app-actions/app-actions.js +77 -0
- package/dist/components/app-actions/app-actions.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +135 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +276 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/auth/auth-login.d.ts +40 -0
- package/dist/components/auth/auth-login.d.ts.map +1 -0
- package/dist/components/auth/auth-login.js +237 -0
- package/dist/components/auth/auth-login.js.map +1 -0
- package/dist/components/auth/auth-register.d.ts +35 -0
- package/dist/components/auth/auth-register.d.ts.map +1 -0
- package/dist/components/auth/auth-register.js +478 -0
- package/dist/components/auth/auth-register.js.map +1 -0
- package/dist/components/auth/auth-reset-password.d.ts +21 -0
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -0
- package/dist/components/auth/auth-reset-password.js +283 -0
- package/dist/components/auth/auth-reset-password.js.map +1 -0
- package/dist/components/auth/auth-router.d.ts +245 -0
- package/dist/components/auth/auth-router.d.ts.map +1 -0
- package/dist/components/auth/auth-router.js +117 -0
- package/dist/components/auth/auth-router.js.map +1 -0
- package/dist/components/auth/auth-verify-email.d.ts +19 -0
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -0
- package/dist/components/auth/auth-verify-email.js +124 -0
- package/dist/components/auth/auth-verify-email.js.map +1 -0
- package/dist/components/auth/provider-labels.d.ts +9 -0
- package/dist/components/auth/provider-labels.d.ts.map +1 -0
- package/dist/components/auth/provider-labels.js +20 -0
- package/dist/components/auth/provider-labels.js.map +1 -0
- package/dist/components/auto-form/auto-form.d.ts +219 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -0
- package/dist/components/auto-form/auto-form.js +412 -0
- package/dist/components/auto-form/auto-form.js.map +1 -0
- package/dist/components/brand-icon/brand-icon.d.ts +18 -0
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -0
- package/dist/components/brand-icon/brand-icon.js +84 -0
- package/dist/components/brand-icon/brand-icon.js.map +1 -0
- package/dist/components/button-dark/button-dark.d.ts +25 -0
- package/dist/components/button-dark/button-dark.d.ts.map +1 -0
- package/dist/components/button-dark/button-dark.js +44 -0
- package/dist/components/button-dark/button-dark.js.map +1 -0
- package/dist/components/button-language/button-language.d.ts +24 -0
- package/dist/components/button-language/button-language.d.ts.map +1 -0
- package/dist/components/button-language/button-language.js +50 -0
- package/dist/components/button-language/button-language.js.map +1 -0
- package/dist/components/button-theme/button-theme.d.ts +33 -0
- package/dist/components/button-theme/button-theme.d.ts.map +1 -0
- package/dist/components/button-theme/button-theme.js +90 -0
- package/dist/components/button-theme/button-theme.js.map +1 -0
- package/dist/components/button-user/button-user.d.ts +147 -0
- package/dist/components/button-user/button-user.d.ts.map +1 -0
- package/dist/components/button-user/button-user.js +147 -0
- package/dist/components/button-user/button-user.js.map +1 -0
- package/dist/components/captcha/turnstile-widget.d.ts +59 -0
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -0
- package/dist/components/captcha/turnstile-widget.js +97 -0
- package/dist/components/captcha/turnstile-widget.js.map +1 -0
- package/dist/components/control/control.d.ts +200 -0
- package/dist/components/control/control.d.ts.map +1 -0
- package/dist/components/control/control.js +300 -0
- package/dist/components/control/control.js.map +1 -0
- package/dist/components/control-array/control-array.d.ts +77 -0
- package/dist/components/control-array/control-array.d.ts.map +1 -0
- package/dist/components/control-array/control-array.js +444 -0
- package/dist/components/control-array/control-array.js.map +1 -0
- package/dist/components/control-base/field-i18n.d.ts +30 -0
- package/dist/components/control-base/field-i18n.d.ts.map +1 -0
- package/dist/components/control-base/field-i18n.js +27 -0
- package/dist/components/control-base/field-i18n.js.map +1 -0
- package/dist/components/control-base/form-field.d.ts +128 -0
- package/dist/components/control-base/form-field.d.ts.map +1 -0
- package/dist/components/control-base/form-field.js +208 -0
- package/dist/components/control-base/form-field.js.map +1 -0
- package/dist/components/control-base/grid.d.ts +18 -0
- package/dist/components/control-base/grid.d.ts.map +1 -0
- package/dist/components/control-base/grid.js +46 -0
- package/dist/components/control-base/grid.js.map +1 -0
- package/dist/components/control-base/icon-hint.d.ts +9 -0
- package/dist/components/control-base/icon-hint.d.ts.map +1 -0
- package/dist/components/control-base/icon-hint.js +35 -0
- package/dist/components/control-base/icon-hint.js.map +1 -0
- package/dist/components/control-date/control-date.d.ts +34 -0
- package/dist/components/control-date/control-date.d.ts.map +1 -0
- package/dist/components/control-date/control-date.js +111 -0
- package/dist/components/control-date/control-date.js.map +1 -0
- package/dist/components/control-number/control-number.d.ts +38 -0
- package/dist/components/control-number/control-number.d.ts.map +1 -0
- package/dist/components/control-number/control-number.js +77 -0
- package/dist/components/control-number/control-number.js.map +1 -0
- package/dist/components/control-object/control-object.d.ts +45 -0
- package/dist/components/control-object/control-object.d.ts.map +1 -0
- package/dist/components/control-object/control-object.js +110 -0
- package/dist/components/control-object/control-object.js.map +1 -0
- package/dist/components/control-password/control-password.d.ts +28 -0
- package/dist/components/control-password/control-password.d.ts.map +1 -0
- package/dist/components/control-password/control-password.js +65 -0
- package/dist/components/control-password/control-password.js.map +1 -0
- package/dist/components/control-select/control-select.d.ts +128 -0
- package/dist/components/control-select/control-select.d.ts.map +1 -0
- package/dist/components/control-select/control-select.js +363 -0
- package/dist/components/control-select/control-select.js.map +1 -0
- package/dist/components/control-upload/control-upload.d.ts +67 -0
- package/dist/components/control-upload/control-upload.d.ts.map +1 -0
- package/dist/components/control-upload/control-upload.js +294 -0
- package/dist/components/control-upload/control-upload.js.map +1 -0
- package/dist/components/file-image/file-image.d.ts +31 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -0
- package/dist/components/file-image/file-image.js +27 -0
- package/dist/components/file-image/file-image.js.map +1 -0
- package/dist/components/language-toggle/language-toggle.d.ts +8 -0
- package/dist/components/language-toggle/language-toggle.d.ts.map +1 -0
- package/dist/components/language-toggle/language-toggle.js +49 -0
- package/dist/components/language-toggle/language-toggle.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.css +114 -0
- package/dist/components/markdown-view/markdown-view.d.ts +21 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view/markdown-view.js +104 -0
- package/dist/components/markdown-view/markdown-view.js.map +1 -0
- package/dist/components/nav-shell/nav-page.d.ts +24 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-page.js +28 -0
- package/dist/components/nav-shell/nav-page.js.map +1 -0
- package/dist/components/nav-shell/nav-shell.d.ts +26 -0
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-shell.js +53 -0
- package/dist/components/nav-shell/nav-shell.js.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts +65 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.js +87 -0
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -0
- package/dist/components/nav-shell/spotlight.d.ts +37 -0
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -0
- package/dist/components/nav-shell/spotlight.js +102 -0
- package/dist/components/nav-shell/spotlight.js.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts +24 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +36 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts +45 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.js +60 -0
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts +21 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.js +48 -0
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -0
- package/dist/components/settings/settings-danger-section.d.ts +35 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -0
- package/dist/components/settings/settings-danger-section.js +42 -0
- package/dist/components/settings/settings-danger-section.js.map +1 -0
- package/dist/components/settings/settings-heading.d.ts +36 -0
- package/dist/components/settings/settings-heading.d.ts.map +1 -0
- package/dist/components/settings/settings-heading.js +39 -0
- package/dist/components/settings/settings-heading.js.map +1 -0
- package/dist/components/settings/settings-layout.d.ts +81 -0
- package/dist/components/settings/settings-layout.d.ts.map +1 -0
- package/dist/components/settings/settings-layout.js +56 -0
- package/dist/components/settings/settings-layout.js.map +1 -0
- package/dist/components/settings/settings-nav.d.ts +85 -0
- package/dist/components/settings/settings-nav.d.ts.map +1 -0
- package/dist/components/settings/settings-nav.js +91 -0
- package/dist/components/settings/settings-nav.js.map +1 -0
- package/dist/components/settings/settings-row.d.ts +45 -0
- package/dist/components/settings/settings-row.d.ts.map +1 -0
- package/dist/components/settings/settings-row.js +44 -0
- package/dist/components/settings/settings-row.js.map +1 -0
- package/dist/components/settings/settings-section.d.ts +36 -0
- package/dist/components/settings/settings-section.d.ts.map +1 -0
- package/dist/components/settings/settings-section.js +36 -0
- package/dist/components/settings/settings-section.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +5 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +15 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +31 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +73 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +43 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +60 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +119 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +57 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +134 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +164 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +20 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +89 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +134 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +93 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/drawer.d.ts +17 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +138 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +61 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +80 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +16 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +87 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +29 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +46 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +119 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +99 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +64 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +388 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +14 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +35 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +54 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +38 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/use-dialog/use-dialog.d.ts +61 -0
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -0
- package/dist/components/use-dialog/use-dialog.js +139 -0
- package/dist/components/use-dialog/use-dialog.js.map +1 -0
- package/dist/components/use-toast/use-toast.d.ts +37 -0
- package/dist/components/use-toast/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast/use-toast.js +32 -0
- package/dist/components/use-toast/use-toast.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +20 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/i18n-fr.d.ts +46 -0
- package/dist/lib/i18n-fr.d.ts.map +1 -0
- package/dist/lib/i18n-fr.js +505 -0
- package/dist/lib/i18n-fr.js.map +1 -0
- package/dist/lib/resize-image.d.ts +50 -0
- package/dist/lib/resize-image.d.ts.map +1 -0
- package/dist/lib/resize-image.js +68 -0
- package/dist/lib/resize-image.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +254 -0
- package/package.json +46 -15
- package/src/components/account/account-connections.tsx +9 -1
- package/src/components/account/account-keys.tsx +1 -1
- package/src/components/account/account-layout.tsx +6 -3
- package/src/components/account/account-profile.tsx +238 -125
- package/src/components/account/account-router-options.tsx +14 -0
- package/src/components/account/account-router.tsx +20 -1
- package/src/components/account/account-security.tsx +1 -1
- package/src/components/admin/admin-router-options.tsx +20 -0
- package/src/components/alepha-table/alepha-table.tsx +23 -7
- package/src/components/app-actions/app-actions.tsx +7 -2
- package/src/components/auth/auth-register.tsx +55 -17
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +237 -0
- package/src/components/auto-form/auto-form.tsx +113 -27
- package/src/components/button-user/button-user.tsx +76 -17
- package/src/components/control/control.tsx +33 -8
- package/src/components/control-base/form-field.tsx +60 -3
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +48 -0
- package/src/components/markdown-view/markdown-view.tsx +14 -6
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +88 -0
- package/src/components/nav-shell/nav-tree-util.ts +48 -0
- package/src/components/nav-shell/use-nav-entries.ts +11 -2
- package/src/components/settings/settings-heading.tsx +55 -0
- package/src/components/settings/settings-layout.tsx +66 -7
- package/src/components/settings/settings-nav.tsx +48 -4
- package/src/components/settings/settings-section.tsx +2 -14
- package/src/components/ui/segmented.tsx +19 -2
- package/src/lib/__tests__/rehype-safe-img.spec.ts +0 -121
- package/src/lib/rehype-safe-img.ts +0 -150
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
import { AutoForm } from "@alepha/ui/components/auto-form/auto-form";
|
|
1
2
|
import { FileImage } from "@alepha/ui/components/file-image/file-image";
|
|
2
3
|
import { SettingsRow } from "@alepha/ui/components/settings/settings-row";
|
|
3
4
|
import { SettingsSection } from "@alepha/ui/components/settings/settings-section";
|
|
4
5
|
import { Badge } from "@alepha/ui/components/ui/badge";
|
|
5
6
|
import { Button } from "@alepha/ui/components/ui/button";
|
|
6
|
-
import { Input } from "@alepha/ui/components/ui/input";
|
|
7
7
|
import { useToast } from "@alepha/ui/components/use-toast/use-toast";
|
|
8
|
-
import type {
|
|
8
|
+
import type {
|
|
9
|
+
MyAvatarController,
|
|
10
|
+
MyProfile,
|
|
11
|
+
MyProfileController,
|
|
12
|
+
RealmConfig,
|
|
13
|
+
} from "alepha/api/users";
|
|
14
|
+
import { updateMyProfileBodySchema } from "alepha/api/users";
|
|
9
15
|
import { useClient } from "alepha/react";
|
|
16
|
+
import { useForm } from "alepha/react/form";
|
|
10
17
|
import { useI18n } from "alepha/react/i18n";
|
|
11
|
-
import { Camera, Trash2, User } from "lucide-react";
|
|
12
|
-
import { type ChangeEvent,
|
|
18
|
+
import { AtSign, Camera, Trash2, User } from "lucide-react";
|
|
19
|
+
import { type ChangeEvent, useRef, useState } from "react";
|
|
13
20
|
|
|
14
21
|
export interface AccountProfileProps {
|
|
15
22
|
/**
|
|
@@ -17,6 +24,16 @@ export interface AccountProfileProps {
|
|
|
17
24
|
* standalone in a story or a test.
|
|
18
25
|
*/
|
|
19
26
|
profile?: MyProfile;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Supplied by the route loader, and read for one thing: whether this realm
|
|
30
|
+
* collects usernames at all.
|
|
31
|
+
*
|
|
32
|
+
* Optional for the same reason `profile` is. Absent, the username field
|
|
33
|
+
* renders — the historical behaviour, and the right guess for a realm nobody
|
|
34
|
+
* described.
|
|
35
|
+
*/
|
|
36
|
+
realmConfig?: RealmConfig;
|
|
20
37
|
}
|
|
21
38
|
|
|
22
39
|
/**
|
|
@@ -28,43 +45,111 @@ export interface AccountProfileProps {
|
|
|
28
45
|
*/
|
|
29
46
|
const AccountProfile = (props: AccountProfileProps) => {
|
|
30
47
|
const api = useClient<MyProfileController>();
|
|
48
|
+
const avatarApi = useClient<MyAvatarController>();
|
|
31
49
|
const toaster = useToast();
|
|
32
50
|
const { l } = useI18n();
|
|
33
51
|
const fileInput = useRef<HTMLInputElement>(null);
|
|
34
52
|
|
|
35
53
|
const [profile, setProfile] = useState<MyProfile | undefined>(props.profile);
|
|
36
|
-
const [firstName, setFirstName] = useState(props.profile?.firstName ?? "");
|
|
37
|
-
const [lastName, setLastName] = useState(props.profile?.lastName ?? "");
|
|
38
|
-
const [username, setUsername] = useState(props.profile?.username ?? "");
|
|
39
|
-
const [saving, setSaving] = useState(false);
|
|
40
54
|
const [uploading, setUploading] = useState(false);
|
|
41
55
|
|
|
56
|
+
/*
|
|
57
|
+
* Does this realm have usernames at all?
|
|
58
|
+
*
|
|
59
|
+
* The avatar section above reads its switch through `can()`, because a realm
|
|
60
|
+
* with `features.avatars` off registers no avatar action and the capability
|
|
61
|
+
* is simply absent from `/api/_links`. That cannot work here:
|
|
62
|
+
* `updateMyProfile` is the same call that saves first and last name, so it
|
|
63
|
+
* exists in every realm and its presence says nothing about usernames.
|
|
64
|
+
*
|
|
65
|
+
* The realm's own `settings.username` is the switch, and `"none"` is the
|
|
66
|
+
* only value that hides the row: it is the one that means this realm has no
|
|
67
|
+
* such thing as a username, so there is nothing to show and nothing the user
|
|
68
|
+
* could set.
|
|
69
|
+
*
|
|
70
|
+
* Without this, a `"none"` realm did not merely render a pointless field:
|
|
71
|
+
* `?? ""` seeded an empty string into a column that is `.optional()` but
|
|
72
|
+
* `minLength: 3`, `FormModel` decodes its initial values on construction,
|
|
73
|
+
* and the whole page died at `useForm` with "Too small: expected string to
|
|
74
|
+
* have >=3 characters at /username" — before anything rendered. `apps/shop`
|
|
75
|
+
* is such a realm, and `"none"` is also the framework default, so this is
|
|
76
|
+
* what any new app hits first.
|
|
77
|
+
*
|
|
78
|
+
* ⚠️ `auth-register.tsx` excludes `"email"` here as well, and this
|
|
79
|
+
* deliberately does not. In that mode `RegistrationService` derives the
|
|
80
|
+
* handle from the address and drops whatever the client sent, so the
|
|
81
|
+
* registration form is right to hide a field the user does not choose — but
|
|
82
|
+
* the account page is where an existing, already-derived username is shown,
|
|
83
|
+
* and `apps/lore` runs exactly this mode. Whether editing it there should be
|
|
84
|
+
* possible at all is a real question (a rename desyncs it from the email
|
|
85
|
+
* that produced it, and `updateMyProfile` does not re-run the slugger), but
|
|
86
|
+
* it is a separate one from "this realm has no usernames", and answering it
|
|
87
|
+
* by quietly deleting the field is not the place to start.
|
|
88
|
+
*/
|
|
89
|
+
const hasUsername = props.realmConfig?.settings?.username !== "none";
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Validated against the server's own body schema, so "3 to 30 characters"
|
|
93
|
+
* is enforced before the request rather than only by the 400 that comes
|
|
94
|
+
* back — and is stated in exactly one place.
|
|
95
|
+
*
|
|
96
|
+
* The schema stays whole and `username` is dropped from the *values*: the
|
|
97
|
+
* column is `.optional()`, so an absent key decodes cleanly, while the empty
|
|
98
|
+
* string does not. Omitting it from `groups` below is what hides the row —
|
|
99
|
+
* `AutoForm` renders the fields its groups name and nothing else — and an
|
|
100
|
+
* absent value is what keeps it out of the request.
|
|
101
|
+
*
|
|
102
|
+
* ⚠️ **`username` is never seeded as `""`, even when the field is shown.**
|
|
103
|
+
* The old `?? ""` was not only a `"none"`-realm problem: `"optional"` is a
|
|
104
|
+
* realm that collects usernames and does not insist, so an account without
|
|
105
|
+
* one is the normal case there — and it crashed the page for exactly those
|
|
106
|
+
* users while working for everyone who had set one. `undefined` is what an
|
|
107
|
+
* empty optional field means, and it is what the two name fields would use
|
|
108
|
+
* too if they were not `.nullable()` with a real "clear me" state.
|
|
109
|
+
*/
|
|
110
|
+
const form = useForm({
|
|
111
|
+
initialValues: {
|
|
112
|
+
...(hasUsername ? { username: props.profile?.username } : {}),
|
|
113
|
+
firstName: props.profile?.firstName ?? "",
|
|
114
|
+
lastName: props.profile?.lastName ?? "",
|
|
115
|
+
},
|
|
116
|
+
schema: updateMyProfileBodySchema,
|
|
117
|
+
handler: async (values) => {
|
|
118
|
+
try {
|
|
119
|
+
setProfile(
|
|
120
|
+
await api.updateMyProfile({
|
|
121
|
+
body: {
|
|
122
|
+
// Empty is "unset", which the API spells `null` — NOT
|
|
123
|
+
// `undefined`, which means "leave this column alone" and made
|
|
124
|
+
// clearing a name a silent no-op that still toasted success.
|
|
125
|
+
firstName: values.firstName || null,
|
|
126
|
+
lastName: values.lastName || null,
|
|
127
|
+
// Absent, not `null`, in a realm without usernames: `null` is the
|
|
128
|
+
// "clear this column" signal the two name fields use, and
|
|
129
|
+
// `username` has no such state — absent is "leave it alone".
|
|
130
|
+
username: values.username,
|
|
131
|
+
},
|
|
132
|
+
}),
|
|
133
|
+
);
|
|
134
|
+
toaster.show("Profile updated", "success");
|
|
135
|
+
} catch (error: any) {
|
|
136
|
+
// The username-taken 409 arrives here with its own message, which is
|
|
137
|
+
// the only one worth showing. Toasted *and* rethrown: the toast is
|
|
138
|
+
// what the user reads, and the throw is what keeps the form dirty and
|
|
139
|
+
// errored so Save stays actionable for the retry.
|
|
140
|
+
toaster.show(
|
|
141
|
+
error?.message ?? "Could not update your profile",
|
|
142
|
+
"danger",
|
|
143
|
+
);
|
|
144
|
+
throw error;
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
|
|
42
149
|
if (!profile) {
|
|
43
150
|
return null;
|
|
44
151
|
}
|
|
45
152
|
|
|
46
|
-
const save = async (event: FormEvent) => {
|
|
47
|
-
event.preventDefault();
|
|
48
|
-
setSaving(true);
|
|
49
|
-
try {
|
|
50
|
-
const updated = await api.updateMyProfile({
|
|
51
|
-
body: {
|
|
52
|
-
firstName: firstName || undefined,
|
|
53
|
-
lastName: lastName || undefined,
|
|
54
|
-
username: username || undefined,
|
|
55
|
-
},
|
|
56
|
-
});
|
|
57
|
-
setProfile(updated);
|
|
58
|
-
toaster.show("Profile updated", "success");
|
|
59
|
-
} catch (error: any) {
|
|
60
|
-
// The username-taken 409 arrives here with its own message, which is
|
|
61
|
-
// the only one worth showing.
|
|
62
|
-
toaster.show(error?.message ?? "Could not update your profile", "danger");
|
|
63
|
-
} finally {
|
|
64
|
-
setSaving(false);
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
153
|
const onPickAvatar = async (event: ChangeEvent<HTMLInputElement>) => {
|
|
69
154
|
const file = event.target.files?.[0];
|
|
70
155
|
if (!file) {
|
|
@@ -72,7 +157,7 @@ const AccountProfile = (props: AccountProfileProps) => {
|
|
|
72
157
|
}
|
|
73
158
|
setUploading(true);
|
|
74
159
|
try {
|
|
75
|
-
setProfile(await
|
|
160
|
+
setProfile(await avatarApi.updateMyAvatar({ body: { file } }));
|
|
76
161
|
toaster.show("Avatar updated", "success");
|
|
77
162
|
} catch (error: any) {
|
|
78
163
|
toaster.show(error?.message ?? "Could not upload that image", "danger");
|
|
@@ -88,7 +173,7 @@ const AccountProfile = (props: AccountProfileProps) => {
|
|
|
88
173
|
const removeAvatar = async () => {
|
|
89
174
|
setUploading(true);
|
|
90
175
|
try {
|
|
91
|
-
setProfile(await
|
|
176
|
+
setProfile(await avatarApi.deleteMyAvatar());
|
|
92
177
|
} catch (error: any) {
|
|
93
178
|
toaster.show(error?.message ?? "Could not remove your avatar", "danger");
|
|
94
179
|
} finally {
|
|
@@ -96,111 +181,139 @@ const AccountProfile = (props: AccountProfileProps) => {
|
|
|
96
181
|
}
|
|
97
182
|
};
|
|
98
183
|
|
|
184
|
+
// Realms opt into avatars (`features.avatars`, off by default), and an
|
|
185
|
+
// unregistered action is absent from `/api/_links` — so this is the realm's
|
|
186
|
+
// own switch read through the mechanism that cannot drift from it. Checking
|
|
187
|
+
// a flag mirrored into the client instead would let the picker render
|
|
188
|
+
// against endpoints that answer 404.
|
|
189
|
+
const canEditAvatar = avatarApi.updateMyAvatar.can();
|
|
190
|
+
|
|
99
191
|
return (
|
|
100
192
|
<>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
<
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
disabled={uploading}
|
|
111
|
-
aria-label="Change avatar"
|
|
112
|
-
className="relative size-14 shrink-0 cursor-pointer"
|
|
193
|
+
{canEditAvatar && (
|
|
194
|
+
<>
|
|
195
|
+
<SettingsSection
|
|
196
|
+
title="Profile picture"
|
|
197
|
+
description="Shown next to your name wherever you appear."
|
|
198
|
+
>
|
|
199
|
+
<SettingsRow
|
|
200
|
+
label="Avatar"
|
|
201
|
+
description="PNG, JPEG, GIF or WebP, up to 5 MB."
|
|
113
202
|
>
|
|
114
|
-
|
|
203
|
+
<div className="flex items-center gap-3">
|
|
204
|
+
<button
|
|
205
|
+
type="button"
|
|
206
|
+
onClick={() => fileInput.current?.click()}
|
|
207
|
+
disabled={uploading}
|
|
208
|
+
aria-label="Change avatar"
|
|
209
|
+
className="relative size-14 shrink-0 cursor-pointer"
|
|
210
|
+
>
|
|
211
|
+
{/* Only the image is clipped to a circle; the camera badge sits
|
|
115
212
|
outside the wrapper so the round mask cannot crop it. */}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
213
|
+
<div className="size-full overflow-hidden rounded-full border bg-muted">
|
|
214
|
+
<FileImage
|
|
215
|
+
id={profile.picture}
|
|
216
|
+
public
|
|
217
|
+
alt=""
|
|
218
|
+
className="size-full object-cover"
|
|
219
|
+
fallback={
|
|
220
|
+
<div className="flex size-full items-center justify-center">
|
|
221
|
+
<User className="size-6" />
|
|
222
|
+
</div>
|
|
223
|
+
}
|
|
224
|
+
/>
|
|
225
|
+
</div>
|
|
226
|
+
<div className="absolute right-0 bottom-0 flex size-5 items-center justify-center rounded-full border bg-card">
|
|
227
|
+
<Camera className="size-3" />
|
|
228
|
+
</div>
|
|
229
|
+
</button>
|
|
230
|
+
{profile.picture ? (
|
|
231
|
+
<Button
|
|
232
|
+
variant="ghost"
|
|
233
|
+
size="sm"
|
|
234
|
+
onClick={removeAvatar}
|
|
235
|
+
disabled={uploading}
|
|
236
|
+
>
|
|
237
|
+
<Trash2 className="size-4" />
|
|
238
|
+
Remove
|
|
239
|
+
</Button>
|
|
240
|
+
) : null}
|
|
131
241
|
</div>
|
|
132
|
-
</
|
|
133
|
-
|
|
134
|
-
<Button
|
|
135
|
-
variant="ghost"
|
|
136
|
-
size="sm"
|
|
137
|
-
onClick={removeAvatar}
|
|
138
|
-
disabled={uploading}
|
|
139
|
-
>
|
|
140
|
-
<Trash2 className="size-4" />
|
|
141
|
-
Remove
|
|
142
|
-
</Button>
|
|
143
|
-
) : null}
|
|
144
|
-
</div>
|
|
145
|
-
</SettingsRow>
|
|
146
|
-
</SettingsSection>
|
|
242
|
+
</SettingsRow>
|
|
243
|
+
</SettingsSection>
|
|
147
244
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
245
|
+
<input
|
|
246
|
+
type="file"
|
|
247
|
+
ref={fileInput}
|
|
248
|
+
onChange={onPickAvatar}
|
|
249
|
+
accept="image/jpeg,image/png,image/webp,image/gif"
|
|
250
|
+
className="hidden"
|
|
251
|
+
/>
|
|
252
|
+
</>
|
|
253
|
+
)}
|
|
155
254
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
255
|
+
{/* The one section here whose rows are all form fields, so it is an
|
|
256
|
+
`AutoForm` in row layout rather than hand-wired `SettingsRow`s — same
|
|
257
|
+
card, same rows, same heading, plus schema validation, the error
|
|
258
|
+
popover, Reset, and a Save that knows whether anything changed. The
|
|
259
|
+
sections above and below stay hand-wired because their rows are an
|
|
260
|
+
avatar picker and read-only values, not fields. */}
|
|
261
|
+
<AutoForm
|
|
262
|
+
form={form}
|
|
263
|
+
layout="row"
|
|
264
|
+
disabledIfPristine
|
|
265
|
+
groups={[
|
|
266
|
+
{
|
|
267
|
+
title: "Name",
|
|
268
|
+
description: "How you are identified to other people.",
|
|
269
|
+
fields: hasUsername
|
|
270
|
+
? ["username", "firstName", "lastName"]
|
|
271
|
+
: ["firstName", "lastName"],
|
|
272
|
+
},
|
|
273
|
+
]}
|
|
274
|
+
fields={{
|
|
275
|
+
// Labels are explicit rather than derived: `prettyName` would title
|
|
276
|
+
// -case them into "First Name", and this page's wording is settled.
|
|
277
|
+
//
|
|
278
|
+
// Icons are explicit because `Control`'s own fallback would resolve
|
|
279
|
+
// the schema hint, and for a plain string that is the generic "T"
|
|
280
|
+
// glyph — the same mark three times, saying "this is text" next to a
|
|
281
|
+
// label that already said so. A field earns an icon by having one
|
|
282
|
+
// that means something: `@` is what a handle looks like everywhere.
|
|
283
|
+
username: {
|
|
284
|
+
label: "Username",
|
|
285
|
+
description: "Unique across this site.",
|
|
286
|
+
autoComplete: "username",
|
|
287
|
+
icon: AtSign,
|
|
288
|
+
// No clear button: `updateMyProfile` has no "unset" for a
|
|
289
|
+
// username, so the × would offer a deletion the server cannot
|
|
290
|
+
// perform. First and last name keep theirs — those genuinely
|
|
291
|
+
// clear, via `null`.
|
|
292
|
+
clearable: false,
|
|
293
|
+
},
|
|
294
|
+
firstName: {
|
|
295
|
+
label: "First name",
|
|
296
|
+
autoComplete: "given-name",
|
|
297
|
+
icon: User,
|
|
298
|
+
},
|
|
299
|
+
lastName: {
|
|
300
|
+
label: "Last name",
|
|
301
|
+
autoComplete: "family-name",
|
|
302
|
+
icon: User,
|
|
303
|
+
},
|
|
304
|
+
}}
|
|
305
|
+
/>
|
|
196
306
|
|
|
197
|
-
<SettingsSection
|
|
307
|
+
<SettingsSection
|
|
308
|
+
title="Account"
|
|
309
|
+
description="Details you cannot change from this page."
|
|
310
|
+
>
|
|
198
311
|
<SettingsRow
|
|
199
312
|
label="Email"
|
|
200
|
-
description="Changing your email needs verification
|
|
313
|
+
description="Changing your email needs verification, so it is not a profile edit."
|
|
201
314
|
>
|
|
202
315
|
<span className="text-muted-foreground text-sm">
|
|
203
|
-
{profile.email ?? "
|
|
316
|
+
{profile.email ?? "Not set"}
|
|
204
317
|
</span>
|
|
205
318
|
</SettingsRow>
|
|
206
319
|
<SettingsRow label="Roles">
|
|
@@ -40,6 +40,20 @@ export interface AccountRouterOptions {
|
|
|
40
40
|
*/
|
|
41
41
|
className?: string;
|
|
42
42
|
|
|
43
|
+
/**
|
|
44
|
+
* Bound the account area to its parent's height and let its content column
|
|
45
|
+
* scroll, rather than relying on the document to scroll.
|
|
46
|
+
*
|
|
47
|
+
* Set it whenever the application adopts `AccountRouter.layout` into a shell
|
|
48
|
+
* that has taken the viewport height and hidden its overflow — the common
|
|
49
|
+
* `h-svh … overflow-hidden` app frame. Without it those pages have no
|
|
50
|
+
* scrollbar at all in such a shell, and everything past the fold is
|
|
51
|
+
* unreachable rather than merely below.
|
|
52
|
+
*
|
|
53
|
+
* @default false — the account area scrolls with the document.
|
|
54
|
+
*/
|
|
55
|
+
fill?: boolean;
|
|
56
|
+
|
|
43
57
|
/**
|
|
44
58
|
* Props forwarded to the pages, keyed by page.
|
|
45
59
|
*
|
|
@@ -6,6 +6,7 @@ import type {
|
|
|
6
6
|
MyIdentityController,
|
|
7
7
|
MyProfileController,
|
|
8
8
|
MySessionController,
|
|
9
|
+
RealmController,
|
|
9
10
|
} from "alepha/api/users";
|
|
10
11
|
import { $page } from "alepha/react/router";
|
|
11
12
|
import { $secure } from "alepha/security";
|
|
@@ -95,6 +96,7 @@ export class AccountRouter {
|
|
|
95
96
|
protected readonly options = $store(accountRouterOptionsAtom);
|
|
96
97
|
|
|
97
98
|
protected readonly profileApi = $client<MyProfileController>();
|
|
99
|
+
protected readonly realmApi = $client<RealmController>();
|
|
98
100
|
protected readonly identityApi = $client<MyIdentityController>();
|
|
99
101
|
protected readonly sessionApi = $client<MySessionController>();
|
|
100
102
|
protected readonly apiKeyApi = $client<ApiKeyController>();
|
|
@@ -131,7 +133,24 @@ export class AccountRouter {
|
|
|
131
133
|
group: "Account",
|
|
132
134
|
order: 1,
|
|
133
135
|
},
|
|
134
|
-
|
|
136
|
+
/*
|
|
137
|
+
* `realmConfig` rides along because the page has one realm-dependent
|
|
138
|
+
* field: a realm with `username: "none"` or `"email"` has no handle to
|
|
139
|
+
* edit. It is the same call `AuthRouter.loadRealm` makes for the same
|
|
140
|
+
* reason, and the same public endpoint — cheap, and already warm from
|
|
141
|
+
* sign-in.
|
|
142
|
+
*
|
|
143
|
+
* Both are fetched together rather than in sequence: they do not depend
|
|
144
|
+
* on each other, and the account area is behind `$secure`, so this runs
|
|
145
|
+
* client-side where a waterfall is two round trips instead of one.
|
|
146
|
+
*/
|
|
147
|
+
loader: async () => {
|
|
148
|
+
const [profile, realmConfig] = await Promise.all([
|
|
149
|
+
this.profileApi.getMyProfile(),
|
|
150
|
+
this.realmApi.getRealmConfig(),
|
|
151
|
+
]);
|
|
152
|
+
return { profile, realmConfig };
|
|
153
|
+
},
|
|
135
154
|
lazy: () => import("./account-profile.tsx"),
|
|
136
155
|
props: () => this.options.pages?.profile ?? {},
|
|
137
156
|
});
|
|
@@ -74,7 +74,7 @@ const AccountSecurity = (props: AccountSecurityProps) => {
|
|
|
74
74
|
<>
|
|
75
75
|
<SettingsSection
|
|
76
76
|
title="Sign-in methods"
|
|
77
|
-
description="At least one must remain
|
|
77
|
+
description="At least one must remain. Removing the last would lock you out permanently."
|
|
78
78
|
>
|
|
79
79
|
{identities.map((identity) => (
|
|
80
80
|
<SettingsRow
|
|
@@ -18,6 +18,26 @@ export interface AdminRouterOptions {
|
|
|
18
18
|
/**
|
|
19
19
|
* Sidebar header. Lore's back-arrow-plus-title and shop's Poinçon are both
|
|
20
20
|
* just this.
|
|
21
|
+
*
|
|
22
|
+
* ⚠️ **It must handle the sidebar collapsing to an icon rail itself.**
|
|
23
|
+
* `SidebarHeader` renders this node as given, at whatever width it asks for,
|
|
24
|
+
* while the rail around it shrinks to about one icon — so a title with no
|
|
25
|
+
* opinion about the collapsed state wraps, takes the header's height with
|
|
26
|
+
* it, and overlaps the collapse toggle. Both apps have hit this.
|
|
27
|
+
*
|
|
28
|
+
* Tailwind exposes the state as a group data attribute, the same hook the
|
|
29
|
+
* nav items use to drop their labels:
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* brand: (
|
|
33
|
+
* <div className="flex items-center gap-3 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:gap-0 group-data-[collapsible=icon]:px-0">
|
|
34
|
+
* <Mark className="shrink-0" />
|
|
35
|
+
* <span className="group-data-[collapsible=icon]:hidden">My App</span>
|
|
36
|
+
* </div>
|
|
37
|
+
* )
|
|
38
|
+
* ```
|
|
39
|
+
*
|
|
40
|
+
* Keep whatever reads as an icon, hide the words.
|
|
21
41
|
*/
|
|
22
42
|
brand?: ReactNode;
|
|
23
43
|
|
|
@@ -229,11 +229,10 @@ export interface AlephaTableProps<T> {
|
|
|
229
229
|
* Extra slot rendered to the right of the filter inputs in the
|
|
230
230
|
* toolbar — typically a "New" / "Create" button.
|
|
231
231
|
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
* reads as vertically off-center.
|
|
232
|
+
* Vertically centred in the bar (`self-center`) regardless of its own
|
|
233
|
+
* height, so it no longer has to match the filter inputs. It used to inherit
|
|
234
|
+
* the bar's `items-end`, which meant anything shorter than h-9 hung off the
|
|
235
|
+
* bottom edge and a labelled filter dragged the button down with it.
|
|
237
236
|
*/
|
|
238
237
|
toolbar?: ReactNode;
|
|
239
238
|
/**
|
|
@@ -684,9 +683,26 @@ export function AlephaTable<T>(props: AlephaTableProps<T>) {
|
|
|
684
683
|
) : (
|
|
685
684
|
<div className="flex flex-1" />
|
|
686
685
|
)}
|
|
687
|
-
{
|
|
686
|
+
{/*
|
|
687
|
+
`self-center`, against the bar's own `items-end`.
|
|
688
|
+
|
|
689
|
+
The bar bottom-aligns because a filter Control may carry a label,
|
|
690
|
+
and a row of labelled controls has to line up on the inputs rather
|
|
691
|
+
than on the top of the tallest label. Everything to the right of
|
|
692
|
+
the filters is a bare control with no label of its own, so
|
|
693
|
+
inheriting that baseline pinned it to the bottom of whatever the
|
|
694
|
+
filter area happened to measure — a "New" button sitting low
|
|
695
|
+
against a labelled select, moving as soon as a filter gained or
|
|
696
|
+
lost its label.
|
|
697
|
+
|
|
698
|
+
Centring only the trailing content keeps the filter row's own
|
|
699
|
+
alignment intact and makes the actions independent of it.
|
|
700
|
+
*/}
|
|
701
|
+
{props.toolbar && (
|
|
702
|
+
<div className="self-center">{props.toolbar}</div>
|
|
703
|
+
)}
|
|
688
704
|
<TooltipProvider>
|
|
689
|
-
<div className="flex items-
|
|
705
|
+
<div className="flex items-center gap-1 self-center">
|
|
690
706
|
{props.actions?.length ? (
|
|
691
707
|
<>
|
|
692
708
|
{props.actions.map((action) => {
|
|
@@ -99,11 +99,16 @@ export const AppActions = (props: AppActionsProps) => {
|
|
|
99
99
|
onSignIn={() => router.push(props.loginRouteName ?? "login")}
|
|
100
100
|
>
|
|
101
101
|
<ButtonUser.Email />
|
|
102
|
+
{/* Account before admin — see `ButtonUser`'s `DefaultMenu` for why. */}
|
|
103
|
+
<ButtonUser.AccountMenuItem label={props.labels?.account} />
|
|
104
|
+
{/*
|
|
105
|
+
`routeName`, not `onClick`: both of these are destinations, so they
|
|
106
|
+
render as real anchors and keep ⌘-click and open-in-new-tab.
|
|
107
|
+
*/}
|
|
102
108
|
<ButtonUser.AdminMenuItem
|
|
103
109
|
label={props.labels?.admin}
|
|
104
|
-
|
|
110
|
+
routeName={props.adminRouteName}
|
|
105
111
|
/>
|
|
106
|
-
<ButtonUser.AccountMenuItem label={props.labels?.account} />
|
|
107
112
|
{props.children}
|
|
108
113
|
<DropdownMenuSeparator />
|
|
109
114
|
<ButtonUser.LogoutMenuItem label={props.labels?.logout} />
|