mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AppChrome: Fixes kiosk mode toggling (#58240)
This commit is contained in:
parent
cc8c1380e2
commit
4d2bf41efb
@ -0,0 +1,10 @@
|
||||
import { AppChromeService } from './AppChromeService';
|
||||
|
||||
describe('AppChromeService', () => {
|
||||
it('onToggleKioskMode should set chromeless to true when searchbar is hidden', () => {
|
||||
const chromeService = new AppChromeService();
|
||||
chromeService.onToggleSearchBar();
|
||||
chromeService.onToggleKioskMode();
|
||||
expect(chromeService.state.getValue().chromeless).toBe(true);
|
||||
});
|
||||
});
|
@ -57,11 +57,11 @@ export class AppChromeService {
|
||||
this.routeChangeHandled = true;
|
||||
}
|
||||
|
||||
Object.assign(newState, update);
|
||||
|
||||
// KioskMode overrides chromeless state
|
||||
newState.chromeless = newState.kioskMode === KioskMode.Full || this.currentRoute?.chromeless;
|
||||
|
||||
Object.assign(newState, update);
|
||||
|
||||
if (!isShallowEqual(current, newState)) {
|
||||
this.state.next(newState);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user