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:
rcourtman 2025-11-28 09:05:41 +00:00
parent c66e9bb0e5
commit d5c9a84bdf
2 changed files with 15 additions and 10 deletions

View file

@ -443,16 +443,18 @@ const LoginForm: Component<{
{oidcMessage()}
</div>
</Show>
<div class="flex items-center gap-3 pt-2">
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
<span class="text-xs uppercase tracking-wide text-gray-400 dark:text-gray-500">
or
</span>
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
</div>
<p class="text-xs text-center text-gray-500 dark:text-gray-400">
Use your admin credentials to sign in below.
</p>
<Show when={showLocalLogin()}>
<div class="flex items-center gap-3 pt-2">
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
<span class="text-xs uppercase tracking-wide text-gray-400 dark:text-gray-500">
or
</span>
<span class="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
</div>
<p class="text-xs text-center text-gray-500 dark:text-gray-400">
Use your admin credentials to sign in below.
</p>
</Show>
</div>
</Show>
<Show when={showLocalLogin}>

View file

@ -590,6 +590,9 @@ func (h *SystemSettingsHandler) HandleUpdateSystemSettings(w http.ResponseWriter
if _, ok := rawRequest["allowEmbedding"]; ok {
settings.AllowEmbedding = updates.AllowEmbedding
}
if _, ok := rawRequest["hideLocalLogin"]; ok {
settings.HideLocalLogin = updates.HideLocalLogin
}
if _, ok := rawRequest["backupPollingEnabled"]; ok {
settings.BackupPollingEnabled = updates.BackupPollingEnabled
}