MOBILE-3591 course: Fix linting

main
Pau Ferrer Ocaña 2020-12-07 16:20:24 +01:00
parent e4bb89d401
commit 9d87226ad8
5 changed files with 11 additions and 9 deletions

View File

@ -37,12 +37,14 @@ export class CoreContextMenuComponent implements OnInit, OnDestroy {
hideMenu = true; // It will be unhidden when items are added. hideMenu = true; // It will be unhidden when items are added.
expanded = false; expanded = false;
uniqueId: string;
protected items: CoreContextMenuItemComponent[] = []; protected items: CoreContextMenuItemComponent[] = [];
protected itemsMovedToParent: CoreContextMenuItemComponent[] = []; protected itemsMovedToParent: CoreContextMenuItemComponent[] = [];
protected itemsChangedStream: Subject<void>; // Stream to update the hideMenu boolean when items change. protected itemsChangedStream: Subject<void>; // Stream to update the hideMenu boolean when items change.
protected instanceId: string; protected instanceId: string;
protected parentContextMenu?: CoreContextMenuComponent; protected parentContextMenu?: CoreContextMenuComponent;
protected uniqueId: string;
constructor( constructor(
protected popoverCtrl: PopoverController, protected popoverCtrl: PopoverController,

View File

@ -9,7 +9,7 @@
</div> </div>
</ng-container> </ng-container>
<ion-infinite-scroll [disabled]="!enabled || error || loadingMore" (ionInfinite)="loadMore($event)" [position]="position"> <ion-infinite-scroll [disabled]="!enabled || error || loadingMore" (ionInfinite)="loadMore()" [position]="position">
<ion-infinite-scroll-content></ion-infinite-scroll-content> <ion-infinite-scroll-content></ion-infinite-scroll-content>
</ion-infinite-scroll> </ion-infinite-scroll>

View File

@ -16,7 +16,7 @@
<img [src]="courseImageUrl" core-external-content alt=""/> <img [src]="courseImageUrl" core-external-content alt=""/>
</div> </div>
</div> </div>
<div class="core-course-thumb-parallax-content"> <div class="core-course-thumb-parallax-content" *ngIf="course">
<ion-item class="ion-text-wrap" (click)="openCourse()" [title]="course.fullname" [attr.details]="!avoidOpenCourse && canAccessCourse"> <ion-item class="ion-text-wrap" (click)="openCourse()" [title]="course.fullname" [attr.details]="!avoidOpenCourse && canAccessCourse">
<ion-icon name="fas-graduation-cap" fixed-width slot="start"></ion-icon> <ion-icon name="fas-graduation-cap" fixed-width slot="start"></ion-icon>
<ion-label> <ion-label>
@ -43,7 +43,7 @@
<h2>{{ 'core.teachers' | translate }}</h2> <h2>{{ 'core.teachers' | translate }}</h2>
</ion-label> </ion-label>
</ion-item-divider> </ion-item-divider>
<ion-item class="ion-text-wrap" *ngFor="let contact of course.contacts" core-user-link <!-- @todo <ion-item class="ion-text-wrap" *ngFor="let contact of course.contacts" core-user-link
[userId]="contact.id" [userId]="contact.id"
[courseId]="isEnrolled ? course.id : null" [courseId]="isEnrolled ? course.id : null"
[attr.aria-label]="'core.viewprofile' | translate"> [attr.aria-label]="'core.viewprofile' | translate">
@ -55,7 +55,7 @@
<ion-label> <ion-label>
<h2>{{contact.fullname}}</h2> <h2>{{contact.fullname}}</h2>
</ion-label> </ion-label>
</ion-item> </ion-item>-->
<ion-item-divider></ion-item-divider> <ion-item-divider></ion-item-divider>
</ng-container> </ng-container>
@ -102,10 +102,10 @@
</ion-item> </ion-item>
<ion-item *ngIf="canAccessCourse && downloadCourseEnabled" (click)="prefetchCourse()" detail="false" <ion-item *ngIf="canAccessCourse && downloadCourseEnabled" (click)="prefetchCourse()" detail="false"
[attr.aria-label]="prefetchCourseData.statusTranslatable | translate"> [attr.aria-label]="prefetchCourseData.statusTranslatable | translate">
<ion-icon *ngIf="!prefetchCourseData.status != statusDownloaded && !prefetchCourseData.loading" <ion-icon *ngIf="(prefetchCourseData.status != statusDownloaded) && !prefetchCourseData.loading"
[name]="prefetchCourseData.icon" slot="start"> [name]="prefetchCourseData.icon" slot="start">
</ion-icon> </ion-icon>
<ion-icon *ngIf="prefetchCourseData.status == statusDownloaded && !prefetchCourseData.loading" <ion-icon *ngIf="(prefetchCourseData.status == statusDownloaded) && !prefetchCourseData.loading"
slot="start" [name]="prefetchCourseData.icon" color="success" slot="start" [name]="prefetchCourseData.icon" color="success"
[attr.aria-label]="prefetchCourseData.statusTranslatable | translate" role="status"> [attr.aria-label]="prefetchCourseData.statusTranslatable | translate" role="status">
</ion-icon> </ion-icon>

View File

@ -64,6 +64,7 @@ export class CoreCoursesCoursePreviewPage implements OnInit, OnDestroy {
downloadCourseEnabled: boolean; downloadCourseEnabled: boolean;
courseUrl = ''; courseUrl = '';
courseImageUrl?: string; courseImageUrl?: string;
isMobile: boolean;
protected isGuestEnabled = false; protected isGuestEnabled = false;
protected guestInstanceId?: number; protected guestInstanceId?: number;
@ -71,7 +72,6 @@ export class CoreCoursesCoursePreviewPage implements OnInit, OnDestroy {
protected waitStart = 0; protected waitStart = 0;
protected enrolUrl = ''; protected enrolUrl = '';
protected paypalReturnUrl = ''; protected paypalReturnUrl = '';
protected isMobile: boolean;
protected pageDestroyed = false; protected pageDestroyed = false;
protected courseStatusObserver?: CoreEventObserver; protected courseStatusObserver?: CoreEventObserver;

View File

@ -7,7 +7,7 @@
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<core-search-box (onSubmit)="search($event)" (onClear)="clearSearch($event)" <core-search-box (onSubmit)="search($event)" (onClear)="clearSearch()"
[placeholder]="'core.courses.search' | translate" [searchLabel]="'core.courses.search' | translate" autoFocus="true" [placeholder]="'core.courses.search' | translate" [searchLabel]="'core.courses.search' | translate" autoFocus="true"
searchArea="CoreCoursesSearch"></core-search-box> searchArea="CoreCoursesSearch"></core-search-box>