Renamed spellchecking attributes

This commit is contained in:
Thorsten Sommer 2024-07-16 10:13:26 +02:00
parent 43b55e4ad0
commit 8af8426f5d
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5
2 changed files with 4 additions and 3 deletions

View File

@ -40,6 +40,7 @@
AdornmentIcon="@Icons.Material.Filled.Dns" AdornmentIcon="@Icons.Material.Filled.Dns"
AdornmentColor="Color.Info" AdornmentColor="Color.Info"
Validation="@this.ValidatingHostname" Validation="@this.ValidatingHostname"
UserAttributes="@SPELLCHECK_ATTRIBUTES"
/> />
<MudSelect Disabled="@this.IsCloudProvider" @bind-Value="@this.DataHost" Label="Host" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.ValidatingHost"> <MudSelect Disabled="@this.IsCloudProvider" @bind-Value="@this.DataHost" Label="Host" Class="mb-3" OpenIcon="@Icons.Material.Filled.ExpandMore" AdornmentColor="Color.Info" Adornment="Adornment.Start" Validation="@this.ValidatingHost">
@ -69,7 +70,7 @@
AdornmentIcon="@Icons.Material.Filled.Lightbulb" AdornmentIcon="@Icons.Material.Filled.Lightbulb"
AdornmentColor="Color.Info" AdornmentColor="Color.Info"
Validation="@this.ValidatingInstanceName" Validation="@this.ValidatingInstanceName"
UserAttributes="@INSTANCE_NAME_ATTRIBUTES" UserAttributes="@SPELLCHECK_ATTRIBUTES"
/> />
</MudForm> </MudForm>

View File

@ -76,7 +76,7 @@ public partial class ProviderDialog : ComponentBase
[Inject] [Inject]
private IJSRuntime JsRuntime { get; set; } = null!; private IJSRuntime JsRuntime { get; set; } = null!;
private static readonly Dictionary<string, object?> INSTANCE_NAME_ATTRIBUTES = new(); private static readonly Dictionary<string, object?> SPELLCHECK_ATTRIBUTES = new();
/// <summary> /// <summary>
/// The list of used instance names. We need this to check for uniqueness. /// The list of used instance names. We need this to check for uniqueness.
@ -111,7 +111,7 @@ public partial class ProviderDialog : ComponentBase
protected override async Task OnInitializedAsync() protected override async Task OnInitializedAsync()
{ {
// Configure the spellchecking for the instance name input: // Configure the spellchecking for the instance name input:
this.SettingsManager.InjectSpellchecking(INSTANCE_NAME_ATTRIBUTES); this.SettingsManager.InjectSpellchecking(SPELLCHECK_ATTRIBUTES);
// Load the used instance names: // Load the used instance names:
this.UsedInstanceNames = this.SettingsManager.ConfigurationData.Providers.Select(x => x.InstanceName.ToLowerInvariant()).ToList(); this.UsedInstanceNames = this.SettingsManager.ConfigurationData.Providers.Select(x => x.InstanceName.ToLowerInvariant()).ToList();