Disable auto-save when preselection is disabled

This commit is contained in:
Thorsten Sommer 2024-12-27 21:14:42 +01:00
parent b6f4307d7d
commit 33620516cf
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 9 additions and 2 deletions

View File

@ -30,7 +30,14 @@
automatically saved. Would you like this?
</MudText>
<MudTextSwitch Label="Should we automatically save any input made?" @bind-Value="@this.autoSave" LabelOn="Yes, please save my inputs" LabelOff="No, I will enter everything again or configure it manually in the settings" />
@if(!this.SettingsManager.ConfigurationData.ERI.PreselectOptions)
{
<MudText Typo="Typo.body1" Class="mb-3">
Hint: to allow this assistant to automatically save your changes, you must enable the preselection of values in the settings.
</MudText>
}
<MudTextSwitch Label="Should we automatically save any input made?" Disabled="@(!this.SettingsManager.ConfigurationData.ERI.PreselectOptions)" @bind-Value="@this.autoSave" LabelOn="Yes, please save my inputs" LabelOff="No, I will enter everything again or configure it manually in the settings" />
<MudText Typo="Typo.h4" Class="mt-6 mb-1">
Common ERI server settings

View File

@ -108,7 +108,7 @@ public partial class AssistantERI : AssistantBaseCore
private async Task AutoSave()
{
if(!this.autoSave)
if(!this.autoSave || !this.SettingsManager.ConfigurationData.ERI.PreselectOptions)
return;
this.SettingsManager.ConfigurationData.ERI.PreselectedServerName = this.serverName;