MOBILE-3320 core: Fix preferences and course preview in production

main
Dani Palou 2021-05-04 15:49:23 +02:00
parent 797b7f48cc
commit f1f3953749
3 changed files with 17 additions and 5 deletions

View File

@ -94,7 +94,7 @@ export class CoreCoursesCourseListItemComponent implements OnInit {
if (this.isEnrolled) {
CoreCourseHelper.openCourse(this.course);
} else {
CoreNavigator.navigate(
CoreNavigator.navigateToSitePath(
'/course/' + this.course.id + '/preview',
{ params: { course: this.course } },
);

View File

@ -70,8 +70,7 @@
<h2>{{ 'core.mainmenu.help' | translate }}</h2>
</ion-label>
</ion-item>
<ion-item button router-direction="forward" routerLink="preferences"
[attr.aria-label]="'core.settings.preferences' | translate" detail="true">
<ion-item button (click)="openPreferences()" [attr.aria-label]="'core.settings.preferences' | translate" detail="true">
<ion-icon name="fas-wrench" slot="start" aria-hidden="true"></ion-icon>
<ion-label>
<h2>{{ 'core.settings.preferences' | translate }}</h2>
@ -84,8 +83,7 @@
</ion-label>
</ion-item>
<ion-item-divider><ion-label></ion-label></ion-item-divider>
<ion-item button router-direction="forward" routerLink="settings"
[attr.aria-label]="'core.settings.appsettings' | translate" detail="true">
<ion-item button (click)="openSettings()" [attr.aria-label]="'core.settings.appsettings' | translate" detail="true">
<ion-icon name="fas-cogs" slot="start" aria-hidden="true"></ion-icon>
<ion-label>
<h2>{{ 'core.settings.appsettings' | translate }}</h2>

View File

@ -153,6 +153,20 @@ export class CoreMainMenuMorePage implements OnInit, OnDestroy {
CoreNavigator.navigateToSitePath('viewer/iframe', { params: { title: item.label, url: item.url } });
}
/**
* Open preferences.
*/
openPreferences(): void {
CoreNavigator.navigateToSitePath('preferences');
}
/**
* Open settings.
*/
openSettings(): void {
CoreNavigator.navigateToSitePath('settings');
}
/**
* Scan and treat a QR code.
*/