Bugfix/fix internal navigation with query param (#114)
* Fix internal navigation with query parameter * Add guard * Update changelog
This commit is contained in:
parent
9851cce382
commit
b4762dc463
@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Hid footer on mobile (except on landing page)
|
- Hid footer on mobile (except on landing page)
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed the internal navigation of the _Zen Mode_ in combination with a query parameter
|
||||||
|
|
||||||
## 1.6.0 - 22.05.2021
|
## 1.6.0 - 22.05.2021
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
@ -46,7 +46,7 @@ export class PerformanceChartDialog {
|
|||||||
|
|
||||||
this.historicalDataItems = this.data.historicalDataItems;
|
this.historicalDataItems = this.data.historicalDataItems;
|
||||||
|
|
||||||
this.historicalDataItems.forEach((historicalDataItem) => {
|
this.historicalDataItems?.forEach((historicalDataItem) => {
|
||||||
const benchmarkItem = historicalData.find((item) => {
|
const benchmarkItem = historicalData.find((item) => {
|
||||||
return item.date === historicalDataItem.date;
|
return item.date === historicalDataItem.date;
|
||||||
});
|
});
|
||||||
|
@ -45,12 +45,12 @@ export class AuthGuard implements CanActivate {
|
|||||||
)
|
)
|
||||||
.subscribe((user) => {
|
.subscribe((user) => {
|
||||||
if (
|
if (
|
||||||
state.url === '/home' &&
|
state.url.startsWith('/home') &&
|
||||||
user.settings.viewMode === ViewMode.ZEN
|
user.settings.viewMode === ViewMode.ZEN
|
||||||
) {
|
) {
|
||||||
this.router.navigate(['/zen']);
|
this.router.navigate(['/zen']);
|
||||||
resolve(false);
|
resolve(false);
|
||||||
} else if (state.url === '/start') {
|
} else if (state.url.startsWith('/start')) {
|
||||||
if (user.settings.viewMode === ViewMode.ZEN) {
|
if (user.settings.viewMode === ViewMode.ZEN) {
|
||||||
this.router.navigate(['/zen']);
|
this.router.navigate(['/zen']);
|
||||||
} else {
|
} else {
|
||||||
@ -59,7 +59,7 @@ export class AuthGuard implements CanActivate {
|
|||||||
|
|
||||||
resolve(false);
|
resolve(false);
|
||||||
} else if (
|
} else if (
|
||||||
state.url === '/zen' &&
|
state.url.startsWith('/zen') &&
|
||||||
user.settings.viewMode === ViewMode.DEFAULT
|
user.settings.viewMode === ViewMode.DEFAULT
|
||||||
) {
|
) {
|
||||||
this.router.navigate(['/home']);
|
this.router.navigate(['/home']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user