From 3521dd41cd9544c2d71eea0ff91421ba6c52289d Mon Sep 17 00:00:00 2001 From: Leigh Date: Wed, 14 Jul 2021 10:18:39 +0200 Subject: [PATCH 1/2] ConltolPanel to use Bootstrap Offcanvas component --- .../Themes/Controls/Theme/ControlPanel.razor | 35 ++++++------------- 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor index 2589647f..ec71feb5 100644 --- a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor +++ b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor @@ -14,12 +14,12 @@ @if (_moduleDefinitions != null && UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.Permissions)) { -
+
@Localizer["ControlPanel"]
- +
@@ -41,8 +41,8 @@
- - + +
@@ -86,7 +86,7 @@
- +
@@ -160,7 +160,7 @@ {
- + @foreach (var container in _containers) { @@ -217,7 +217,8 @@ @if (UserSecurity.IsAuthorized(PageState.User, PermissionNames.Edit, PageState.Page.Permissions)) { - } @@ -445,23 +446,9 @@ } } - private void ShowControlPanel() - { - Message = ""; - _display = "width: 25%; min-width: 375px;"; - StateHasChanged(); - } - - private void HideControlPanel() - { - Message = ""; - _display = "width: 0%;"; - StateHasChanged(); - } - private void Navigate(string location) { - HideControlPanel(); + //HideControlPanel(); Module module; switch (location) { From 437e9ee43b73cef4495905fe12b0bc49707222d7 Mon Sep 17 00:00:00 2001 From: Leigh Date: Thu, 15 Jul 2021 16:28:12 +0200 Subject: [PATCH 2/2] Modifcations for ControlPanel BS5 current styles in app.css and theme.css for app-controlpanel removed as no longer needed. Removed the _display var as that is no longer beign used. --- .../Themes/Controls/Theme/ControlPanel.razor | 1 - .../Themes/Oqtane.Themes.BlazorTheme/Theme.css | 4 ---- Oqtane.Server/wwwroot/css/app.css | 18 ------------------ 3 files changed, 23 deletions(-) diff --git a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor index ec71feb5..b04330a5 100644 --- a/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor +++ b/Oqtane.Client/Themes/Controls/Theme/ControlPanel.razor @@ -232,7 +232,6 @@ private List _pages = new List(); private List _modules = new List(); private List _containers = new List(); - private string _display = "display: none;"; private string _category = "Common"; protected string PageId { get; private set; } = "-"; diff --git a/Oqtane.Server/wwwroot/Themes/Oqtane.Themes.BlazorTheme/Theme.css b/Oqtane.Server/wwwroot/Themes/Oqtane.Themes.BlazorTheme/Theme.css index a9b0be4d..a73e6b33 100644 --- a/Oqtane.Server/wwwroot/Themes/Oqtane.Themes.BlazorTheme/Theme.css +++ b/Oqtane.Server/wwwroot/Themes/Oqtane.Themes.BlazorTheme/Theme.css @@ -73,10 +73,6 @@ margin-bottom: 0; } -.app-controlpanel { - z-index: 9999; -} - .app-menu .nav-item { font-size: 0.9rem; padding-bottom: 0.5rem; diff --git a/Oqtane.Server/wwwroot/css/app.css b/Oqtane.Server/wwwroot/css/app.css index c41398ec..a3559989 100644 --- a/Oqtane.Server/wwwroot/css/app.css +++ b/Oqtane.Server/wwwroot/css/app.css @@ -10,24 +10,6 @@ app { flex-direction: column; } -/* Control Panel */ -.app-controlpanel { - height: 100%; - width: 0%; - position: fixed; /* Stay in place */ - z-index: 9999; /* Sit on top */ - right: 0; - top: 0; - overflow-x: hidden; /* Disable horizontal scroll */ - transition: 0.5s; /* 0.5 second transition effect to slide in or slide down the overlay (height or width, depending on reveal) */ -} - - /* Position the content inside the overlay */ - .app-controlpanel .card-body { - position: relative; - width: 100%; /* 100% width */ - } - /* Admin Modal */ .app-admin-modal .modal { position: fixed; /* Stay in place */