From 1beca653b772cf10586c417b2c25df03a67df8a2 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Mon, 17 Jul 2023 00:21:24 +0200 Subject: Handle external logouts --- MatrixRoomUtils.Web/Shared/ModalWindow.razor | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'MatrixRoomUtils.Web/Shared/ModalWindow.razor') diff --git a/MatrixRoomUtils.Web/Shared/ModalWindow.razor b/MatrixRoomUtils.Web/Shared/ModalWindow.razor index 216f1f3..b40d246 100644 --- a/MatrixRoomUtils.Web/Shared/ModalWindow.razor +++ b/MatrixRoomUtils.Web/Shared/ModalWindow.razor @@ -1,12 +1,12 @@
- @Title + @Title
-
- @ChildContent -
+
+ @ChildContent +
@code { @@ -23,18 +23,30 @@ [Parameter] public double Y { get; set; } = 60; + [Parameter] + public double MinWidth { get; set; } = 100; + [Parameter] public Action OnCloseClicked { get; set; } [Parameter] public bool Collapsed { get; set; } = false; + private ElementReference _titleRef; + private double _x = 60; private double _y = 60; - protected override void OnInitialized() { + protected override async Task OnInitializedAsync() { _x = X; _y = Y; + await base.OnInitializedAsync(); + } + + protected override async Task OnAfterRenderAsync(bool firstRender) { + //set minwidth to title width + MinWidth = await JSRuntime.InvokeAsync("getWidth", _titleRef) + 75; + await base.OnAfterRenderAsync(firstRender); } private void WindowDrag(DragEventArgs obj) { -- cgit 1.5.1