MOBILE-1075 settings: Allow accessing settings from login pages

main
dpalou 2018-10-03 13:17:26 +02:00
parent 86501d3c4e
commit 8554dcd388
5 changed files with 17 additions and 3 deletions

View File

@ -1,6 +1,12 @@
<ion-header> <ion-header>
<ion-navbar core-back-button> <ion-navbar core-back-button>
<ion-title>{{ 'core.login.login' | translate }}</ion-title> <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-navbar>
</ion-header> </ion-header>
<ion-content class="core-center-view"> <ion-content class="core-center-view">

View File

@ -44,6 +44,7 @@ export class CoreLoginCredentialsPage {
identityProviders: any[]; identityProviders: any[];
pageLoaded = false; pageLoaded = false;
isBrowserSSO = false; isBrowserSSO = false;
isFixedUrlSet = false;
protected siteConfig; protected siteConfig;
protected eventThrown = false; protected eventThrown = false;
@ -72,8 +73,9 @@ export class CoreLoginCredentialsPage {
*/ */
ionViewDidLoad(): void { ionViewDidLoad(): void {
this.treatSiteConfig(); 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. // Fixed URL, we need to check if it uses browser SSO login.
this.checkSite(this.siteUrl); this.checkSite(this.siteUrl);
} else { } else {

View File

@ -3,6 +3,9 @@
<ion-title>{{ 'core.login.connecttomoodle' | translate }}</ion-title> <ion-title>{{ 'core.login.connecttomoodle' | translate }}</ion-title>
<ion-buttons end> <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"> <button ion-button icon-only (click)="showHelp()" [attr.aria-label]="'core.help' | translate">
<ion-icon name="help-circle"></ion-icon> <ion-icon name="help-circle"></ion-icon>
</button> </button>

View File

@ -3,6 +3,9 @@
<ion-title>{{ 'core.settings.sites' | translate }}</ion-title> <ion-title>{{ 'core.settings.sites' | translate }}</ion-title>
<ion-buttons end> <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"> <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> <ion-icon name="create" ios="md-create"></ion-icon>
</button> </button>

View File

@ -67,8 +67,8 @@ export class CoreSettingsAboutPage {
this.lastCommit = CoreConfigConstants.lastcommit; this.lastCommit = CoreConfigConstants.lastcommit;
// Calculate the privacy policy to use. // Calculate the privacy policy to use.
this.privacyPolicy = currentSite.getStoredConfig('tool_mobile_apppolicy') || currentSite.getStoredConfig('sitepolicy') || this.privacyPolicy = (currentSite && (currentSite.getStoredConfig('tool_mobile_apppolicy') ||
CoreConfigConstants.privacypolicy; currentSite.getStoredConfig('sitepolicy'))) || CoreConfigConstants.privacypolicy;
this.navigator = window.navigator; this.navigator = window.navigator;
if (window.location && window.location.href) { if (window.location && window.location.href) {