diff --git a/src/SharpIDE.Photino/Components/DisplayNoneComponent.razor b/src/SharpIDE.Photino/Components/DisplayNoneComponent.razor new file mode 100644 index 0000000..c473d0d --- /dev/null +++ b/src/SharpIDE.Photino/Components/DisplayNoneComponent.razor @@ -0,0 +1,13 @@ +
+ @ChildContent +
+ +@code { + [Parameter, EditorRequired] + public RenderFragment ChildContent { get; set; } = null!; + + [Parameter, EditorRequired] + public bool Visible { get; set; } + + private string GetStyle => Visible ? "display: inherit" : "display: none"; +} diff --git a/src/SharpIDE.Photino/Layout/MainLayout.razor b/src/SharpIDE.Photino/Layout/MainLayout.razor index 93e5142..0203ba3 100644 --- a/src/SharpIDE.Photino/Layout/MainLayout.razor +++ b/src/SharpIDE.Photino/Layout/MainLayout.razor @@ -18,10 +18,10 @@ - Build - Rebuild - Clean - Restore + Build + Rebuild + Clean + Restore @@ -73,12 +73,12 @@
@if (_solutionFilePath is not null && _selectedBottomPanel is not null) { - @(_selectedBottomPanel switch - { - BottomPanelType.Run => @, - BottomPanelType.Build => @, - _ => throw new InvalidOperationException("Unknown bottom panel type") - }) + + + + + + }
@@ -161,6 +161,7 @@ _cancellationTokenSource = null; } private async Task CancelBuild() => await _cancellationTokenSource!.CancelAsync(); + private bool IsRunningMsBuildJob() => _cancellationTokenSource is not null; private async Task OpenSettingsDialog() {