UI: Fix show toast in single dashboard mode
This commit is contained in:
parent
e292944210
commit
d14e8df135
@ -15,7 +15,7 @@
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<div class="tb-dashboard-page mat-content" [ngClass]="{'mobile-app': isMobileApp && !isEdit}" style="padding-top: 150px;"
|
||||
<div class="tb-dashboard-page mat-content" [ngClass]="{'mobile-app': isMobileApp && !isEdit}" style="padding-top: 150px;" tb-toast toastTarget="dashboardRoot"
|
||||
fxFlex tb-fullscreen [fullscreen]="widgetEditMode || iframeMode || forceFullscreen || isFullscreen">
|
||||
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
|
||||
<section class="tb-dashboard-toolbar"
|
||||
|
||||
@ -262,35 +262,35 @@ export class WidgetContext {
|
||||
showSuccessToast(message: string, duration: number = 1000,
|
||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||
target?: string) {
|
||||
target: string = 'dashboardRoot') {
|
||||
this.showToast('success', message, duration, verticalPosition, horizontalPosition, target);
|
||||
}
|
||||
|
||||
showInfoToast(message: string,
|
||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||
target?: string) {
|
||||
target: string = 'dashboardRoot') {
|
||||
this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target);
|
||||
}
|
||||
|
||||
showWarnToast(message: string,
|
||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||
target?: string) {
|
||||
target: string = 'dashboardRoot') {
|
||||
this.showToast('warn', message, undefined, verticalPosition, horizontalPosition, target);
|
||||
}
|
||||
|
||||
showErrorToast(message: string,
|
||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||
target?: string) {
|
||||
target: string = 'dashboardRoot') {
|
||||
this.showToast('error', message, undefined, verticalPosition, horizontalPosition, target);
|
||||
}
|
||||
|
||||
showToast(type: NotificationType, message: string, duration: number,
|
||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||
target?: string) {
|
||||
target: string = 'dashboardRoot') {
|
||||
this.store.dispatch(new ActionNotificationShow(
|
||||
{
|
||||
message,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user