Fix hideLocalLogin toggle persistence and login page UI
- Add hideLocalLogin handler in HandleUpdateSystemSettings() so the toggle setting is saved to system.json - Conditionally hide "or" divider and admin credentials message when local login is hidden Related to #750
This commit is contained in:
parent
1fd439237d
commit
8afc4d0c6c
2 changed files with 15 additions and 10 deletions
|
|
@ -443,16 +443,18 @@ const LoginForm: Component<{
|
||||||
{oidcMessage()}
|
{oidcMessage()}
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<div class="flex items-center gap-3 pt-2">
|
<Show when={showLocalLogin()}>
|
||||||
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
|
<div class="flex items-center gap-3 pt-2">
|
||||||
<span class="text-xs uppercase tracking-wide text-gray-400 dark:text-gray-500">
|
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
|
||||||
or
|
<span class="text-xs uppercase tracking-wide text-gray-400 dark:text-gray-500">
|
||||||
</span>
|
or
|
||||||
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
|
</span>
|
||||||
</div>
|
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
|
||||||
<p class="text-xs text-center text-gray-500 dark:text-gray-400">
|
</div>
|
||||||
Use your admin credentials to sign in below.
|
<p class="text-xs text-center text-gray-500 dark:text-gray-400">
|
||||||
</p>
|
Use your admin credentials to sign in below.
|
||||||
|
</p>
|
||||||
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={showLocalLogin}>
|
<Show when={showLocalLogin}>
|
||||||
|
|
|
||||||
|
|
@ -590,6 +590,9 @@ func (h *SystemSettingsHandler) HandleUpdateSystemSettings(w http.ResponseWriter
|
||||||
if _, ok := rawRequest["allowEmbedding"]; ok {
|
if _, ok := rawRequest["allowEmbedding"]; ok {
|
||||||
settings.AllowEmbedding = updates.AllowEmbedding
|
settings.AllowEmbedding = updates.AllowEmbedding
|
||||||
}
|
}
|
||||||
|
if _, ok := rawRequest["hideLocalLogin"]; ok {
|
||||||
|
settings.HideLocalLogin = updates.HideLocalLogin
|
||||||
|
}
|
||||||
if _, ok := rawRequest["backupPollingEnabled"]; ok {
|
if _, ok := rawRequest["backupPollingEnabled"]; ok {
|
||||||
settings.BackupPollingEnabled = updates.BackupPollingEnabled
|
settings.BackupPollingEnabled = updates.BackupPollingEnabled
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue