diff --git a/ChatTwo/Resources/HellionStrings.Designer.cs b/ChatTwo/Resources/HellionStrings.Designer.cs
index 3dac2eb..05d7d68 100644
--- a/ChatTwo/Resources/HellionStrings.Designer.cs
+++ b/ChatTwo/Resources/HellionStrings.Designer.cs
@@ -45,6 +45,7 @@ internal class HellionStrings
internal static string Privacy_FilterEnabled_Name => Get(nameof(Privacy_FilterEnabled_Name));
internal static string Privacy_FilterEnabled_Description => Get(nameof(Privacy_FilterEnabled_Description));
internal static string Privacy_FilterEnabled_StorageOnly_Help => Get(nameof(Privacy_FilterEnabled_StorageOnly_Help));
+ internal static string Privacy_Filter_Tree_Heading => Get(nameof(Privacy_Filter_Tree_Heading));
internal static string Privacy_Whitelist_Help => Get(nameof(Privacy_Whitelist_Help));
internal static string Privacy_Preset_PrivacyFirst => Get(nameof(Privacy_Preset_PrivacyFirst));
internal static string Privacy_Preset_ClearAll => Get(nameof(Privacy_Preset_ClearAll));
diff --git a/ChatTwo/Resources/HellionStrings.de.resx b/ChatTwo/Resources/HellionStrings.de.resx
index 48b161e..7228309 100644
--- a/ChatTwo/Resources/HellionStrings.de.resx
+++ b/ChatTwo/Resources/HellionStrings.de.resx
@@ -24,6 +24,9 @@
Der Filter steuert nur, was in die lokale Datenbank geschrieben wird. Im Chat-Log siehst du weiterhin jede Nachricht live, ausgeschlossene Kanäle werden nur nicht mehr gespeichert. Wenn du Kanäle auch aus der sichtbaren Anzeige entfernen willst, nutze die normalen Chat-Tab-Filter im Spiel.
+
+ Privacy-Filter und Whitelist
+
Wähle aus, welche Kanäle in die lokale Datenbank gespeichert werden. Standard nach Datensparsamkeit: nur deine eigenen Konversationen. Über die Buttons unten kannst du eine Voreinstellung anwenden.
diff --git a/ChatTwo/Resources/HellionStrings.resx b/ChatTwo/Resources/HellionStrings.resx
index 9cb8ce4..c70b61f 100644
--- a/ChatTwo/Resources/HellionStrings.resx
+++ b/ChatTwo/Resources/HellionStrings.resx
@@ -24,6 +24,9 @@
The filter only controls what is written to the local database. The chat log itself keeps showing every message live, disallowed channels just stop being saved. Use the channel hide options in your in-game chat tabs if you want to remove channels from the visible chat.
+
+ Privacy filter and whitelist
+
Pick which channels are stored in the local database. Privacy-First default: only your own conversations. Use the buttons below to apply a preset.
diff --git a/ChatTwo/Ui/SettingsTabs/Privacy.cs b/ChatTwo/Ui/SettingsTabs/Privacy.cs
index 46d3ca9..8ec92f2 100644
--- a/ChatTwo/Ui/SettingsTabs/Privacy.cs
+++ b/ChatTwo/Ui/SettingsTabs/Privacy.cs
@@ -74,101 +74,7 @@ internal sealed class Privacy : ISettingsTab
Plugin.FirstRunWizard.IsOpen = true;
ImGui.Spacing();
- ImGui.TextUnformatted(HellionStrings.Theme_Heading);
- using (ImRaii.PushIndent(ImGui.GetStyle().IndentSpacing, false))
- {
- ImGuiUtil.OptionCheckbox(
- ref Mutable.HellionThemeEnabled,
- HellionStrings.Theme_Enabled_Name,
- HellionStrings.Theme_Enabled_Description);
-
- using (ImRaii.Disabled(!Mutable.HellionThemeEnabled))
- {
- ImGui.Spacing();
- var opacity = Mutable.HellionThemeWindowOpacity;
- if (ImGui.SliderFloat($"{HellionStrings.Theme_WindowOpacity_Label}##theme-opacity", ref opacity, 0.5f, 1.0f, "%.2f"))
- Mutable.HellionThemeWindowOpacity = Math.Clamp(opacity, 0.5f, 1.0f);
- ImGuiUtil.HelpText(HellionStrings.Theme_WindowOpacity_Help);
- }
-
- ImGui.Spacing();
-
- ImGuiUtil.OptionCheckbox(
- ref Mutable.UseHellionFont,
- HellionStrings.Theme_UseHellionFont_Name,
- HellionStrings.Theme_UseHellionFont_Description);
- }
-
- ImGui.Spacing();
- ImGui.Separator();
- ImGui.Spacing();
-
- ImGuiUtil.OptionCheckbox(
- ref Mutable.PrivacyFilterEnabled,
- HellionStrings.Privacy_FilterEnabled_Name,
- HellionStrings.Privacy_FilterEnabled_Description);
-
- ImGuiUtil.HelpText(HellionStrings.Privacy_FilterEnabled_StorageOnly_Help);
-
- ImGui.Spacing();
- ImGui.Separator();
- ImGui.Spacing();
-
- using (ImRaii.Disabled(!Mutable.PrivacyFilterEnabled))
- {
- ImGuiUtil.HelpText(HellionStrings.Privacy_Whitelist_Help);
-
- ImGui.Spacing();
-
- if (ImGui.Button(HellionStrings.Privacy_Preset_PrivacyFirst))
- Mutable.PrivacyPersistChannels = [..PrivacyDefaults.PrivacyFirstWhitelist];
-
- ImGui.SameLine();
- if (ImGui.Button(HellionStrings.Privacy_Preset_ClearAll))
- Mutable.PrivacyPersistChannels.Clear();
-
- ImGui.SameLine();
- if (ImGui.Button(HellionStrings.Privacy_Preset_SelectAll))
- foreach (var group in Groups)
- foreach (var t in group.Types)
- Mutable.PrivacyPersistChannels.Add(t);
-
- ImGui.Spacing();
- ImGui.Separator();
- ImGui.Spacing();
-
- foreach (var (heading, types) in Groups)
- {
- using var tree = ImRaii.TreeNode(heading());
- if (!tree.Success)
- continue;
-
- using (ImRaii.PushIndent(ImGui.GetStyle().IndentSpacing, false))
- {
- foreach (var type in types)
- {
- var enabled = Mutable.PrivacyPersistChannels.Contains(type);
- var label = type.ToString();
- if (ImGui.Checkbox($"{label}##privacy-{(int)type}", ref enabled))
- {
- if (enabled)
- Mutable.PrivacyPersistChannels.Add(type);
- else
- Mutable.PrivacyPersistChannels.Remove(type);
- }
- }
- }
- }
-
- ImGui.Spacing();
- ImGui.Separator();
- ImGui.Spacing();
-
- ImGuiUtil.OptionCheckbox(
- ref Mutable.PrivacyPersistUnknownChannels,
- HellionStrings.Privacy_PersistUnknown_Name,
- HellionStrings.Privacy_PersistUnknown_Description);
- }
+ DrawPrivacyFilterSection();
ImGui.Spacing();
ImGui.Separator();
@@ -216,6 +122,82 @@ internal sealed class Privacy : ISettingsTab
}
}
+ private void DrawPrivacyFilterSection()
+ {
+ using var tree = ImRaii.TreeNode(HellionStrings.Privacy_Filter_Tree_Heading);
+ if (!tree.Success)
+ return;
+
+ using (ImRaii.PushIndent(ImGui.GetStyle().IndentSpacing, false))
+ {
+ ImGuiUtil.OptionCheckbox(
+ ref Mutable.PrivacyFilterEnabled,
+ HellionStrings.Privacy_FilterEnabled_Name,
+ HellionStrings.Privacy_FilterEnabled_Description);
+ ImGuiUtil.HelpMarker(HellionStrings.Privacy_FilterEnabled_StorageOnly_Help);
+
+ ImGui.Spacing();
+ ImGui.Separator();
+ ImGui.Spacing();
+
+ using (ImRaii.Disabled(!Mutable.PrivacyFilterEnabled))
+ {
+ ImGuiUtil.HelpText(HellionStrings.Privacy_Whitelist_Help);
+
+ ImGui.Spacing();
+
+ if (ImGui.Button(HellionStrings.Privacy_Preset_PrivacyFirst))
+ Mutable.PrivacyPersistChannels = [..PrivacyDefaults.PrivacyFirstWhitelist];
+
+ ImGui.SameLine();
+ if (ImGui.Button(HellionStrings.Privacy_Preset_ClearAll))
+ Mutable.PrivacyPersistChannels.Clear();
+
+ ImGui.SameLine();
+ if (ImGui.Button(HellionStrings.Privacy_Preset_SelectAll))
+ foreach (var group in Groups)
+ foreach (var t in group.Types)
+ Mutable.PrivacyPersistChannels.Add(t);
+
+ ImGui.Spacing();
+ ImGui.Separator();
+ ImGui.Spacing();
+
+ foreach (var (heading, types) in Groups)
+ {
+ using var groupTree = ImRaii.TreeNode(heading());
+ if (!groupTree.Success)
+ continue;
+
+ using (ImRaii.PushIndent(ImGui.GetStyle().IndentSpacing, false))
+ {
+ foreach (var type in types)
+ {
+ var enabled = Mutable.PrivacyPersistChannels.Contains(type);
+ var label = type.ToString();
+ if (ImGui.Checkbox($"{label}##privacy-{(int)type}", ref enabled))
+ {
+ if (enabled)
+ Mutable.PrivacyPersistChannels.Add(type);
+ else
+ Mutable.PrivacyPersistChannels.Remove(type);
+ }
+ }
+ }
+ }
+
+ ImGui.Spacing();
+ ImGui.Separator();
+ ImGui.Spacing();
+
+ ImGuiUtil.OptionCheckbox(
+ ref Mutable.PrivacyPersistUnknownChannels,
+ HellionStrings.Privacy_PersistUnknown_Name,
+ HellionStrings.Privacy_PersistUnknown_Description);
+ }
+ }
+ }
+
private void DrawExportSection()
{
ImGui.TextUnformatted(HellionStrings.Export_Heading);
@@ -363,7 +345,7 @@ internal sealed class Privacy : ISettingsTab
var defaultDays = Mutable.RetentionDefaultDays;
if (ImGui.InputInt(HellionStrings.Retention_Default_Label, ref defaultDays))
Mutable.RetentionDefaultDays = Math.Max(0, defaultDays);
- ImGuiUtil.HelpText(HellionStrings.Retention_Default_Help);
+ ImGuiUtil.HelpMarker(HellionStrings.Retention_Default_Help);
ImGui.Spacing();