From 4a91a7d2e251d210f6a0055f5d2cfca53e2f91d8 Mon Sep 17 00:00:00 2001 From: Jens L Date: Thu, 15 Sep 2022 00:05:21 +0200 Subject: [PATCH] web: re-organise frontend and cleanup common code (#3572) * fix repo in api client Signed-off-by: Jens Langhammer * web: re-organise files to match their interface Signed-off-by: Jens Langhammer * core: include version in script tags Signed-off-by: Jens Langhammer * cleanup maybe broken Signed-off-by: Jens Langhammer * revert rename Signed-off-by: Jens Langhammer * web: get rid of Client.ts Signed-off-by: Jens Langhammer * move more to common Signed-off-by: Jens Langhammer * more moving Signed-off-by: Jens Langhammer * format Signed-off-by: Jens Langhammer * unfuck files that vscode fucked, thanks Signed-off-by: Jens Langhammer * move more Signed-off-by: Jens Langhammer * finish moving (maybe) Signed-off-by: Jens Langhammer * ok more moving Signed-off-by: Jens Langhammer * fix more stuff that vs code destroyed Signed-off-by: Jens Langhammer * get rid "web" prefix for virtual package Signed-off-by: Jens Langhammer * fix locales Signed-off-by: Jens Langhammer * use custom base element Signed-off-by: Jens Langhammer * fix css file Signed-off-by: Jens Langhammer * don't run autoDetectLanguage when importing locale Signed-off-by: Jens Langhammer * fix circular dependencies Signed-off-by: Jens Langhammer * web: fix build Signed-off-by: Jens Langhammer Signed-off-by: Jens Langhammer --- .github/workflows/web-api-publish.yml | 1 - Makefile | 4 +- authentik/core/templates/if/admin.html | 2 +- authentik/core/templates/if/flow.html | 2 +- authentik/core/templates/if/user.html | 2 +- authentik/tenants/utils.py | 2 + web/rollup.config.js | 12 ++-- .../{interfaces => admin}/AdminInterface.ts | 37 +++++----- web/src/{routesAdmin.ts => admin/Routes.ts} | 64 +++++++++--------- .../admin-overview/AdminOverviewPage.ts | 39 +++++------ .../admin-overview/DashboardUserPage.ts | 13 ++-- .../admin-overview/TopApplicationsTable.ts | 11 +-- .../admin-overview/cards/AdminStatusCard.ts | 6 +- .../admin-overview/cards/SystemStatusCard.ts | 4 +- .../admin-overview/cards/VersionStatusCard.ts | 4 +- .../admin-overview/cards/WorkerStatusCard.ts | 4 +- .../admin-overview/charts/FlowStatusChart.ts | 6 +- .../charts/GroupCountStatusChart.ts | 4 +- .../charts/LDAPSyncStatusChart.ts | 6 +- .../charts/OutpostStatusChart.ts | 6 +- .../charts/PolicyStatusChart.ts | 6 +- .../charts/UserCountStatusChart.ts | 4 +- .../ApplicationCheckAccessForm.ts | 10 +-- .../applications/ApplicationForm.ts | 16 ++--- .../applications/ApplicationListPage.ts | 28 ++++---- .../applications/ApplicationViewPage.ts | 27 ++++---- .../applications/wizard/ApplicationWizard.ts | 33 ++++----- .../wizard/InitialApplicationWizardPage.ts | 12 ++-- .../wizard/TypeApplicationWizardPage.ts | 4 +- .../ldap/TypeLDAPApplicationWizardPage.ts | 8 +-- .../link/TypeLinkApplicationWizardPage.ts | 6 +- .../TypeOAuthAPIApplicationWizardPage.ts | 6 +- .../oauth/TypeOAuthApplicationWizardPage.ts | 6 +- .../TypeOAuthCodeApplicationWizardPage.ts | 10 +-- .../TypeOAuthImplicitApplicationWizardPage.ts | 4 +- .../proxy/TypeProxyApplicationWizardPage.ts | 8 +-- .../saml/TypeSAMLApplicationWizardPage.ts | 6 +- .../TypeSAMLConfigApplicationWizardPage.ts | 8 +-- .../TypeSAMLImportApplicationWizardPage.ts | 8 +-- .../blueprints/BlueprintForm.ts | 12 ++-- .../blueprints/BlueprintListPage.ts | 29 ++++---- .../crypto/CertificateGenerateForm.ts | 6 +- .../crypto/CertificateKeyPairForm.ts | 8 +-- .../crypto/CertificateKeyPairListPage.ts | 24 +++---- web/src/{pages => admin}/events/EventInfo.ts | 17 ++--- .../{pages => admin}/events/EventInfoPage.ts | 15 +++-- .../{pages => admin}/events/EventListPage.ts | 18 ++--- web/src/{pages => admin}/events/RuleForm.ts | 6 +- .../{pages => admin}/events/RuleListPage.ts | 22 +++--- .../{pages => admin}/events/TransportForm.ts | 8 +-- .../events/TransportListPage.ts | 22 +++--- web/src/{pages => admin}/events/utils.ts | 0 .../{pages => admin}/flows/BoundStagesList.ts | 24 +++---- web/src/{pages => admin}/flows/FlowDiagram.ts | 11 +-- web/src/{pages => admin}/flows/FlowForm.ts | 12 ++-- .../{pages => admin}/flows/FlowImportForm.ts | 8 +-- .../{pages => admin}/flows/FlowListPage.ts | 28 ++++---- .../{pages => admin}/flows/FlowViewPage.ts | 25 +++---- .../flows/StageBindingForm.ts | 8 +-- web/src/{pages => admin}/flows/utils.ts | 0 web/src/{pages => admin}/groups/GroupForm.ts | 18 ++--- .../{pages => admin}/groups/GroupListPage.ts | 22 +++--- .../{pages => admin}/groups/GroupViewPage.ts | 31 ++++----- .../groups/MemberSelectModal.ts | 18 ++--- .../groups/RelatedGroupList.ts | 20 +++--- .../outposts/OutpostDeploymentModal.ts | 4 +- .../{pages => admin}/outposts/OutpostForm.ts | 8 +-- .../outposts/OutpostHealth.ts | 11 +-- .../outposts/OutpostHealthSimple.ts | 15 +++-- .../outposts/OutpostListPage.ts | 29 ++++---- .../outposts/ServiceConnectionDockerForm.ts | 8 +-- .../ServiceConnectionKubernetesForm.ts | 10 +-- .../outposts/ServiceConnectionListPage.ts | 30 ++++----- .../outposts/ServiceConnectionWizard.ts | 21 +++--- .../policies/BoundPoliciesList.ts | 30 ++++----- .../policies/PolicyBindingForm.ts | 12 ++-- .../policies/PolicyListPage.ts | 40 +++++------ .../policies/PolicyTestForm.ts | 14 ++-- .../{pages => admin}/policies/PolicyWizard.ts | 31 ++++----- .../policies/dummy/DummyPolicyForm.ts | 10 +-- .../event_matcher/EventMatcherPolicyForm.ts | 10 +-- .../policies/expiry/ExpiryPolicyForm.ts | 10 +-- .../expression/ExpressionPolicyForm.ts | 12 ++-- .../policies/hibp/HaveIBeenPwnedPolicyForm.ts | 10 +-- .../policies/password/PasswordPolicyForm.ts | 10 +-- .../policies/reputation/ReputationListPage.ts | 20 +++--- .../reputation/ReputationPolicyForm.ts | 10 +-- .../PropertyMappingLDAPForm.ts | 8 +-- .../PropertyMappingListPage.ts | 34 +++++----- .../PropertyMappingNotification.ts | 8 +-- .../PropertyMappingSAMLForm.ts | 8 +-- .../PropertyMappingScopeForm.ts | 8 +-- .../PropertyMappingTestForm.ts | 12 ++-- .../PropertyMappingWizard.ts | 27 ++++---- .../providers/ProviderListPage.ts | 30 ++++----- .../providers/ProviderViewPage.ts | 23 ++++--- .../providers/ProviderWizard.ts | 29 ++++---- .../providers/RelatedApplicationButton.ts | 11 +-- .../providers/ldap/LDAPProviderForm.ts | 10 +-- .../providers/ldap/LDAPProviderViewPage.ts | 27 ++++---- .../providers/oauth2/OAuth2ProviderForm.ts | 12 ++-- .../oauth2/OAuth2ProviderViewPage.ts | 27 ++++---- .../providers/proxy/ProxyProviderForm.ts | 12 ++-- .../providers/proxy/ProxyProviderViewPage.ts | 33 ++++----- .../providers/saml/SAMLProviderForm.ts | 10 +-- .../providers/saml/SAMLProviderImportForm.ts | 8 +-- .../providers/saml/SAMLProviderViewPage.ts | 27 ++++---- .../sources/SourceListPage.ts | 28 ++++---- .../sources/SourceViewPage.ts | 21 +++--- .../{pages => admin}/sources/SourceWizard.ts | 25 +++---- .../sources/ldap/LDAPSourceForm.ts | 12 ++-- .../sources/ldap/LDAPSourceViewPage.ts | 25 +++---- .../sources/oauth/OAuthSourceForm.ts | 14 ++-- .../sources/oauth/OAuthSourceViewPage.ts | 25 +++---- .../sources/plex/PlexSourceForm.ts | 12 ++-- .../sources/plex/PlexSourceViewPage.ts | 25 +++---- .../sources/saml/SAMLSourceForm.ts | 12 ++-- .../sources/saml/SAMLSourceViewPage.ts | 25 +++---- .../{pages => admin}/stages/StageListPage.ts | 60 ++++++++--------- .../{pages => admin}/stages/StageWizard.ts | 55 +++++++-------- .../AuthenticatorDuoStageForm.ts | 10 +-- .../AuthenticatorSMSStageForm.ts | 10 +-- .../AuthenticatorStaticStageForm.ts | 10 +-- .../AuthenticatorTOTPStageForm.ts | 8 +-- .../AuthenticatorValidateStageForm.ts | 10 +-- .../AuthenticateWebAuthnStageForm.ts | 6 +- .../stages/captcha/CaptchaStageForm.ts | 8 +-- .../stages/consent/ConsentStageForm.ts | 10 +-- .../stages/deny/DenyStageForm.ts | 6 +- .../stages/dummy/DummyStageForm.ts | 6 +- .../stages/email/EmailStageForm.ts | 10 +-- .../identification/IdentificationStageForm.ts | 10 +-- .../stages/invitation/InvitationForm.ts | 10 +-- .../stages/invitation/InvitationListLink.ts | 9 +-- .../stages/invitation/InvitationListPage.ts | 24 +++---- .../stages/invitation/InvitationStageForm.ts | 10 +-- .../stages/password/PasswordStageForm.ts | 10 +-- .../stages/prompt/PromptForm.ts | 10 +-- .../stages/prompt/PromptListPage.ts | 24 +++---- .../stages/prompt/PromptStageForm.ts | 12 ++-- .../stages/user_delete/UserDeleteStageForm.ts | 6 +- .../stages/user_login/UserLoginStageForm.ts | 12 ++-- .../stages/user_logout/UserLogoutStageForm.ts | 6 +- .../stages/user_write/UserWriteStageForm.ts | 12 ++-- .../system-tasks/SystemTaskListPage.ts | 18 ++--- .../{pages => admin}/tenants/TenantForm.ts | 14 ++-- .../tenants/TenantListPage.ts | 22 +++--- web/src/{pages => admin}/tokens/TokenForm.ts | 12 ++-- .../{pages => admin}/tokens/TokenListPage.ts | 24 +++---- .../users/GroupSelectModal.ts | 18 ++--- .../{pages => admin}/users/RelatedUserList.ts | 38 +++++------ .../users/ServiceAccountForm.ts | 8 +-- .../{pages => admin}/users/UserActiveForm.ts | 8 +-- web/src/{pages => admin}/users/UserForm.ts | 12 ++-- .../{pages => admin}/users/UserListPage.ts | 46 ++++++------- .../users/UserPasswordForm.ts | 8 +-- .../users/UserResetEmailForm.ts | 6 +- .../{pages => admin}/users/UserViewPage.ts | 53 ++++++++------- web/src/api/Client.ts | 17 ----- web/src/api/Error.ts | 2 - .../{api/Config.ts => common/api/config.ts} | 42 +++--------- web/src/common/api/middleware.ts | 56 ++++++++++++++++ web/src/{ => common}/constants.ts | 4 +- web/src/common/errors.ts | 2 + web/src/{api/Events.ts => common/events.ts} | 0 web/src/{api/Global.ts => common/global.ts} | 0 .../{api/Plex.ts => common/helpers/plex.ts} | 6 +- .../utils.ts => common/helpers/webauthn.ts} | 0 web/src/common/messages.ts | 6 ++ web/src/{api/Sentry.ts => common/sentry.ts} | 8 +-- web/src/{ => common/styles}/authentik.css | 0 web/src/common/{ => ui}/config.ts | 2 +- web/src/{interfaces => common/ui}/locale.ts | 39 +++++------ web/src/{api/Users.ts => common/users.ts} | 4 +- web/src/{ => common}/utils.ts | 14 +--- web/src/common/ws.ts | 20 +++--- web/src/elements/Base.ts | 19 ++++++ web/src/elements/CodeMirror.ts | 4 +- web/src/elements/Divider.ts | 8 ++- web/src/elements/EmptyState.ts | 9 +-- web/src/elements/Expand.ts | 6 +- web/src/elements/Label.ts | 8 ++- web/src/elements/LoadingOverlay.ts | 7 +- web/src/elements/Markdown.ts | 8 ++- web/src/elements/PageHeader.ts | 15 +++-- web/src/elements/SearchSelect.ts | 8 ++- web/src/elements/Spinner.ts | 6 +- web/src/elements/Tabs.ts | 11 +-- web/src/elements/Tooltip.ts | 8 ++- web/src/elements/TreeView.ts | 13 ++-- web/src/elements/buttons/ActionButton.ts | 6 +- web/src/elements/buttons/Dropdown.ts | 7 +- web/src/elements/buttons/ModalButton.ts | 11 +-- web/src/elements/buttons/SpinnerButton.ts | 11 +-- web/src/elements/buttons/TokenCopyButton.ts | 12 ++-- web/src/elements/cards/AggregateCard.ts | 8 ++- .../elements/cards/AggregatePromiseCard.ts | 6 +- web/src/elements/charts/AdminLoginsChart.ts | 4 +- web/src/elements/charts/AdminModelPerDay.ts | 4 +- .../charts/ApplicationAuthorizeChart.ts | 4 +- web/src/elements/charts/Chart.ts | 9 +-- web/src/elements/charts/UserChart.ts | 4 +- web/src/elements/chips/Chip.ts | 8 ++- web/src/elements/chips/ChipGroup.ts | 9 +-- web/src/elements/events/ObjectChangelog.ts | 22 +++--- web/src/elements/events/UserEvents.ts | 23 ++++--- web/src/elements/forms/ConfirmationForm.ts | 10 +-- web/src/elements/forms/DeleteBulkForm.ts | 18 ++--- web/src/elements/forms/DeleteForm.ts | 10 +-- web/src/elements/forms/Form.ts | 19 +++--- web/src/elements/forms/FormElement.ts | 6 +- web/src/elements/forms/FormGroup.ts | 8 ++- .../elements/forms/HorizontalFormElement.ts | 11 +-- web/src/elements/forms/ModalForm.ts | 10 +-- web/src/elements/forms/ModelForm.ts | 4 +- web/src/elements/forms/ProxyForm.ts | 2 +- web/src/elements/messages/Message.ts | 13 ++-- web/src/elements/messages/MessageContainer.ts | 22 ++++-- web/src/elements/messages/Middleware.ts | 4 +- web/src/elements/notifications/APIDrawer.ts | 38 ++--------- .../notifications/NotificationDrawer.ts | 23 ++++--- web/src/elements/oauth/UserRefreshList.ts | 14 ++-- web/src/elements/router/Route.ts | 2 +- web/src/elements/router/RouteMatch.ts | 4 +- web/src/elements/router/Router404.ts | 6 +- web/src/elements/router/RouterOutlet.ts | 15 +++-- web/src/elements/sidebar/Sidebar.ts | 11 +-- web/src/elements/sidebar/SidebarBrand.ts | 16 +++-- web/src/elements/sidebar/SidebarItem.ts | 9 +-- web/src/elements/sidebar/SidebarUser.ts | 7 +- web/src/elements/table/Table.ts | 37 +++++----- web/src/elements/table/TableModal.ts | 13 ++-- web/src/elements/table/TablePage.ts | 6 +- web/src/elements/table/TablePagination.ts | 22 ++++-- web/src/elements/table/TableSearch.ts | 8 ++- web/src/elements/user/SessionList.ts | 12 ++-- web/src/elements/user/UserConsentList.ts | 12 ++-- web/src/elements/user/UserDevicesList.ts | 15 ++--- web/src/elements/utils/TimeDeltaHelp.ts | 9 +-- web/src/elements/wizard/ActionWizardPage.ts | 8 +-- web/src/elements/wizard/FormWizardPage.ts | 4 +- web/src/elements/wizard/Wizard.ts | 6 +- web/src/elements/wizard/WizardFormPage.ts | 6 +- web/src/elements/wizard/WizardPage.ts | 11 +-- web/src/{flows => flow}/FlowExecutor.ts | 67 +++++++++---------- web/src/{flows => flow}/FlowInspector.ts | 13 ++-- web/src/flow/FlowInterface.ts | 5 ++ web/src/{flows => flow}/FormStatic.ts | 6 +- .../sources/apple/AppleLoginInit.ts | 6 +- .../{flows => flow}/sources/apple/apple.d.ts | 0 .../sources/plex/PlexLoginInit.ts | 12 ++-- .../{flows => flow}/stages/FlowErrorStage.ts | 8 +-- .../{flows => flow}/stages/RedirectStage.ts | 4 +- .../stages/access_denied/AccessDeniedStage.ts | 8 +-- .../AuthenticatorDuoStage.ts | 12 ++-- .../AuthenticatorSMSStage.ts | 10 +-- .../AuthenticatorStaticStage.ts | 10 +-- .../AuthenticatorTOTPStage.ts | 14 ++-- .../AuthenticatorValidateStage.ts | 14 ++-- .../AuthenticatorValidateStageCode.ts | 14 ++-- .../AuthenticatorValidateStageDuo.ts | 12 ++-- .../AuthenticatorValidateStageWebAuthn.ts | 8 +-- .../WebAuthnAuthenticatorRegisterStage.ts | 8 +-- .../stages/autosubmit/AutosubmitStage.ts | 6 +- web/src/{flows => flow}/stages/base.ts | 6 +- .../stages/captcha/CaptchaStage.ts | 12 ++-- .../stages/consent/ConsentStage.ts | 8 +-- .../stages/dummy/DummyStage.ts | 8 +-- .../stages/email/EmailStage.ts | 6 +- .../identification/IdentificationStage.ts | 10 +-- .../stages/password/PasswordStage.ts | 12 ++-- .../stages/prompt/PromptStage.ts | 12 ++-- web/src/interfaces/FlowInterface.ts | 3 - web/{ => src/polyfill}/poly.ts | 0 web/src/user/LibraryApplication.ts | 13 ++-- web/src/user/LibraryPage.ts | 29 +++++--- web/src/{routesUser.ts => user/Routes.ts} | 6 +- web/src/{interfaces => user}/UserInterface.ts | 43 ++++++------ .../user/user-settings/BaseUserSettings.ts | 8 ++- .../user/user-settings/UserSettingsPage.ts | 29 ++++---- .../user-settings/details/UserPassword.ts | 9 +-- .../details/UserSettingsFlowExecutor.ts | 23 ++++--- .../details/stages/prompt/PromptStage.ts | 4 +- .../user/user-settings/mfa/MFADeviceForm.ts | 6 +- .../user/user-settings/mfa/MFADevicesPage.ts | 20 +++--- .../user-settings/sources/SourceSettings.ts | 17 ++--- .../sources/SourceSettingsOAuth.ts | 12 ++-- .../sources/SourceSettingsPlex.ts | 14 ++-- .../user-settings/tokens/UserTokenForm.ts | 6 +- .../user-settings/tokens/UserTokenList.ts | 26 +++---- web/tsconfig.json | 8 ++- 291 files changed, 2062 insertions(+), 1921 deletions(-) rename web/src/{interfaces => admin}/AdminInterface.ts (91%) rename web/src/{routesAdmin.ts => admin/Routes.ts} (68%) rename web/src/{pages => admin}/admin-overview/AdminOverviewPage.ts (87%) rename web/src/{pages => admin}/admin-overview/DashboardUserPage.ts (89%) rename web/src/{pages => admin}/admin-overview/TopApplicationsTable.ts (84%) rename web/src/{pages => admin}/admin-overview/cards/AdminStatusCard.ts (86%) rename web/src/{pages => admin}/admin-overview/cards/SystemStatusCard.ts (95%) rename web/src/{pages => admin}/admin-overview/cards/VersionStatusCard.ts (92%) rename web/src/{pages => admin}/admin-overview/cards/WorkerStatusCard.ts (87%) rename web/src/{pages => admin}/admin-overview/charts/FlowStatusChart.ts (88%) rename web/src/{pages => admin}/admin-overview/charts/GroupCountStatusChart.ts (92%) rename web/src/{pages => admin}/admin-overview/charts/LDAPSyncStatusChart.ts (93%) rename web/src/{pages => admin}/admin-overview/charts/OutpostStatusChart.ts (91%) rename web/src/{pages => admin}/admin-overview/charts/PolicyStatusChart.ts (91%) rename web/src/{pages => admin}/admin-overview/charts/UserCountStatusChart.ts (92%) rename web/src/{pages => admin}/applications/ApplicationCheckAccessForm.ts (94%) rename web/src/{pages => admin}/applications/ApplicationForm.ts (96%) rename web/src/{pages => admin}/applications/ApplicationListPage.ts (87%) rename web/src/{pages => admin}/applications/ApplicationViewPage.ts (94%) rename web/src/{pages => admin}/applications/wizard/ApplicationWizard.ts (53%) rename web/src/{pages => admin}/applications/wizard/InitialApplicationWizardPage.ts (88%) rename web/src/{pages => admin}/applications/wizard/TypeApplicationWizardPage.ts (95%) rename web/src/{pages => admin}/applications/wizard/ldap/TypeLDAPApplicationWizardPage.ts (91%) rename web/src/{pages => admin}/applications/wizard/link/TypeLinkApplicationWizardPage.ts (82%) rename web/src/{pages => admin}/applications/wizard/oauth/TypeOAuthAPIApplicationWizardPage.ts (86%) rename web/src/{pages => admin}/applications/wizard/oauth/TypeOAuthApplicationWizardPage.ts (94%) rename web/src/{pages => admin}/applications/wizard/oauth/TypeOAuthCodeApplicationWizardPage.ts (88%) rename web/src/{pages => admin}/applications/wizard/oauth/TypeOAuthImplicitApplicationWizardPage.ts (76%) rename web/src/{pages => admin}/applications/wizard/proxy/TypeProxyApplicationWizardPage.ts (89%) rename web/src/{pages => admin}/applications/wizard/saml/TypeSAMLApplicationWizardPage.ts (92%) rename web/src/{pages => admin}/applications/wizard/saml/TypeSAMLConfigApplicationWizardPage.ts (88%) rename web/src/{pages => admin}/applications/wizard/saml/TypeSAMLImportApplicationWizardPage.ts (88%) rename web/src/{pages => admin}/blueprints/BlueprintForm.ts (92%) rename web/src/{pages => admin}/blueprints/BlueprintListPage.ts (84%) rename web/src/{pages => admin}/crypto/CertificateGenerateForm.ts (89%) rename web/src/{pages => admin}/crypto/CertificateKeyPairForm.ts (91%) rename web/src/{pages => admin}/crypto/CertificateKeyPairListPage.ts (91%) rename web/src/{pages => admin}/events/EventInfo.ts (97%) rename web/src/{pages => admin}/events/EventInfoPage.ts (77%) rename web/src/{pages => admin}/events/EventListPage.ts (81%) rename web/src/{pages => admin}/events/RuleForm.ts (96%) rename web/src/{pages => admin}/events/RuleListPage.ts (84%) rename web/src/{pages => admin}/events/TransportForm.ts (96%) rename web/src/{pages => admin}/events/TransportListPage.ts (84%) rename web/src/{pages => admin}/events/utils.ts (100%) rename web/src/{pages => admin}/flows/BoundStagesList.ts (88%) rename web/src/{pages => admin}/flows/FlowDiagram.ts (90%) rename web/src/{pages => admin}/flows/FlowForm.ts (97%) rename web/src/{pages => admin}/flows/FlowImportForm.ts (82%) rename web/src/{pages => admin}/flows/FlowListPage.ts (86%) rename web/src/{pages => admin}/flows/FlowViewPage.ts (95%) rename web/src/{pages => admin}/flows/StageBindingForm.ts (97%) rename web/src/{pages => admin}/flows/utils.ts (100%) rename web/src/{pages => admin}/groups/GroupForm.ts (93%) rename web/src/{pages => admin}/groups/GroupListPage.ts (83%) rename web/src/{pages => admin}/groups/GroupViewPage.ts (88%) rename web/src/{pages => admin}/groups/MemberSelectModal.ts (82%) rename web/src/{pages => admin}/groups/RelatedGroupList.ts (81%) rename web/src/{pages => admin}/outposts/OutpostDeploymentModal.ts (96%) rename web/src/{pages => admin}/outposts/OutpostForm.ts (97%) rename web/src/{pages => admin}/outposts/OutpostHealth.ts (83%) rename web/src/{pages => admin}/outposts/OutpostHealthSimple.ts (77%) rename web/src/{pages => admin}/outposts/OutpostListPage.ts (88%) rename web/src/{pages => admin}/outposts/ServiceConnectionDockerForm.ts (96%) rename web/src/{pages => admin}/outposts/ServiceConnectionKubernetesForm.ts (91%) rename web/src/{pages => admin}/outposts/ServiceConnectionListPage.ts (81%) rename web/src/{pages => admin}/outposts/ServiceConnectionWizard.ts (84%) rename web/src/{pages => admin}/policies/BoundPoliciesList.ts (89%) rename web/src/{pages => admin}/policies/PolicyBindingForm.ts (97%) rename web/src/{pages => admin}/policies/PolicyListPage.ts (79%) rename web/src/{pages => admin}/policies/PolicyTestForm.ts (93%) rename web/src/{pages => admin}/policies/PolicyWizard.ts (77%) rename web/src/{pages => admin}/policies/dummy/DummyPolicyForm.ts (93%) rename web/src/{pages => admin}/policies/event_matcher/EventMatcherPolicyForm.ts (95%) rename web/src/{pages => admin}/policies/expiry/ExpiryPolicyForm.ts (93%) rename web/src/{pages => admin}/policies/expression/ExpressionPolicyForm.ts (91%) rename web/src/{pages => admin}/policies/hibp/HaveIBeenPwnedPolicyForm.ts (93%) rename web/src/{pages => admin}/policies/password/PasswordPolicyForm.ts (96%) rename web/src/{pages => admin}/policies/reputation/ReputationListPage.ts (80%) rename web/src/{pages => admin}/policies/reputation/ReputationPolicyForm.ts (94%) rename web/src/{pages => admin}/property-mappings/PropertyMappingLDAPForm.ts (92%) rename web/src/{pages => admin}/property-mappings/PropertyMappingListPage.ts (82%) rename web/src/{pages => admin}/property-mappings/PropertyMappingNotification.ts (91%) rename web/src/{pages => admin}/property-mappings/PropertyMappingSAMLForm.ts (93%) rename web/src/{pages => admin}/property-mappings/PropertyMappingScopeForm.ts (93%) rename web/src/{pages => admin}/property-mappings/PropertyMappingTestForm.ts (90%) rename web/src/{pages => admin}/property-mappings/PropertyMappingWizard.ts (79%) rename web/src/{pages => admin}/providers/ProviderListPage.ts (78%) rename web/src/{pages => admin}/providers/ProviderViewPage.ts (81%) rename web/src/{pages => admin}/providers/ProviderWizard.ts (82%) rename web/src/{pages => admin}/providers/RelatedApplicationButton.ts (78%) rename web/src/{pages => admin}/providers/ldap/LDAPProviderForm.ts (97%) rename web/src/{pages => admin}/providers/ldap/LDAPProviderViewPage.ts (92%) rename web/src/{pages => admin}/providers/oauth2/OAuth2ProviderForm.ts (98%) rename web/src/{pages => admin}/providers/oauth2/OAuth2ProviderViewPage.ts (94%) rename web/src/{pages => admin}/providers/proxy/ProxyProviderForm.ts (98%) rename web/src/{pages => admin}/providers/proxy/ProxyProviderViewPage.ts (93%) rename web/src/{pages => admin}/providers/saml/SAMLProviderForm.ts (98%) rename web/src/{pages => admin}/providers/saml/SAMLProviderImportForm.ts (91%) rename web/src/{pages => admin}/providers/saml/SAMLProviderViewPage.ts (94%) rename web/src/{pages => admin}/sources/SourceListPage.ts (80%) rename web/src/{pages => admin}/sources/SourceViewPage.ts (76%) rename web/src/{pages => admin}/sources/SourceWizard.ts (82%) rename web/src/{pages => admin}/sources/ldap/LDAPSourceForm.ts (98%) rename web/src/{pages => admin}/sources/ldap/LDAPSourceViewPage.ts (93%) rename web/src/{pages => admin}/sources/oauth/OAuthSourceForm.ts (97%) rename web/src/{pages => admin}/sources/oauth/OAuthSourceViewPage.ts (93%) rename web/src/{pages => admin}/sources/plex/PlexSourceForm.ts (97%) rename web/src/{pages => admin}/sources/plex/PlexSourceViewPage.ts (88%) rename web/src/{pages => admin}/sources/saml/SAMLSourceForm.ts (98%) rename web/src/{pages => admin}/sources/saml/SAMLSourceViewPage.ts (92%) rename web/src/{pages => admin}/stages/StageListPage.ts (62%) rename web/src/{pages => admin}/stages/StageWizard.ts (63%) rename web/src/{pages => admin}/stages/authenticator_duo/AuthenticatorDuoStageForm.ts (95%) rename web/src/{pages => admin}/stages/authenticator_sms/AuthenticatorSMSStageForm.ts (97%) rename web/src/{pages => admin}/stages/authenticator_static/AuthenticatorStaticStageForm.ts (94%) rename web/src/{pages => admin}/stages/authenticator_totp/AuthenticatorTOTPStageForm.ts (95%) rename web/src/{pages => admin}/stages/authenticator_validate/AuthenticatorValidateStageForm.ts (97%) rename web/src/{pages => admin}/stages/authenticator_webauthn/AuthenticateWebAuthnStageForm.ts (98%) rename web/src/{pages => admin}/stages/captcha/CaptchaStageForm.ts (93%) rename web/src/{pages => admin}/stages/consent/ConsentStageForm.ts (94%) rename web/src/{pages => admin}/stages/deny/DenyStageForm.ts (90%) rename web/src/{pages => admin}/stages/dummy/DummyStageForm.ts (90%) rename web/src/{pages => admin}/stages/email/EmailStageForm.ts (97%) rename web/src/{pages => admin}/stages/identification/IdentificationStageForm.ts (98%) rename web/src/{pages => admin}/stages/invitation/InvitationForm.ts (91%) rename web/src/{pages => admin}/stages/invitation/InvitationListLink.ts (94%) rename web/src/{pages => admin}/stages/invitation/InvitationListPage.ts (86%) rename web/src/{pages => admin}/stages/invitation/InvitationStageForm.ts (91%) rename web/src/{pages => admin}/stages/password/PasswordStageForm.ts (96%) rename web/src/{pages => admin}/stages/prompt/PromptForm.ts (96%) rename web/src/{pages => admin}/stages/prompt/PromptListPage.ts (81%) rename web/src/{pages => admin}/stages/prompt/PromptStageForm.ts (94%) rename web/src/{pages => admin}/stages/user_delete/UserDeleteStageForm.ts (90%) rename web/src/{pages => admin}/stages/user_login/UserLoginStageForm.ts (88%) rename web/src/{pages => admin}/stages/user_logout/UserLogoutStageForm.ts (89%) rename web/src/{pages => admin}/stages/user_write/UserWriteStageForm.ts (93%) rename web/src/{pages => admin}/system-tasks/SystemTaskListPage.ts (88%) rename web/src/{pages => admin}/tenants/TenantForm.ts (97%) rename web/src/{pages => admin}/tenants/TenantListPage.ts (82%) rename web/src/{pages => admin}/tokens/TokenForm.ts (92%) rename web/src/{pages => admin}/tokens/TokenListPage.ts (86%) rename web/src/{pages => admin}/users/GroupSelectModal.ts (82%) rename web/src/{pages => admin}/users/RelatedUserList.ts (93%) rename web/src/{pages => admin}/users/ServiceAccountForm.ts (93%) rename web/src/{pages => admin}/users/UserActiveForm.ts (86%) rename web/src/{pages => admin}/users/UserForm.ts (95%) rename web/src/{pages => admin}/users/UserListPage.ts (92%) rename web/src/{pages => admin}/users/UserPasswordForm.ts (81%) rename web/src/{pages => admin}/users/UserResetEmailForm.ts (90%) rename web/src/{pages => admin}/users/UserViewPage.ts (91%) delete mode 100644 web/src/api/Client.ts delete mode 100644 web/src/api/Error.ts rename web/src/{api/Config.ts => common/api/config.ts} (69%) create mode 100644 web/src/common/api/middleware.ts rename web/src/{ => common}/constants.ts (83%) rename web/src/{api/Events.ts => common/events.ts} (100%) rename web/src/{api/Global.ts => common/global.ts} (100%) rename web/src/{api/Plex.ts => common/helpers/plex.ts} (95%) rename web/src/{flows/stages/authenticator_webauthn/utils.ts => common/helpers/webauthn.ts} (100%) create mode 100644 web/src/common/messages.ts rename web/src/{api/Sentry.ts => common/sentry.ts} (93%) rename web/src/{ => common/styles}/authentik.css (100%) rename web/src/common/{ => ui}/config.ts (97%) rename web/src/{interfaces => common/ui}/locale.ts (77%) rename web/src/{api/Users.ts => common/users.ts} (93%) rename web/src/{ => common}/utils.ts (88%) create mode 100644 web/src/elements/Base.ts rename web/src/{flows => flow}/FlowExecutor.ts (90%) rename web/src/{flows => flow}/FlowInspector.ts (97%) create mode 100644 web/src/flow/FlowInterface.ts rename web/src/{flows => flow}/FormStatic.ts (91%) rename web/src/{flows => flow}/sources/apple/AppleLoginInit.ts (94%) rename web/src/{flows => flow}/sources/apple/apple.d.ts (100%) rename web/src/{flows => flow}/sources/plex/PlexLoginInit.ts (87%) rename web/src/{flows => flow}/stages/FlowErrorStage.ts (92%) rename web/src/{flows => flow}/stages/RedirectStage.ts (94%) rename web/src/{flows => flow}/stages/access_denied/AccessDeniedStage.ts (92%) rename web/src/{flows => flow}/stages/authenticator_duo/AuthenticatorDuoStage.ts (92%) rename web/src/{flows => flow}/stages/authenticator_sms/AuthenticatorSMSStage.ts (96%) rename web/src/{flows => flow}/stages/authenticator_static/AuthenticatorStaticStage.ts (93%) rename web/src/{flows => flow}/stages/authenticator_totp/AuthenticatorTOTPStage.ts (92%) rename web/src/{flows => flow}/stages/authenticator_validate/AuthenticatorValidateStage.ts (95%) rename web/src/{flows => flow}/stages/authenticator_validate/AuthenticatorValidateStageCode.ts (91%) rename web/src/{flows => flow}/stages/authenticator_validate/AuthenticatorValidateStageDuo.ts (90%) rename web/src/{flows => flow}/stages/authenticator_validate/AuthenticatorValidateStageWebAuthn.ts (94%) rename web/src/{flows => flow}/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage.ts (95%) rename web/src/{flows => flow}/stages/autosubmit/AutosubmitStage.ts (93%) rename web/src/{flows => flow}/stages/base.ts (93%) rename web/src/{flows => flow}/stages/captcha/CaptchaStage.ts (91%) rename web/src/{flows => flow}/stages/consent/ConsentStage.ts (96%) rename web/src/{flows => flow}/stages/dummy/DummyStage.ts (90%) rename web/src/{flows => flow}/stages/email/EmailStage.ts (92%) rename web/src/{flows => flow}/stages/identification/IdentificationStage.ts (97%) rename web/src/{flows => flow}/stages/password/PasswordStage.ts (93%) rename web/src/{flows => flow}/stages/prompt/PromptStage.ts (96%) delete mode 100644 web/src/interfaces/FlowInterface.ts rename web/{ => src/polyfill}/poly.ts (100%) rename web/src/{routesUser.ts => user/Routes.ts} (69%) rename web/src/{interfaces => user}/UserInterface.ts (92%) diff --git a/.github/workflows/web-api-publish.yml b/.github/workflows/web-api-publish.yml index 3f3cd6676..66d4987db 100644 --- a/.github/workflows/web-api-publish.yml +++ b/.github/workflows/web-api-publish.yml @@ -10,7 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - # Setup .npmrc file to publish to npm - uses: actions/setup-node@v3.4.1 with: node-version: '16' diff --git a/Makefile b/Makefile index 824db0c3c..6f1b568fd 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,9 @@ gen-client-ts: -i /local/schema.yml \ -g typescript-fetch \ -o /local/gen-ts-api \ - --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} + --additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION} \ + --git-repo-id authentik \ + --git-user-id goauthentik mkdir -p web/node_modules/@goauthentik/api \cp -fv scripts/web_api_readme.md gen-ts-api/README.md cd gen-ts-api && npm i diff --git a/authentik/core/templates/if/admin.html b/authentik/core/templates/if/admin.html index 68b8f2768..b0fe05922 100644 --- a/authentik/core/templates/if/admin.html +++ b/authentik/core/templates/if/admin.html @@ -4,7 +4,7 @@ {% load i18n %} {% block head %} - + diff --git a/authentik/core/templates/if/flow.html b/authentik/core/templates/if/flow.html index bc378f224..657c21579 100644 --- a/authentik/core/templates/if/flow.html +++ b/authentik/core/templates/if/flow.html @@ -23,7 +23,7 @@ window.authentik.flow = { {% endblock %} {% block head %} - +