feat(auto-tell-tabs): make greeted toggle button opt-in (default off, greeter-specific)
This commit is contained in:
@@ -95,6 +95,11 @@ public class Configuration : IPluginConfiguration
|
|||||||
// Number of prior tells to preload from the message store when an
|
// Number of prior tells to preload from the message store when an
|
||||||
// auto tell tab is spawned. Range 0–100; 0 disables preload.
|
// auto tell tab is spawned. Range 0–100; 0 disables preload.
|
||||||
public int AutoTellTabsHistoryPreload = 20;
|
public int AutoTellTabsHistoryPreload = 20;
|
||||||
|
// Show the greeter "marked-as-greeted" toggle button next to each
|
||||||
|
// temp tab and dim the tab name when set. Off by default because the
|
||||||
|
// workflow is specific to club-greeter use cases — most users just
|
||||||
|
// want the auto tabs themselves without the extra UI affordance.
|
||||||
|
public bool AutoTellTabsShowGreetedToggle;
|
||||||
|
|
||||||
public int GetRetentionDays(ChatType type)
|
public int GetRetentionDays(ChatType type)
|
||||||
{
|
{
|
||||||
@@ -284,6 +289,7 @@ public class Configuration : IPluginConfiguration
|
|||||||
AutoTellTabsLimit = other.AutoTellTabsLimit;
|
AutoTellTabsLimit = other.AutoTellTabsLimit;
|
||||||
AutoTellTabsCompactDisplay = other.AutoTellTabsCompactDisplay;
|
AutoTellTabsCompactDisplay = other.AutoTellTabsCompactDisplay;
|
||||||
AutoTellTabsHistoryPreload = other.AutoTellTabsHistoryPreload;
|
AutoTellTabsHistoryPreload = other.AutoTellTabsHistoryPreload;
|
||||||
|
AutoTellTabsShowGreetedToggle = other.AutoTellTabsShowGreetedToggle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -182,6 +182,8 @@ internal class HellionStrings
|
|||||||
internal static string ChatLog_AutoTellTabs_Limit_Description => Get(nameof(ChatLog_AutoTellTabs_Limit_Description));
|
internal static string ChatLog_AutoTellTabs_Limit_Description => Get(nameof(ChatLog_AutoTellTabs_Limit_Description));
|
||||||
internal static string ChatLog_AutoTellTabs_Compact_Name => Get(nameof(ChatLog_AutoTellTabs_Compact_Name));
|
internal static string ChatLog_AutoTellTabs_Compact_Name => Get(nameof(ChatLog_AutoTellTabs_Compact_Name));
|
||||||
internal static string ChatLog_AutoTellTabs_Compact_Description => Get(nameof(ChatLog_AutoTellTabs_Compact_Description));
|
internal static string ChatLog_AutoTellTabs_Compact_Description => Get(nameof(ChatLog_AutoTellTabs_Compact_Description));
|
||||||
|
internal static string ChatLog_AutoTellTabs_GreetedToggle_Name => Get(nameof(ChatLog_AutoTellTabs_GreetedToggle_Name));
|
||||||
|
internal static string ChatLog_AutoTellTabs_GreetedToggle_Description => Get(nameof(ChatLog_AutoTellTabs_GreetedToggle_Description));
|
||||||
internal static string ChatLog_AutoTellTabs_PreloadHint => Get(nameof(ChatLog_AutoTellTabs_PreloadHint));
|
internal static string ChatLog_AutoTellTabs_PreloadHint => Get(nameof(ChatLog_AutoTellTabs_PreloadHint));
|
||||||
internal static string ChatLog_AutoTellTabs_ConflictHint => Get(nameof(ChatLog_AutoTellTabs_ConflictHint));
|
internal static string ChatLog_AutoTellTabs_ConflictHint => Get(nameof(ChatLog_AutoTellTabs_ConflictHint));
|
||||||
|
|
||||||
|
|||||||
@@ -412,6 +412,12 @@
|
|||||||
<data name="ChatLog_AutoTellTabs_Compact_Description" xml:space="preserve">
|
<data name="ChatLog_AutoTellTabs_Compact_Description" xml:space="preserve">
|
||||||
<value>Zeigt nur einen dünnen Separator zwischen normalen Tabs und Auto-Tell-Tabs, ohne Sektions-Header.</value>
|
<value>Zeigt nur einen dünnen Separator zwischen normalen Tabs und Auto-Tell-Tabs, ohne Sektions-Header.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ChatLog_AutoTellTabs_GreetedToggle_Name" xml:space="preserve">
|
||||||
|
<value>„Als begrüßt markieren"-Button anzeigen</value>
|
||||||
|
</data>
|
||||||
|
<data name="ChatLog_AutoTellTabs_GreetedToggle_Description" xml:space="preserve">
|
||||||
|
<value>Fügt neben jedem Auto-Tell-Tab einen Klick-Button hinzu, um einen Gesprächspartner als bereits begrüßt zu markieren — der Tab-Name wird dann gedimmt. Nützlich für Club-Greeter, die parallel viele Konversationen führen. Standardmäßig aus.</value>
|
||||||
|
</data>
|
||||||
<data name="ChatLog_AutoTellTabs_PreloadHint" xml:space="preserve">
|
<data name="ChatLog_AutoTellTabs_PreloadHint" xml:space="preserve">
|
||||||
<value>Die Anzahl der vorgeladenen Tells lässt sich im Datenschutz-Tab einstellen.</value>
|
<value>Die Anzahl der vorgeladenen Tells lässt sich im Datenschutz-Tab einstellen.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -412,6 +412,12 @@
|
|||||||
<data name="ChatLog_AutoTellTabs_Compact_Description" xml:space="preserve">
|
<data name="ChatLog_AutoTellTabs_Compact_Description" xml:space="preserve">
|
||||||
<value>Show only a thin separator between persistent tabs and auto tell tabs, without the section header.</value>
|
<value>Show only a thin separator between persistent tabs and auto tell tabs, without the section header.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ChatLog_AutoTellTabs_GreetedToggle_Name" xml:space="preserve">
|
||||||
|
<value>Show "mark as greeted" button</value>
|
||||||
|
</data>
|
||||||
|
<data name="ChatLog_AutoTellTabs_GreetedToggle_Description" xml:space="preserve">
|
||||||
|
<value>Adds a click-to-toggle button next to each auto tell tab to mark a partner as already greeted, dimming the tab name when set. Useful for club greeters tracking many parallel conversations; off by default.</value>
|
||||||
|
</data>
|
||||||
<data name="ChatLog_AutoTellTabs_PreloadHint" xml:space="preserve">
|
<data name="ChatLog_AutoTellTabs_PreloadHint" xml:space="preserve">
|
||||||
<value>The number of preloaded tells is configured in the Privacy tab.</value>
|
<value>The number of preloaded tells is configured in the Privacy tab.</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1329,7 +1329,9 @@ public sealed class ChatLogWindow : Window
|
|||||||
var selectableLabel = $"{tab.Name}{unread}###log-tab-{tabI}";
|
var selectableLabel = $"{tab.Name}{unread}###log-tab-{tabI}";
|
||||||
var isCurrentTab = Plugin.LastTab == tabI || Plugin.WantedTab == tabI;
|
var isCurrentTab = Plugin.LastTab == tabI || Plugin.WantedTab == tabI;
|
||||||
|
|
||||||
if (tab.IsTempTab)
|
var showGreetedAffordance = tab.IsTempTab && Plugin.Config.AutoTellTabsShowGreetedToggle;
|
||||||
|
|
||||||
|
if (showGreetedAffordance)
|
||||||
{
|
{
|
||||||
// Greeted toggle sits left of the selectable so the
|
// Greeted toggle sits left of the selectable so the
|
||||||
// click areas stay separate. The icon also doubles
|
// click areas stay separate. The icon also doubles
|
||||||
@@ -1360,7 +1362,7 @@ public sealed class ChatLogWindow : Window
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool clicked;
|
bool clicked;
|
||||||
if (tab.IsTempTab && tab.IsGreeted)
|
if (showGreetedAffordance && tab.IsGreeted)
|
||||||
{
|
{
|
||||||
// Dim the tab name once the user marked the partner
|
// Dim the tab name once the user marked the partner
|
||||||
// as greeted, so a glance at the sidebar tells them
|
// as greeted, so a glance at the sidebar tells them
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ internal sealed class ChatLog : ISettingsTab
|
|||||||
ImGui.Checkbox(HellionStrings.ChatLog_AutoTellTabs_Compact_Name, ref Mutable.AutoTellTabsCompactDisplay);
|
ImGui.Checkbox(HellionStrings.ChatLog_AutoTellTabs_Compact_Name, ref Mutable.AutoTellTabsCompactDisplay);
|
||||||
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_Compact_Description);
|
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_Compact_Description);
|
||||||
|
|
||||||
|
ImGui.Checkbox(HellionStrings.ChatLog_AutoTellTabs_GreetedToggle_Name, ref Mutable.AutoTellTabsShowGreetedToggle);
|
||||||
|
ImGuiUtil.HelpMarker(HellionStrings.ChatLog_AutoTellTabs_GreetedToggle_Description);
|
||||||
|
|
||||||
ImGui.Spacing();
|
ImGui.Spacing();
|
||||||
ImGuiUtil.HelpText(HellionStrings.ChatLog_AutoTellTabs_PreloadHint);
|
ImGuiUtil.HelpText(HellionStrings.ChatLog_AutoTellTabs_PreloadHint);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user