diff --git a/lib/classes/MessageBox.php b/lib/classes/MessageBox.php index b2854d89b51a92822c0351001d6637c50ee921f7..54a4a85e6e495ebf9135666caf15ad2af1c03a70 100644 --- a/lib/classes/MessageBox.php +++ b/lib/classes/MessageBox.php @@ -40,7 +40,6 @@ class MessageBox implements LayoutMessage, JsonSerializable public $message; public $details; public $close_details; - protected $hide_close = false; public static $counter = 0; /** @@ -137,7 +136,6 @@ class MessageBox implements LayoutMessage, JsonSerializable */ public function hideClose($state = true) { - $this->hide_close = (bool) $state; return $this; } @@ -147,7 +145,7 @@ class MessageBox implements LayoutMessage, JsonSerializable */ public function isCloseable(): bool { - return $this->hide_close; + return false; } /** @@ -169,7 +167,6 @@ class MessageBox implements LayoutMessage, JsonSerializable 'message' => $this->message, 'details' => is_array($this->details) ? $this->details : [], 'close_details' => $this->close_details, - 'hide_close' => $this->hide_close, 'label' => $label[$this->class], 'counter' => self::$counter++, ]); diff --git a/resources/assets/stylesheets/mixins/colors.scss b/resources/assets/stylesheets/mixins/colors.scss index c3faffae1bb21a95ba2e352642cd83d0c3489c0b..d0f54bb3223d97d23ce5f7424075fe7669d9d030 100644 --- a/resources/assets/stylesheets/mixins/colors.scss +++ b/resources/assets/stylesheets/mixins/colors.scss @@ -215,7 +215,9 @@ $calendar-category-255-aux: $light-gray-color-20; 6.x C O L O R S * * * * * * * * * * */ +$color--black: #000; $color--blue-1: #28497c; +$color--blue-2: #36598f; $color--gray-1: #101010; $color--gray-2: #3c454e; $color--gray-3: #676767; @@ -299,5 +301,10 @@ $color--shadow: $color--gray-4; $color--focus: $color--gray-4; $color--warning: $color--red-1; +$color--warning-alternative: mix($color--warning, $color--white, 20%); $color--attention: $color--yellow-1; +$color--attention-alternative: mix($color--attention, $color--white, 20%); $color--good: $color--green-1; +$color--good-alternative: mix($color--good, $color--white, 20%); +$color--info: $color--blue-2; +$color--info-alternative: mix($color--info, $color--white, 20%); diff --git a/resources/assets/stylesheets/scss/messagebox.scss b/resources/assets/stylesheets/scss/messagebox.scss index 6f34ef8a344aa51c8af8e26d281323fa6450e97d..dbd173e52f6e304a65f36404be955cad2f83ca5f 100644 --- a/resources/assets/stylesheets/scss/messagebox.scss +++ b/resources/assets/stylesheets/scss/messagebox.scss @@ -1,7 +1,7 @@ /* --- MessageBoxes --------------------------------------------------------- */ div.messagebox { background: no-repeat 10px 10px; - border: 2px solid; + border-left: 5px solid; font-size: 12pt; font-weight: bold; margin: 0 0 5px 0; @@ -64,11 +64,11 @@ div.messagebox_details { } } -@include messagebox(info, var(--black), var(--white), var(--base-color)); -@include messagebox(success, var(--black), var(--white), var(--dark-green)); -@include messagebox(error, var(--black), var(--white), var(--red)); -@include messagebox(exception, var(--red), var(--red-20), var(--red)); -@include messagebox(warning, var(--black), var(--white), var(--yellow-60), advice); +@include messagebox(info, var(--color--black), var(--color--info-alternative), var(--color--info)); +@include messagebox(success, var(--color--black), var(--color--good-alternative), var(--color--good)); +@include messagebox(error, var(--color--black), var(--color--warning-alternative), var(--color--warning)); +@include messagebox(exception, var(--color--black), var(--color--warning-alternative), var(--color--warning)); +@include messagebox(warning, var(--color--black), var(--color--attention-alternative), var(--color--attention), advice); // Define modal messagebox .modaloverlay { diff --git a/resources/assets/stylesheets/scss/system-notifications.scss b/resources/assets/stylesheets/scss/system-notifications.scss index 57c00a098d35cca93b7be70676a2a83abbc40b57..9e817c108e7527289e867ede506210d6a1aee1c8 100644 --- a/resources/assets/stylesheets/scss/system-notifications.scss +++ b/resources/assets/stylesheets/scss/system-notifications.scss @@ -33,7 +33,7 @@ &.top-center { left: calc(50% - 300px); - top: 41px; + top: 40px; .system-notification { &.system-notification-slide-enter, @@ -74,7 +74,7 @@ .system-notification { background-color: var(--content-color-20); - color: var(--white); + color: var(--color--white); cursor: pointer; display: flex; margin-bottom: 6px; @@ -142,12 +142,12 @@ } a:not(.system-notification-message) { - color: var(--white); + color: var(--color--white); text-decoration-line: underline; } a.system-notification-message { - color: var(--white); + color: var(--color--white); text-decoration: unset; } @@ -160,55 +160,55 @@ } .system-notification-exception { - background-color: var(--red); - color: var(--white); + background-color: var(--color--warning); + color: var(--color--white); .system-notification-timeout { - background-color: var(--red-40); + background-color: var(--color--warning-alternative); } } .system-notification-error { - background-color: var(--red); - color: var(--white); + background-color: var(--color--warning); + color: var(--color--white); .system-notification-timeout { - background-color: var(--red-40); + background-color: var(--color--warning-alternative); } } .system-notification-warning { - background-color: var(--yellow); - color: var(--black); + background-color: var(--color--attention); + color: var(--color--black); .system-notification-timeout { - background-color: var(--yellow-40); + background-color: var(--color--attention-alternative); } a:not(.system-notification-message) { - color: var(--black); + color: var(--color--white); text-decoration-line: underline; } a.system-notification-message { - color: var(--white); + color: var(--color--white); text-decoration: unset; } } .system-notification-success { - background-color: var(--green); + background-color: var(--color--good); .system-notification-timeout { - background-color: var(--green-40); + background-color: var(--color--good-alternative); } } .system-notification-info { - background-color: var(--dark-violet); + background-color: var(--color--info); .system-notification-timeout { - background-color: var(--dark-violet-40); + background-color: var(--color--info-alternative); } } diff --git a/resources/assets/stylesheets/scss/variables.scss b/resources/assets/stylesheets/scss/variables.scss index 6337c110ece63d03ec6534241bdc336669be495a..d1564fef5e953814e83c65ad298da271f9d421df 100644 --- a/resources/assets/stylesheets/scss/variables.scss +++ b/resources/assets/stylesheets/scss/variables.scss @@ -196,7 +196,9 @@ $grid-gap: 0; --transition-duration-slow: #{$transition-duration-slow}; --transition-duration-superslow: #{$transition-duration-superslow}; + --color--black: #{$color--black}; --color--blue-1: #{$color--blue-1}; + --color--blue-2: #{$color--blue-2}; --color--gray-1: #{$color--gray-1}; --color--gray-2: #{$color--gray-2}; --color--gray-3: #{$color--gray-3}; @@ -280,8 +282,13 @@ $grid-gap: 0; --color--focus: #{$color--focus}; --color--warning: #{$color--warning}; + --color--warning-alternative: #{$color--warning-alternative}; --color--attention: #{$color--attention}; + --color--attention-alternative: #{$color--attention-alternative}; --color--good: #{$color--good}; + --color--good-alternative: #{$color--good-alternative}; + --color--info: #{$color--info}; + --color--info-alternative: #{$color--info-alternative}; @media (prefers-reduced-motion) { #{"--"}transition-duration: 0s; diff --git a/resources/vue/components/SystemNotification.vue b/resources/vue/components/SystemNotification.vue index 947b73feec77d023bb2e069774c43aee46f4027d..82324a155d602ea3cd74025f549be70f417f9afa 100644 --- a/resources/vue/components/SystemNotification.vue +++ b/resources/vue/components/SystemNotification.vue @@ -170,7 +170,7 @@ export default { } setTimeout(() => { - audio.play(); + audio.play().catch(error => {}); }, timing); } }, diff --git a/templates/shared/message_box.php b/templates/shared/message_box.php index 447763d7d97c99c940c5879d5599eab937bc495d..06dc7192f2dc04437b49f73fb381dc864e329b7e 100644 --- a/templates/shared/message_box.php +++ b/templates/shared/message_box.php @@ -5,11 +5,6 @@ <span><?= _('Detailanzeige umschalten') ?></span> </a> <? endif ?> - <? if (!$hide_close): ?> - <a class="close" role="button" href="#" title="<?= _('Nachrichtenbox schließen') ?>"> - <span><?= _('Nachrichtenbox schließen') ?></span> - </a> - <? endif; ?> </div> <div role="status" id="messagebox-<?= $counter ?>"> <?= $message ?>