Merge pull request #1779 from crazyserver/MOBILE-2888

Mobile 2888
main
Juan Leyva 2019-02-25 17:51:18 +01:00 committed by GitHub
commit 64a60740d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -0,0 +1,3 @@
page-core-login-site-error button.button.button-block {
margin-bottom: 3rem;
}

View File

@ -36,13 +36,12 @@
<button ion-button block [disabled]="!siteForm.valid">{{ 'core.login.connect' | translate }}</button> <button ion-button block [disabled]="!siteForm.valid">{{ 'core.login.connect' | translate }}</button>
</form> </form>
<!-- Pick the site from a list of fixed sites. --> <!-- Pick the site from a list of fixed sites. -->
<ion-list *ngIf="fixedSites && fixedDisplay == 'list'"> <ion-list *ngIf="fixedSites && (fixedDisplay == 'list' || fixedDisplay == 'listnourl')">
<p class="padding no-padding-bottom">{{ 'core.login.selectsite' | translate }}</p> <ion-item no-lines><h2 class="item-heading">{{ 'core.login.selectsite' | translate }}</h2></ion-item>
<ion-searchbar *ngIf="fixedSites.length > 4" [(ngModel)]="filter" (ionInput)="filterChanged($event)" (ionCancel)="filterChanged()" [placeholder]="'core.login.findyoursite' | translate"></ion-searchbar> <ion-searchbar *ngIf="fixedSites.length > 4" [(ngModel)]="filter" (ionInput)="filterChanged($event)" (ionCancel)="filterChanged()" [placeholder]="'core.login.findyoursite' | translate"></ion-searchbar>
<ion-item *ngFor="let site of filteredSites" (click)="connect($event, site.url)" [title]="site.name" detail-push text-wrap> <ion-item *ngFor="let site of filteredSites" (click)="connect($event, site.url)" [title]="site.name" detail-push text-wrap>
<h2>{{site.name}}</h2> <h2>{{site.name}}</h2>
<p>{{site.url}}</p> <p *ngIf="fixedDisplay == 'list'">{{site.url}}</p>
</ion-item> </ion-item>
</ion-list> </ion-list>

View File

@ -50,7 +50,7 @@ export class CoreLoginSitePage {
this.fixedSites = <any[]> this.loginHelper.getFixedSites(); this.fixedSites = <any[]> this.loginHelper.getFixedSites();
this.fixedDisplay = CoreConfigConstants.multisitesdisplay; this.fixedDisplay = CoreConfigConstants.multisitesdisplay;
// Autoselect if not defined. // Autoselect if not defined.
if (['list', 'select', 'buttons'].indexOf(this.fixedDisplay) < 0) { if (['list', 'listnourl', 'select', 'buttons'].indexOf(this.fixedDisplay) < 0) {
this.fixedDisplay = this.fixedSites.length > 8 ? 'list' : (this.fixedSites.length > 3 ? 'select' : 'buttons'); this.fixedDisplay = this.fixedSites.length > 8 ? 'list' : (this.fixedSites.length > 3 ? 'select' : 'buttons');
} }
this.filteredSites = this.fixedSites; this.filteredSites = this.fixedSites;