Merge pull request #1550 from dpalou/MOBILE-1075
MOBILE-1075 settings: Allow accessing settings from login pagesmain
commit
8f755fef2f
|
@ -1,6 +1,12 @@
|
|||
<ion-header>
|
||||
<ion-navbar core-back-button>
|
||||
<ion-title>{{ 'core.login.login' | translate }}</ion-title>
|
||||
|
||||
<ion-buttons end>
|
||||
<button *ngIf="isFixedUrlSet" ion-button icon-only [navPush]="'CoreSettingsListPage'" [attr.aria-label]="'core.mainmenu.appsettings' | translate">
|
||||
<ion-icon name="cog"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
<ion-content class="core-center-view">
|
||||
|
|
|
@ -44,6 +44,7 @@ export class CoreLoginCredentialsPage {
|
|||
identityProviders: any[];
|
||||
pageLoaded = false;
|
||||
isBrowserSSO = false;
|
||||
isFixedUrlSet = false;
|
||||
|
||||
protected siteConfig;
|
||||
protected eventThrown = false;
|
||||
|
@ -72,8 +73,9 @@ export class CoreLoginCredentialsPage {
|
|||
*/
|
||||
ionViewDidLoad(): void {
|
||||
this.treatSiteConfig();
|
||||
this.isFixedUrlSet = this.loginHelper.isFixedUrlSet();
|
||||
|
||||
if (this.loginHelper.isFixedUrlSet()) {
|
||||
if (this.isFixedUrlSet) {
|
||||
// Fixed URL, we need to check if it uses browser SSO login.
|
||||
this.checkSite(this.siteUrl);
|
||||
} else {
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<ion-title>{{ 'core.login.connecttomoodle' | translate }}</ion-title>
|
||||
|
||||
<ion-buttons end>
|
||||
<button ion-button icon-only [navPush]="'CoreSettingsListPage'" [attr.aria-label]="'core.mainmenu.appsettings' | translate">
|
||||
<ion-icon name="cog"></ion-icon>
|
||||
</button>
|
||||
<button ion-button icon-only (click)="showHelp()" [attr.aria-label]="'core.help' | translate">
|
||||
<ion-icon name="help-circle"></ion-icon>
|
||||
</button>
|
||||
|
|
|
@ -3,6 +3,9 @@
|
|||
<ion-title>{{ 'core.settings.sites' | translate }}</ion-title>
|
||||
|
||||
<ion-buttons end>
|
||||
<button ion-button icon-only [navPush]="'CoreSettingsListPage'" [attr.aria-label]="'core.mainmenu.appsettings' | translate">
|
||||
<ion-icon name="cog"></ion-icon>
|
||||
</button>
|
||||
<button *ngIf="sites && sites.length > 0" ion-button icon-only (click)="toggleDelete()" [attr.aria-label]="'core.delete' | translate">
|
||||
<ion-icon name="create" ios="md-create"></ion-icon>
|
||||
</button>
|
||||
|
|
|
@ -67,8 +67,8 @@ export class CoreSettingsAboutPage {
|
|||
this.lastCommit = CoreConfigConstants.lastcommit;
|
||||
|
||||
// Calculate the privacy policy to use.
|
||||
this.privacyPolicy = currentSite.getStoredConfig('tool_mobile_apppolicy') || currentSite.getStoredConfig('sitepolicy') ||
|
||||
CoreConfigConstants.privacypolicy;
|
||||
this.privacyPolicy = (currentSite && (currentSite.getStoredConfig('tool_mobile_apppolicy') ||
|
||||
currentSite.getStoredConfig('sitepolicy'))) || CoreConfigConstants.privacypolicy;
|
||||
|
||||
this.navigator = window.navigator;
|
||||
if (window.location && window.location.href) {
|
||||
|
|
Loading…
Reference in New Issue