diff --git a/ShockOsc/Backend/BackendHubManager.cs b/ShockOsc/Backend/BackendHubManager.cs index d69dce6..ecc77ba 100644 --- a/ShockOsc/Backend/BackendHubManager.cs +++ b/ShockOsc/Backend/BackendHubManager.cs @@ -141,7 +141,7 @@ private async Task RemoteActivateShocker(ControlLogSender sender, ControlLog log log.Type, log.Shocker.Name, log.Intensity, inSeconds, sender.CustomName, sender.Name); var template = _configManager.Config.Chatbox.Types[log.Type]; - if (_configManager.Config.Osc.Chatbox && + if (_configManager.Config.Chatbox.Enabled && _configManager.Config.Chatbox.DisplayRemoteControl && template.Enabled) { // Chatbox message remote diff --git a/ShockOsc/Config/ChatboxConf.cs b/ShockOsc/Config/ChatboxConf.cs index adb21cd..37895c4 100644 --- a/ShockOsc/Config/ChatboxConf.cs +++ b/ShockOsc/Config/ChatboxConf.cs @@ -4,6 +4,7 @@ namespace OpenShock.ShockOsc.Config; public sealed class ChatboxConf { + public bool Enabled { get; set; } = true; public string Prefix { get; set; } = "[ShockOsc] "; public bool DisplayRemoteControl { get; set; } = true; diff --git a/ShockOsc/Config/OscConf.cs b/ShockOsc/Config/OscConf.cs index 895ff80..dfec3ae 100644 --- a/ShockOsc/Config/OscConf.cs +++ b/ShockOsc/Config/OscConf.cs @@ -2,7 +2,6 @@ public sealed class OscConf { - public bool Chatbox { get; set; } = true; public bool Hoscy { get; set; } = false; public ushort HoscySendPort { get; set; } = 9001; public bool QuestSupport { get; set; } = false; diff --git a/ShockOsc/Services/OscClient.cs b/ShockOsc/Services/OscClient.cs index 9cc5138..b3bc666 100644 --- a/ShockOsc/Services/OscClient.cs +++ b/ShockOsc/Services/OscClient.cs @@ -49,6 +49,7 @@ public ValueTask SendGameMessage(string address, params object?[]?arguments) public ValueTask SendChatboxMessage(string message) { + if(!_configManager.Config.Chatbox.Enabled) return ValueTask.CompletedTask; if (_configManager.Config.Osc.Hoscy) return _hoscySenderChannel.Writer.WriteAsync(new OscMessage("/hoscy/message", message)); return _gameSenderChannel.Writer.WriteAsync(new OscMessage("/chatbox/input", message, true)); diff --git a/ShockOsc/Services/ShockOsc.cs b/ShockOsc/Services/ShockOsc.cs index 59a13eb..ed79b0e 100644 --- a/ShockOsc/Services/ShockOsc.cs +++ b/ShockOsc/Services/ShockOsc.cs @@ -414,7 +414,7 @@ private async Task InstantShock(ProgramGroup programGroup, uint duration, byte i await _backendHubManager.ControlGroup(programGroup.Id, duration, intensity, ControlType.Shock, exclusive); - if (!_configManager.Config.Osc.Chatbox) return; + if (!_configManager.Config.Chatbox.Enabled) return; // Chatbox message local var dat = new { diff --git a/ShockOsc/Ui/Pages/Dash/Tabs/ChatboxTab.razor b/ShockOsc/Ui/Pages/Dash/Tabs/ChatboxTab.razor index 743a841..a7321cc 100644 --- a/ShockOsc/Ui/Pages/Dash/Tabs/ChatboxTab.razor +++ b/ShockOsc/Ui/Pages/Dash/Tabs/ChatboxTab.razor @@ -7,7 +7,7 @@ Chatbox Options - +

diff --git a/ShockOsc/Ui/Pages/Dash/Tabs/DashboardTab.razor b/ShockOsc/Ui/Pages/Dash/Tabs/DashboardTab.razor index 35ac764..ff67ea5 100644 --- a/ShockOsc/Ui/Pages/Dash/Tabs/DashboardTab.razor +++ b/ShockOsc/Ui/Pages/Dash/Tabs/DashboardTab.razor @@ -57,14 +57,8 @@
- @* *@ - @* Discord *@ - @* *@ - @* *@ - @* *@ - - + @@ -74,16 +68,6 @@ - - Placeholder - Duo no lorem aliquyam dolor voluptua minim dolor diam sed dolores accusam est dolore voluptua takimata vel ullamcorper erat takimata erat at consectetuer amet magna - - - - Placeholder - Duo no lorem aliquyam dolor voluptua minim dolor diam sed dolores accusam est dolore voluptua takimata vel ullamcorper erat takimata erat at consectetuer amet magna - - Placeholder Duo no lorem aliquyam dolor voluptua minim dolor diam sed dolores accusam est dolore voluptua takimata vel ullamcorper erat takimata erat at consectetuer amet magna @@ -118,7 +102,7 @@ } .dashboard-box .discord { - grid-area: 1 / 3 / 3 / 3; + grid-area: 2 / 2 / 4 / 4; } .dashboard-box .item:hover { diff --git a/ShockOsc/Ui/Pages/Dash/Tabs/LogsTab.razor b/ShockOsc/Ui/Pages/Dash/Tabs/LogsTab.razor index e7b1c71..56457bf 100644 --- a/ShockOsc/Ui/Pages/Dash/Tabs/LogsTab.razor +++ b/ShockOsc/Ui/Pages/Dash/Tabs/LogsTab.razor @@ -9,11 +9,13 @@ Time + Level Source Message @context.Time.ToString("HH:mm:ss") + @context.Level.ToString() @context.SourceContextShort @context.Message.TruncateAtChar(120)