Added setting for spellchecking

This commit is contained in:
tsommer committed 2024-06-01 19:55:12 +02:00
1 parent 5bb98c74d1
commit f7d0cfa102
5 files changed
+14 -1

No files matched your search

+5
View File
@@ -31,4 +31,9 @@ public sealed class Data
/// Shortcuts to send the input to the AI.
/// </summary>
public SendBehavior ShortcutSendBehavior { get; set; } = SendBehavior.MODIFER_ENTER_IS_SENDING;
/// <summary>
/// Should we enable spellchecking for all input fields?
/// </summary>
public bool EnableSpellchecking { get; set; }
}
@@ -121,4 +121,6 @@ public sealed class SettingsManager
var settingsJson = JsonSerializer.Serialize(this.ConfigurationData);
await File.WriteAllTextAsync(settingsPath, settingsJson);
}
public void InjectSpellchecking(Dictionary<string, object?> attributes) => attributes["spellcheck"] = this.ConfigurationData.EnableSpellchecking ? "true" : "false";
}