mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Navigation: use "Home" instead of "Grafana" as the default Breadcrumb text (#60973)
* use Home instead of Grafana as the default Breadcrumb text * use translated text
This commit is contained in:
parent
7005b7bf8a
commit
ebb34560a4
@ -21,8 +21,6 @@ export interface AppChromeState {
|
|||||||
kioskMode: KioskMode | null;
|
kioskMode: KioskMode | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaultSection: NavModelItem = { text: 'Grafana' };
|
|
||||||
|
|
||||||
export class AppChromeService {
|
export class AppChromeService {
|
||||||
searchBarStorageKey = 'SearchBar_Hidden';
|
searchBarStorageKey = 'SearchBar_Hidden';
|
||||||
private currentRoute?: RouteDescriptor;
|
private currentRoute?: RouteDescriptor;
|
||||||
@ -30,7 +28,7 @@ export class AppChromeService {
|
|||||||
|
|
||||||
readonly state = new BehaviorSubject<AppChromeState>({
|
readonly state = new BehaviorSubject<AppChromeState>({
|
||||||
chromeless: true, // start out hidden to not flash it on pages without chrome
|
chromeless: true, // start out hidden to not flash it on pages without chrome
|
||||||
sectionNav: defaultSection,
|
sectionNav: { text: t('nav.home.title', 'Home') },
|
||||||
searchBarHidden: store.getBool(this.searchBarStorageKey, false),
|
searchBarHidden: store.getBool(this.searchBarStorageKey, false),
|
||||||
kioskMode: null,
|
kioskMode: null,
|
||||||
});
|
});
|
||||||
@ -52,7 +50,7 @@ export class AppChromeService {
|
|||||||
if (!this.routeChangeHandled) {
|
if (!this.routeChangeHandled) {
|
||||||
newState.actions = undefined;
|
newState.actions = undefined;
|
||||||
newState.pageNav = undefined;
|
newState.pageNav = undefined;
|
||||||
newState.sectionNav = defaultSection;
|
newState.sectionNav = { text: t('nav.home.title', 'Home') };
|
||||||
newState.chromeless = this.currentRoute?.chromeless;
|
newState.chromeless = this.currentRoute?.chromeless;
|
||||||
this.routeChangeHandled = true;
|
this.routeChangeHandled = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user