diff --git a/projects/editor/src/app/components/element-list.component.ts b/projects/editor/src/app/components/element-list.component.ts index 9f07b471a5a4f14a0f06e74dd93c6758e8a8cd5b..685646ab81b77d4721d0b51de1976502ec4fc72a 100644 --- a/projects/editor/src/app/components/element-list.component.ts +++ b/projects/editor/src/app/components/element-list.component.ts @@ -26,7 +26,8 @@ import { NgForOf } from '@angular/common'; </mat-list> `, styles: [ - + 'mat-icon {color: inherit !important;}', + '.mat-mdc-list-item-title {color: inherit !important;}' ] }) export class ElementListComponent { diff --git a/projects/editor/src/app/components/reference-list.component.ts b/projects/editor/src/app/components/reference-list.component.ts index 9f8bd1cf71a17fde3b8654ce8bd39770e7bbd493..cba294cd28ff89a296c8f7b5431cfe5f13cdbfc7 100644 --- a/projects/editor/src/app/components/reference-list.component.ts +++ b/projects/editor/src/app/components/reference-list.component.ts @@ -26,7 +26,6 @@ import { ElementListComponent } from 'editor/src/app/components/element-list.com </ng-container> `, styles: [ - 'mat-icon {color: inherit !important;}', '.mat-mdc-list-item-title {color: inherit !important;}' ] }) diff --git a/projects/editor/src/app/services/message.service.ts b/projects/editor/src/app/services/message.service.ts index c843602c618178b691bbed883cca7064481c6194..1ed3d9f0ab7aaac73ec97210ac66fb8d7f6e1df2 100644 --- a/projects/editor/src/app/services/message.service.ts +++ b/projects/editor/src/app/services/message.service.ts @@ -2,9 +2,14 @@ import { Component, Inject, Injectable, Input, Optional } from '@angular/core'; -import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarRef } from '@angular/material/snack-bar'; +import { MAT_SNACK_BAR_DATA, MatSnackBar, MatSnackBarModule, MatSnackBarRef } from '@angular/material/snack-bar'; import { ReferenceList } from 'editor/src/app/services/reference-manager'; import { UIElement } from 'common/models/elements/element'; +import { ReferenceListComponent } from 'editor/src/app/components/reference-list.component'; +import { MatButtonModule } from '@angular/material/button'; +import { MatListModule } from '@angular/material/list'; +import { MatIconModule } from '@angular/material/icon'; +import { NgForOf, NgIf } from '@angular/common'; @Injectable({ providedIn: 'root' @@ -49,19 +54,28 @@ export class MessageService { @Component({ selector: 'aspect-reference-list-snackbar', + standalone: true, + imports: [ + ReferenceListComponent, + MatSnackBarModule, + MatButtonModule + ], template: ` - <aspect-reference-list matSnackBarLabel [refs]="refs || data"></aspect-reference-list> - <span matSnackBarActions> - <button mat-stroked-button matSnackBarAction (click)="snackBarRef.dismiss()"> - Schließen - </button> - </span> + <div [style.padding.px]="16"> + <aspect-reference-list matSnackBarLabel [refs]="refs || data"></aspect-reference-list> + <span matSnackBarActions> + <button mat-stroked-button matSnackBarAction (click)="snackBarRef.dismiss()"> + Schließen + </button> + </span> + </div> `, styles: [` button { color: var(--mat-snack-bar-button-color) !important; --mat-mdc-button-persistent-ripple-color: currentColor !important; } + aspect-reference-list {color: var(--mdc-snackbar-supporting-text-color);} ` ] }) @@ -74,6 +88,15 @@ export class ReferenceListSnackbarComponent { @Component({ selector: 'aspect-invalid-reference-elements-list-snackbar', + standalone: true, + imports: [ + NgIf, + NgForOf, + MatListModule, + MatIconModule, + MatSnackBarModule, + MatButtonModule + ], template: ` Invalide Referenzen bei folgenden <br> Elementen wurden entfernt: <mat-list>