4e5ea05987
* web: begin refactoring the application for future development This commit: - Deletes a bit of code. - Extracts *all* of the Locale logic into a single folder, turns management of the Locale files over to Lit itself, and restricts our responsibility to setting the locale on startup and when the user changes the locale. We do this by converting a lot of internal calls into events; a request to change a locale isn't a function call, it's an event emitted asking `REQUEST_LOCALE_CHANGE`. We've even eliminated the `DETECT_LOCALE_CHANGE` event, which redrew elements with text in them, since Lit's own `@localized()` decorator does that for us automagically. - We wrap our interfaces in an `ak-locale-context` that handles the startup and listens for the `REQUEST_LOCALE_CHANGE` event. - ... and that's pretty much it. Adding `@localized()` as a default behavior to `AKElement` means no more custom localization is needed *anywhere*. * web: improve the localization experience This commit fixes the Storybook story for the localization context component, and fixes the localization initialization pass so that it is only called once per interface environment initialization. Since all our interfaces share the same environment (the Django server), this preserves functionality across all interfaces. --------- Co-authored-by: Jens Langhammer <jens@goauthentik.io>
16 lines
825 B
TypeScript
16 lines
825 B
TypeScript
import "@goauthentik/elements/messages/MessageContainer";
|
|
import "@goauthentik/flow/FlowExecutor";
|
|
// Statically import some stages to speed up load speed
|
|
import "@goauthentik/flow/stages/access_denied/AccessDeniedStage";
|
|
// Import webauthn-related stages to prevent issues on safari
|
|
// Which is overly sensitive to allowing things only in the context of a
|
|
// user interaction
|
|
import "@goauthentik/flow/stages/authenticator_validate/AuthenticatorValidateStage";
|
|
import "@goauthentik/flow/stages/authenticator_webauthn/WebAuthnAuthenticatorRegisterStage";
|
|
import "@goauthentik/flow/stages/autosubmit/AutosubmitStage";
|
|
import "@goauthentik/flow/stages/captcha/CaptchaStage";
|
|
import "@goauthentik/flow/stages/identification/IdentificationStage";
|
|
import "@goauthentik/flow/stages/password/PasswordStage";
|
|
|
|
// end of stage import
|