[GIT] Evergreen ILS branch rel_3_15 updated. 31b6a8447d3f95b182500079707ab12b72ea3b39

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, rel_3_15 has been updated via 31b6a8447d3f95b182500079707ab12b72ea3b39 (commit) from a0ad8bbddebd304c37ff19ef18832c08f0415c2a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 31b6a8447d3f95b182500079707ab12b72ea3b39 Author: Stephanie Leary <stephanie.leary@equinoxoli.org> Date: Wed Mar 19 05:25:07 2025 +0000 LP2103619 Stack toasts Allows multiple toast messages to appear in a vertical stack. Release-note: Allows multiple toast messages to appear at once. Signed-off-by: Stephanie Leary <stephanie.leary@equinoxoli.org> Signed-off by: Ruth Frasur Davis <redavis4974@gmail.com> Signed-off by: Shula Link <slink@gchrl.org> Signed-off by: Gina Monti <gmonti@biblio.org> Signed-off by: Dan Guarracino <dguarracino@owwl.org> Signed-off by: Michele Morgan <mmorgan@noblenet.org> Signed-off by: Terran McCanna <tmccanna@georgialibraries.org> diff --git a/Open-ILS/src/eg2/src/app/share/toast/toast.component.css b/Open-ILS/src/eg2/src/app/share/toast/toast.component.css index 901938313e..da6217df1f 100644 --- a/Open-ILS/src/eg2/src/app/share/toast/toast.component.css +++ b/Open-ILS/src/eg2/src/app/share/toast/toast.component.css @@ -9,3 +9,11 @@ bottom: 5px; } +#eg-toast-container ol { + display: flex; + flex-direction: column; +} + +li.alert:not(:last-child) { + filter: brightness(0.85); +} \ No newline at end of file diff --git a/Open-ILS/src/eg2/src/app/share/toast/toast.component.html b/Open-ILS/src/eg2/src/app/share/toast/toast.component.html index 98ed26c6a4..221bcc98e9 100644 --- a/Open-ILS/src/eg2/src/app/share/toast/toast.component.html +++ b/Open-ILS/src/eg2/src/app/share/toast/toast.component.html @@ -1,6 +1,8 @@ <output id="eg-toast-container" role="status"> - <div *ngIf="message" class="alert alert-{{message.style}} alert-dismissible border-2 fade shadow-lg show"> - {{message.text}} - <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close alert" (click)="dismiss(message)"></button> - </div> + <ul *ngIf="messages.length" class="list-unstyled"> + <li *ngFor="let message of messages" class="alert alert-{{message.style}} alert-dismissible border-2 fade shadow-lg show"> + {{message.text}} + <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close alert" (click)="dismiss()"></button> + </li> + </ul> </output> diff --git a/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts b/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts index 444dd31dad..8e01cd0b42 100644 --- a/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts +++ b/Open-ILS/src/eg2/src/app/share/toast/toast.component.ts @@ -1,7 +1,6 @@ import {Component, Input, OnInit, ViewChild} from '@angular/core'; import {ToastService, ToastMessage} from '@eg/share/toast/toast.service'; import {ServerStoreService} from '@eg/core/server-store.service'; -import { StoreService } from '@eg/core/store.service'; const EG_TOAST_TIMEOUT = 10000; @@ -12,7 +11,7 @@ const EG_TOAST_TIMEOUT = 10000; }) export class ToastComponent implements OnInit { - message: ToastMessage; + messages: ToastMessage[] = []; duration: number = EG_TOAST_TIMEOUT; // track the most recent timeout event @@ -26,7 +25,7 @@ export class ToastComponent implements OnInit { this.toast.messages$.subscribe(msg => this.show(msg)); } - async setDuration() { + setDuration() { this.store.getItem('ui.toast_duration').then(setting => { if (setting) { this.duration = setting * 1000; @@ -35,22 +34,14 @@ export class ToastComponent implements OnInit { } show(msg: ToastMessage) { - this.dismiss(this.message); - this.message = msg; - console.info($localize`${new Date().toLocaleTimeString()} - ${this.message.text}`); + this.messages.push(msg); + console.info($localize`${new Date().toLocaleTimeString()} - ${msg.text}`); + this.timeout = setTimeout( - () => this.dismiss(this.message), + () => this.messages.shift(), this.duration ); } - - dismiss(msg: ToastMessage) { - this.message = null; - if (this.timeout) { - clearTimeout(this.timeout); - this.timeout = null; - } - } } ----------------------------------------------------------------------- Summary of changes: .../src/eg2/src/app/share/toast/toast.component.css | 8 ++++++++ .../eg2/src/app/share/toast/toast.component.html | 10 ++++++---- .../src/eg2/src/app/share/toast/toast.component.ts | 21 ++++++--------------- 3 files changed, 20 insertions(+), 19 deletions(-) hooks/post-receive -- Evergreen ILS
participants (1)
-
Git User