mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-11 19:44:52 +00:00
fix: send all status messages with ClientId
This commit is contained in:
@@ -33,7 +33,7 @@ namespace PepperDash.Essentials.Touchpanel
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddAction($"/fullStatus", (id, context) => SendFullStatus());
|
AddAction($"/fullStatus", (id, context) => SendFullStatus(id));
|
||||||
|
|
||||||
AddAction($"/openApp", (id, context) => _appControl.OpenApp());
|
AddAction($"/openApp", (id, context) => _appControl.OpenApp());
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
using PepperDash.Core.Logging;
|
||||||
using PepperDash.Essentials.AppServer;
|
using PepperDash.Essentials.AppServer;
|
||||||
using PepperDash.Essentials.AppServer.Messengers;
|
using PepperDash.Essentials.AppServer.Messengers;
|
||||||
|
|
||||||
@@ -29,17 +30,17 @@ namespace PepperDash.Essentials.Touchpanel
|
|||||||
{
|
{
|
||||||
AddAction("/fullStatus", (id, content) =>
|
AddAction("/fullStatus", (id, content) =>
|
||||||
{
|
{
|
||||||
PostStatusMessage(new ThemeUpdateMessage { Theme = _tpDevice.Theme });
|
PostStatusMessage(new ThemeUpdateMessage { Theme = _tpDevice.Theme }, id);
|
||||||
});
|
});
|
||||||
|
|
||||||
AddAction("/saveTheme", (id, content) =>
|
AddAction("/saveTheme", (id, content) =>
|
||||||
{
|
{
|
||||||
var theme = content.ToObject<MobileControlSimpleContent<string>>();
|
var theme = content.ToObject<MobileControlSimpleContent<string>>();
|
||||||
|
|
||||||
Debug.LogMessage(Serilog.Events.LogEventLevel.Information, "Setting theme to {theme}", this, theme.Value);
|
this.LogInformation("Setting theme to {theme}", this, theme.Value);
|
||||||
_tpDevice.UpdateTheme(theme.Value);
|
_tpDevice.UpdateTheme(theme.Value);
|
||||||
|
|
||||||
PostStatusMessage(JToken.FromObject(new { theme = theme.Value }));
|
PostStatusMessage(JToken.FromObject(new { theme = theme.Value }), id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user