From 0a73e7ac9f2a6b273e4610220931ccd8318eb0bb Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 5 Jul 2022 23:04:25 +0200 Subject: [PATCH] tenants: add default_locale read only field, pre-hydrate in flows and read in autodetect as first choice Signed-off-by: Jens Langhammer --- .vscode/settings.json | 2 +- authentik/core/templates/if/flow.html | 4 ++- authentik/tenants/api.py | 4 ++- authentik/tenants/models.py | 5 +++ schema.yml | 4 +++ web/src/api/Config.ts | 44 +++++++++++++++++---------- web/src/api/Global.ts | 14 +++++++++ web/src/flows/FlowExecutor.ts | 11 ++----- web/src/interfaces/locale.ts | 11 ++++++- 9 files changed, 70 insertions(+), 29 deletions(-) create mode 100644 web/src/api/Global.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 74e012342..27c1b5626 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -24,7 +24,7 @@ "*.akflow": "json" }, "typescript.preferences.importModuleSpecifier": "non-relative", - "typescript.preferences.importModuleSpecifierEnding": "js", + "typescript.preferences.importModuleSpecifierEnding": "index", "typescript.tsdk": "./web/node_modules/typescript/lib", "typescript.enablePromptUseWorkspaceTsdk": true } diff --git a/authentik/core/templates/if/flow.html b/authentik/core/templates/if/flow.html index d334fdae1..cf93d4a3d 100644 --- a/authentik/core/templates/if/flow.html +++ b/authentik/core/templates/if/flow.html @@ -10,7 +10,9 @@ {% endif %}