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.
|
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">
|
fxFlex tb-fullscreen [fullscreen]="widgetEditMode || iframeMode || forceFullscreen || isFullscreen">
|
||||||
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
|
<tb-hotkeys-cheatsheet #cheatSheetComponent></tb-hotkeys-cheatsheet>
|
||||||
<section class="tb-dashboard-toolbar"
|
<section class="tb-dashboard-toolbar"
|
||||||
|
|||||||
@ -262,35 +262,35 @@ export class WidgetContext {
|
|||||||
showSuccessToast(message: string, duration: number = 1000,
|
showSuccessToast(message: string, duration: number = 1000,
|
||||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||||
target?: string) {
|
target: string = 'dashboardRoot') {
|
||||||
this.showToast('success', message, duration, verticalPosition, horizontalPosition, target);
|
this.showToast('success', message, duration, verticalPosition, horizontalPosition, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
showInfoToast(message: string,
|
showInfoToast(message: string,
|
||||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||||
target?: string) {
|
target: string = 'dashboardRoot') {
|
||||||
this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target);
|
this.showToast('info', message, undefined, verticalPosition, horizontalPosition, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
showWarnToast(message: string,
|
showWarnToast(message: string,
|
||||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||||
target?: string) {
|
target: string = 'dashboardRoot') {
|
||||||
this.showToast('warn', message, undefined, verticalPosition, horizontalPosition, target);
|
this.showToast('warn', message, undefined, verticalPosition, horizontalPosition, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
showErrorToast(message: string,
|
showErrorToast(message: string,
|
||||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||||
target?: string) {
|
target: string = 'dashboardRoot') {
|
||||||
this.showToast('error', message, undefined, verticalPosition, horizontalPosition, target);
|
this.showToast('error', message, undefined, verticalPosition, horizontalPosition, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
showToast(type: NotificationType, message: string, duration: number,
|
showToast(type: NotificationType, message: string, duration: number,
|
||||||
verticalPosition: NotificationVerticalPosition = 'bottom',
|
verticalPosition: NotificationVerticalPosition = 'bottom',
|
||||||
horizontalPosition: NotificationHorizontalPosition = 'left',
|
horizontalPosition: NotificationHorizontalPosition = 'left',
|
||||||
target?: string) {
|
target: string = 'dashboardRoot') {
|
||||||
this.store.dispatch(new ActionNotificationShow(
|
this.store.dispatch(new ActionNotificationShow(
|
||||||
{
|
{
|
||||||
message,
|
message,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user