fix several issues, add remote controls to new UI

This commit is contained in:
Maassoft committed 2025-05-30 17:20:37 +02:00
1 parent c6c7e1ccc0
commit 827157f30f
91 files changed
+4140 -2530

No files matched your search

+22
View File
@@ -2,6 +2,14 @@
namespace ColorControl.UI.Services;
public class RectDimension
{
public double X { get; set; }
public double Y { get; set; }
public double Width { get; set; }
public double Height { get; set; }
}
public class JSHelper(IJSRuntime jsRuntime)
{
private IJSObjectReference? jsModule;
@@ -26,6 +34,20 @@ public class JSHelper(IJSRuntime jsRuntime)
await InvokeVoidAsync("ShowToast", id);
}
public async Task<RectDimension> GetElementDimensions(string id)
{
jsModule = await LoadModule();
return await jsModule.InvokeAsync<RectDimension>("GetElementDimensions", id);
}
public async Task<string> GetElementClassName(string id)
{
jsModule = await LoadModule();
return await jsModule.InvokeAsync<string>("GetElementClassName", id);
}
private async ValueTask<T> InvokeAsync<T>(string identifier, params object?[]? names) where T : struct
{
jsModule = await LoadModule();