From 76a6ea57a168d528e87a08a92e37261be0ebe430 Mon Sep 17 00:00:00 2001 From: Adrian Rudnik Date: Fri, 6 Mar 2020 03:02:30 +0100 Subject: [PATCH] fixed sweet alerts blocking major ui elements (#1517) --- assets/js/plugins/KimaiAlert.js | 2 +- assets/sass/sweetalert.scss | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/assets/js/plugins/KimaiAlert.js b/assets/js/plugins/KimaiAlert.js index 4e8e14b7..ad703cd1 100644 --- a/assets/js/plugins/KimaiAlert.js +++ b/assets/js/plugins/KimaiAlert.js @@ -44,7 +44,7 @@ export default class KimaiAlert extends KimaiPlugin { timer: 2000, timerProgressBar: true, toast: true, - position: 'top-end', + position: 'top', showConfirmButton: false, icon: 'success', title: message, diff --git a/assets/sass/sweetalert.scss b/assets/sass/sweetalert.scss index 56a71b4f..c04c3836 100644 --- a/assets/sass/sweetalert.scss +++ b/assets/sass/sweetalert.scss @@ -1,3 +1,15 @@ .swal2-popup { font-size: unset; -} \ No newline at end of file +} + +.swal2-container { + // never block the top two bars double-bars display (smaller displays) + @media only screen and (max-width: 768px) { + top: 110px !important; + } + + // never block the top bar on single-bar display (larger devices) + @media only screen and (min-width: 768px) { + top: 60px !important; + } +}