-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOBILE-4465 chore: Simplify code on deprecated components
- Loading branch information
1 parent
3c53bf2
commit 0ddb86d
Showing
4 changed files
with
14 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 3 additions & 60 deletions
63
src/core/features/courses/components/course-progress/core-courses-course-progress.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,3 @@ | ||
<ion-card [attr.course-color]="course.color ? null : course.colorNumber"> | ||
<div (click)="openCourse()" class="core-course-thumb" [class.core-course-color-img]="course.courseimage" | ||
[style.background-color]="course.color"> | ||
<img *ngIf="course.courseimage" [src]="course.courseimage" core-external-content alt="" /> | ||
</div> | ||
<ion-item button (click)="openCourse()" [attr.aria-label]="course.displayname || course.fullname" class="core-course-header" | ||
[class.core-course-only-title]="!showAll || progress < 0 && completionUserTracked === false" detail="false"> | ||
<ion-label class="ion-text-wrap core-course-title" | ||
[class.core-course-with-buttons]="courseOptionMenuEnabled || (downloadCourseEnabled && showDownload)" | ||
[class.core-course-with-spinner]="(downloadCourseEnabled && prefetchCourseData.icon == 'spinner') || showSpinner"> | ||
<p *ngIf="course.categoryname || (course.displayname && course.shortname && course.fullname != course.displayname)" | ||
class="core-course-additional-info"> | ||
<span class="sr-only">{{ 'core.courses.aria:coursecategory' | translate }}</span> | ||
<span *ngIf="course.categoryname" class="core-course-category"> | ||
<core-format-text [text]="course.categoryname"></core-format-text> | ||
</span> | ||
<span *ngIf="course.categoryname && course.displayname && course.shortname && course.fullname != course.displayname" | ||
class="core-course-category"> | </span> | ||
<span *ngIf="course.displayname && course.shortname && course.fullname != course.displayname" class="core-course-shortname"> | ||
<core-format-text [text]="course.shortname" contextLevel="course" [contextInstanceId]="course.id"> | ||
</core-format-text> | ||
</span> | ||
</p> | ||
<p class="item-heading"> | ||
<ion-icon name="fas-star" *ngIf="isFavourite" [attr.aria-label]="'core.courses.favourite' | translate"> | ||
</ion-icon> | ||
<span class="sr-only" *ngIf="isFavourite">{{ 'core.courses.aria:favourite' | translate }}</span> | ||
<span class="sr-only">{{ 'core.courses.aria:coursename' | translate }}</span> | ||
<core-format-text [text]="course.fullname" contextLevel="course" [contextInstanceId]="course.id"></core-format-text> | ||
</p> | ||
</ion-label> | ||
|
||
<div class="core-button-spinner" *ngIf="downloadCourseEnabled && !courseOptionMenuEnabled && showDownload" slot="end"> | ||
<core-download-refresh [status]="prefetchCourseData.status" [enabled]="downloadCourseEnabled" | ||
[statusTranslatable]="prefetchCourseData.statusTranslatable" [canTrustDownload]="false" | ||
[loading]="prefetchCourseData.loading" (action)="prefetchCourse()"></core-download-refresh> | ||
</div> | ||
|
||
<div class="core-button-spinner" *ngIf="courseOptionMenuEnabled" slot="end"> | ||
<!-- Download course spinner. --> | ||
<ion-spinner *ngIf="(downloadCourseEnabled && prefetchCourseData.icon == 'spinner') || showSpinner" | ||
[attr.aria-label]="'core.loading' | translate"></ion-spinner> | ||
|
||
<!-- Downloaded icon. --> | ||
<ion-icon *ngIf="downloadCourseEnabled && prefetchCourseData.downloadSucceeded && !showSpinner" class="core-icon-downloaded" | ||
name="fam-cloud-done" color="success" role="status" [attr.aria-label]="'core.downloaded' | translate"></ion-icon> | ||
|
||
<!-- Options menu. --> | ||
<ion-button fill="clear" (click)="showCourseOptionsMenu($event)" *ngIf="!showSpinner" | ||
[attr.aria-label]="('core.displayoptions' | translate)"> | ||
<ion-icon name="ellipsis-vertical" slot="icon-only" aria-hidden="true"></ion-icon> | ||
</ion-button> | ||
</div> | ||
</ion-item> | ||
<ion-item *ngIf="showAll && progress >= 0 && completionUserTracked !== false" class="core-course-progress"> | ||
<ion-label> | ||
<core-progress-bar [progress]="progress" a11yText="core.courses.aria:courseprogress"></core-progress-bar> | ||
</ion-label> | ||
</ion-item> | ||
</ion-card> | ||
<core-courses-course-list-item [course]="course" class="core-course-progress" [showDownload]="showDownload" | ||
[layout]="showAll ? 'card' : 'summarycard'"> | ||
</core-courses-course-list-item> |
159 changes: 0 additions & 159 deletions
159
src/core/features/courses/components/course-progress/course-progress.scss
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.