Logout: - It navigated to "authenticatio/logout", a misspelled route. - The correct template route, authentication/logout, would throw anyway. Its RemoteAuthenticatorView casts the AuthenticationStateProvider to the OIDC template's service, and the app registers TokenAuthStateProvider instead. - It now signs out through TokenAuthStateProvider.LogoutAsync, as the code commented out in the page intended, and returns home. LoginDisplay's sign-out goes through it as well. - This also drops the obsolete SignOutSessionStateManager, the build's last warning. The IndexedDB schema never declared the ClientLogs store that IStorage.AddLog writes to, so every client log write failed inside its try/catch. Version 2 adds the store, keyed by the Id AddLog assigns. DInputBase.NameAttribute renders no name instead of name="" when the form maps no field names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LsXgEaXee4GCU1hwYgPJXw
55 lines
1.8 KiB
Plaintext
55 lines
1.8 KiB
Plaintext
@typeparam TValue
|
|
@inherits DInputBase<TValue>
|
|
|
|
@* daisyUI Range: https://daisyui.com/components/range/ . TValue is numeric; Min and Max are always rendered, as daisyUI
|
|
requires. *@
|
|
<input @attributes="InputAttributes" type="range" class="@CssClassFull" name="@NameAttribute" min="@Format(Min)"
|
|
max="@Format(Max)" step="@(Step is null ? null : Format(Step.Value))" value="@CurrentValueAsString"
|
|
@oninput="OnInput" @onchange="OnChange" aria-invalid="@(IsInvalid ? "true" : null)" />
|
|
|
|
@code {
|
|
[Parameter] public double Min { get; set; }
|
|
[Parameter] public double Max { get; set; } = 100;
|
|
[Parameter] public double? Step { get; set; }
|
|
[Parameter] public DColor Color { get; set; }
|
|
[Parameter] public DSize Size { get; set; }
|
|
[Parameter] public DDirection Direction { get; set; }
|
|
/// <summary>Update the bound value while dragging instead of on release.</summary>
|
|
[Parameter] public bool Immediate { get; set; }
|
|
|
|
string CssClassFull => Cx("range", IsInvalid ? "range-error" : ColorClass, SizeClass,
|
|
Direction == DDirection.Vertical ? "range-vertical" : null, CssClass);
|
|
|
|
string ColorClass => Color switch
|
|
{
|
|
DColor.Neutral => "range-neutral",
|
|
DColor.Primary => "range-primary",
|
|
DColor.Secondary => "range-secondary",
|
|
DColor.Accent => "range-accent",
|
|
DColor.Info => "range-info",
|
|
DColor.Success => "range-success",
|
|
DColor.Warning => "range-warning",
|
|
DColor.Error => "range-error",
|
|
_ => null
|
|
};
|
|
|
|
string SizeClass => Size switch
|
|
{
|
|
DSize.Xs => "range-xs",
|
|
DSize.Sm => "range-sm",
|
|
DSize.Lg => "range-lg",
|
|
DSize.Xl => "range-xl",
|
|
_ => null
|
|
};
|
|
|
|
static string Format(double value) => value.ToString(System.Globalization.CultureInfo.InvariantCulture);
|
|
|
|
void OnInput(ChangeEventArgs e)
|
|
{
|
|
if (Immediate)
|
|
CurrentValueAsString = e.Value?.ToString();
|
|
}
|
|
|
|
void OnChange(ChangeEventArgs e) => CurrentValueAsString = e.Value?.ToString();
|
|
}
|