From 853e2a03aa7cafdb7a0e9ab7691cc7f14439c341 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Fri, 2 Feb 2018 21:43:35 +0200 Subject: [PATCH] Move backdrop to modal and add a warning when attempting to close with unsaved changes --- client/src/styles/partials/animations.scss | 18 ++++++++++ .../src/styles/partials/generic/modals.scss | 5 +++ .../ui/components/bd/PluginSettingsModal.vue | 36 +++++++++++-------- client/src/ui/components/bd/PluginsView.vue | 1 - 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/client/src/styles/partials/animations.scss b/client/src/styles/partials/animations.scss index 0052738d..080a09ee 100644 --- a/client/src/styles/partials/animations.scss +++ b/client/src/styles/partials/animations.scss @@ -68,3 +68,21 @@ opacity: 1; } } + +@keyframes bd-warn-shake { + 10%, 90% { + transform: translate3d(-4px, -4px, 0); + } + + 20%, 80% { + transform: translate3d(4px, 4px, 0); + } + + 30%, 50%, 70% { + transform: translate3d(-4px, 4px, 0); + } + + 40%, 60% { + transform: translate3d(4px, -4px, 0); + } +} \ No newline at end of file diff --git a/client/src/styles/partials/generic/modals.scss b/client/src/styles/partials/generic/modals.scss index ba95ec3c..b30bc889 100644 --- a/client/src/styles/partials/generic/modals.scss +++ b/client/src/styles/partials/generic/modals.scss @@ -100,6 +100,11 @@ opacity: 0; transition: all .2s ease-in-out; + &.bd-warn { + background-color: $colerr; + animation: bd-warn-shake 0.4s; + } + &.bd-active { opacity: 1; transform: none; diff --git a/client/src/ui/components/bd/PluginSettingsModal.vue b/client/src/ui/components/bd/PluginSettingsModal.vue index 57af5126..ac997ba0 100644 --- a/client/src/ui/components/bd/PluginSettingsModal.vue +++ b/client/src/ui/components/bd/PluginSettingsModal.vue @@ -9,16 +9,19 @@ */