From aa0b68f7648bd5a7c14b64737a4f8d3e402bfce5 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 4 Oct 2023 15:59:52 +1100 Subject: Fix SID equality and WellKnownSid mappings --- Pages/Component/Dialog.razor | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Pages/Component/Dialog.razor') 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 @@ @code { @@ -109,7 +130,7 @@ return string.Join(", ", perms .OrderByDescending(kv => BitOperations.PopCount(kv.Value)) - .ThenByDescending(kv => kv.Value) + .ThenBy(kv => kv.Value) .Select(kv => kv.Key)); } } \ No newline at end of file diff --git a/Pages/Component/AclDialog.razor.css b/Pages/Component/AclDialog.razor.css index b98cc6d..74e405f 100644 --- a/Pages/Component/AclDialog.razor.css +++ b/Pages/Component/AclDialog.razor.css @@ -1,27 +1,57 @@ -div.container { +div.vcontainer{ + display: flex; + flex-direction: column; + height: 100%; +} + +div.hcontainer { display: flex; flex-direction: row; + flex-grow: 1; } -div.container > div { - width: 50%; +div.hcontainer > div { + width: 50%; + flex-direction: column; + display: flex; } -div.container > div:first-child { +div.hcontainer > div:first-child { border-right: 1px solid white; padding-right: 15px; } -div.container > div:last-child { +div.hcontainer > div:last-child { padding-left: 15px; - height: stretch; } -div.container > div:last-child p { - vertical-align: middle; +div.hcontainer > div > p { + margin: auto 0 auto 0; text-align: center; } +div.principal-select { + align-items: center; + display: flex; + flex-direction: row; +} + +div.principal-select * { + margin: 0; +} + +div.principal-select :not(:last-child) { + margin-right: 5px; +} + +div.principal-select input[type="text"] { + flex-grow: 1; +} + +div.hcontainer > div:last-child > label { + font-family: 'Lucida Console'; +} + table p { margin: 8px 0 8px 0; } @@ -31,10 +61,10 @@ table tr { } table td { - font-family: 'Lucida Console'; - font-size: 8pt; - text-overflow: ellipsis; white-space: nowrap; + text-overflow: ellipsis; + font-size: 8pt; + font-family: 'Lucida Console'; } table td:last-child { @@ -50,11 +80,11 @@ table tr:nth-child(2n+1) td:not(:first-child) { } table td:nth-child(2n) { - white-space: nowrap; width: 1px; + white-space: nowrap; } table td > div { - margin: auto; width: min-content; + margin: auto; } \ No newline at end of file diff --git a/Pages/Component/Dialog.razor b/Pages/Component/Dialog.razor index 8e8ddca..ac05515 100644 --- a/Pages/Component/Dialog.razor +++ b/Pages/Component/Dialog.razor @@ -30,6 +30,14 @@ public int HeightPixels { set => height = $"{value}px"; } [Parameter] public int HeightPercent { set => height = $"{value}%"; } + [Parameter] + public int MinHeightPixels { set => minHeight = $"{value}px"; } + [Parameter] + public int MinHeightPercent { set => minHeight = $"{value}%"; } + [Parameter] + public int MaxHeightPixels { set => maxHeight = $"{value}px"; } + [Parameter] + public int MaxHeightPercent { set => maxHeight = $"{value}%"; } public bool Visible { get => visible; @@ -45,6 +53,8 @@ private string? width; private string? height; + private string? minHeight; + private string? maxHeight; private ElementReference dialogDiv; @@ -68,11 +78,19 @@ } } - private string sizeStyle => widthStyle + heightStyle; + private string sizeStyle => string.Join("", new[] { + widthStyle, heightStyle, minHeightStyle, maxHeightStyle + }); private string widthStyle => $"{(width is null ? "" : $"width:{width};")}"; private string heightStyle => - $"{(height is null ? "" : $"max-height:{height};")}"; + $"{(height is null ? "" : $"height:{height};")}"; + + private string minHeightStyle => + $"{(minHeight is null ? "" : $"min-height:{minHeight};")}"; + + private string maxHeightStyle => + $"{(maxHeight is null ? "" : $"max-height:{maxHeight};")}"; } diff --git a/Pages/Component/Dialog.razor.css b/Pages/Component/Dialog.razor.css index 1447407..5e983a2 100644 --- a/Pages/Component/Dialog.razor.css +++ b/Pages/Component/Dialog.razor.css @@ -31,5 +31,6 @@ div.titlebar p.title { div.content { display: flex; flex-direction: column; + flex-grow: 1; padding: 20px; } diff --git a/wwwroot/styles/global.css b/wwwroot/styles/global.css index ec77442..5e46d37 100644 --- a/wwwroot/styles/global.css +++ b/wwwroot/styles/global.css @@ -89,6 +89,11 @@ button, input[type=submit] { user-select: none; } +input[type="checkbox"] { + accent-color: var(--col-accent-pri); + background: #222; +} + button:disabled { color: var(--col-button-disabled) !important; background: var(--col-button-disabled-bg) !important; @@ -143,7 +148,7 @@ input, textarea { margin-bottom: 10px; } -input { +input:not(input[type="checkbox"]) { height: 25px !important; } -- cgit v1.3