From 494511b9ef7694610cbe7966ee038a7d43d94372 Mon Sep 17 00:00:00 2001 From: jasonleyser Date: Tue, 11 May 2021 23:48:35 -0600 Subject: [PATCH] Sidebar css updates and added modals Fixed css bug with the modal and sidebar, and replaced more window confirms --- components/core/ApplicationLayout.js | 30 ++++++++++++------- components/core/ConfirmationModal.js | 4 +-- .../sidebars/SidebarSingleSlateSettings.js | 3 +- scenes/SceneSettingsDeveloper.js | 4 +-- 4 files changed, 24 insertions(+), 17 deletions(-) diff --git a/components/core/ApplicationLayout.js b/components/core/ApplicationLayout.js index bc6b69fc..ca5746f5 100644 --- a/components/core/ApplicationLayout.js +++ b/components/core/ApplicationLayout.js @@ -51,13 +51,11 @@ const STYLES_CONTENT = css` } `; -const STYLES_SIDEBAR = css` - z-index: ${Constants.zindex.sidebar}; +const STYLES_SIDEBAR_ELEMENTS = css` height: 100vh; width: ${Constants.sizes.sidebar}px; padding: 0; flex-shrink: 0; - position: fixed; background-color: rgba(195, 195, 196, 1); top: 0; right: 0; @@ -66,12 +64,20 @@ const STYLES_SIDEBAR = css` @media (max-width: ${Constants.sizes.mobile}px) { width: 100%; } - + /* @supports ((-webkit-backdrop-filter: blur(25px)) or (backdrop-filter: blur(25px))) { -webkit-backdrop-filter: blur(25px); backdrop-filter: blur(25px); background-color: rgba(195, 195, 196, 0.6); } + */ +`; + +const STYLES_SIDEBAR = css` + position: fixed; + top: 0; right: 0; + margin: auto; + z-index: ${Constants.zindex.sidebar}; `; const STYLES_SIDEBAR_HEADER = css` @@ -202,13 +208,15 @@ export default class ApplicationLayout extends React.Component { enabled onOutsideRectEvent={this._handleDismiss} > -
{ - this._sidebar = c; - }} - > - {sidebarElements} +
+
{ + this._sidebar = c; + }} + > + {sidebarElements} +
) : null} diff --git a/components/core/ConfirmationModal.js b/components/core/ConfirmationModal.js index dc40f033..b0ffc41e 100644 --- a/components/core/ConfirmationModal.js +++ b/components/core/ConfirmationModal.js @@ -10,12 +10,12 @@ import { Boundary } from "~/components/system/components/fragments/Boundary.js"; const STYLES_TRANSPARENT_BG = css ` background-color: ${Constants.system.bgBlurGrayBlack}; - width: 100%; + z-index: ${Constants.zindex.modal}; + width: 100vw; height: 100vh; position: fixed; left: 0; top: 0; - z-index: 999999; `; const STYLES_MAIN_MODAL = css ` diff --git a/components/sidebars/SidebarSingleSlateSettings.js b/components/sidebars/SidebarSingleSlateSettings.js index 9d1c2764..91dc98e9 100644 --- a/components/sidebars/SidebarSingleSlateSettings.js +++ b/components/sidebars/SidebarSingleSlateSettings.js @@ -309,13 +309,12 @@ export default class SidebarSingleSlateSettings extends React.Component {
- {this.state.modalShow && ( )} diff --git a/scenes/SceneSettingsDeveloper.js b/scenes/SceneSettingsDeveloper.js index 68dc74d8..eb7e6768 100644 --- a/scenes/SceneSettingsDeveloper.js +++ b/scenes/SceneSettingsDeveloper.js @@ -140,13 +140,13 @@ export default class SceneSettingsDeveloper extends React.Component { }; _handleDelete = async (id) => { - this.setState({ loading: true }); + this.setState({ loading: true, modalShow: false }); const response = await Actions.deleteAPIKey({ id }); Events.hasError(response); - this.setState({ loading: false, modalShow: false }); + this.setState({ loading: false }); }; _handleChangeLanguage = (newLanguage) => {