Browse Source

optimize logic

pull/14048/head
Maksym Tsymbarov 1 year ago
parent
commit
afa368a856
  1. 14
      ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts

14
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts

@ -203,13 +203,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
} }
get hideToolbar(): boolean { get hideToolbar(): boolean {
const showToolbarInSpecialCase = this.forceFullscreen && this.hideToolbarSetting() && !this.isMobile; return ((this.hideToolbarValue || this.hideToolbarSetting()) && !this.isEdit) || (this.isEditingWidget || this.isAddingWidget);
if (showToolbarInSpecialCase) {
return this.isEditingWidget || this.isAddingWidget;
}
return ((this.hideToolbarValue || this.hideToolbarSetting()) && !this.isEdit) || (this.isEditingWidget || this.isAddingWidget) || !(this.isMobile || !this.forceFullscreen);
} }
@Input() @Input()
@ -655,9 +649,9 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
} }
private hideToolbarSetting(): boolean { private hideToolbarSetting(): boolean {
if (this.dashboard.configuration.settings && if (isDefined(this.dashboard.configuration?.settings?.hideToolbar)) {
isDefined(this.dashboard.configuration.settings.hideToolbar)) { const check = !this.forceFullscreen || this.isMobileApp;
return this.dashboard.configuration.settings.hideToolbar; return this.dashboard.configuration.settings.hideToolbar && check;
} else { } else {
return false; return false;
} }

Loading…
Cancel
Save