diff options
| author | Jake Mannens <jake@asger.xyz> | 2023-10-04 15:59:52 +1100 |
|---|---|---|
| committer | Jake Mannens <jake@asger.xyz> | 2023-10-04 15:59:52 +1100 |
| commit | aa0b68f7648bd5a7c14b64737a4f8d3e402bfce5 (patch) | |
| tree | f058842f77cfbd6e2a21abd3e4f8ad4f8ad1ed9a /Pages/Component/Dialog.razor | |
| parent | 33438ac951430fa370965b42a3d98a54e704ab01 (diff) | |
Fix SID equality and WellKnownSid mappings
Diffstat (limited to 'Pages/Component/Dialog.razor')
| -rw-r--r-- | Pages/Component/Dialog.razor | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Pages/Component/Dialog.razor b/Pages/Component/Dialog.razor index 673ec2f..8e8ddca 100644 --- a/Pages/Component/Dialog.razor +++ b/Pages/Component/Dialog.razor @@ -4,7 +4,7 @@ <div class="dialog" onmousedown="dialogMouseDown(event)" - style="opacity:0;visibility:hidden;@(heightStyle)" + style="opacity:0;visibility:hidden;@(sizeStyle)" @ref=dialogDiv> @if(Title is not null) { <div class="titlebar" onmousedown="dialogTitleMouseDown(event)"> @@ -25,6 +25,8 @@ public RenderFragment ChildContent { get; set; } [Parameter] + public int WidthPixels { set => width = $"{value}px"; } + [Parameter] public int HeightPixels { set => height = $"{value}px"; } [Parameter] public int HeightPercent { set => height = $"{value}%"; } @@ -41,6 +43,7 @@ private bool visible = false; + private string? width; private string? height; private ElementReference dialogDiv; @@ -53,7 +56,7 @@ await jsRuntime.InvokeVoidAsync("dialogAddObjectReference", new object[] { dialogDiv, DotNetObjectReference.Create(this) - }); + }); } } @@ -65,6 +68,11 @@ } } + private string sizeStyle => widthStyle + heightStyle; + + private string widthStyle => + $"{(width is null ? "" : $"width:{width};")}"; + private string heightStyle => - $"{(height is null ? "" : $"max-height:{height};")}"; + $"{(height is null ? "" : $"max-height:{height};")}"; } |
