forked from EVOgeek/Vmeda.Online
		
	
		
			
				
	
	
		
			65 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			65 lines
		
	
	
		
			3.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <ion-header>
 | |
|     <ion-toolbar>
 | |
|         <ion-buttons slot="start">
 | |
|             <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | |
|         </ion-buttons>
 | |
|         <ion-title>
 | |
|             <h1>{{ 'addon.storagemanager.managedownloads' | translate }}</h1>
 | |
|         </ion-title>
 | |
|     </ion-toolbar>
 | |
| </ion-header>
 | |
| <ion-content class="limited-width">
 | |
|     <core-loading [hideUntil]="loaded">
 | |
|         <div class="ion-padding-horizontal ion-text-wrap" *ngIf="spaceUsage">
 | |
|             <h2>{{ 'addon.storagemanager.alldata' | translate }}</h2>
 | |
|         </div>
 | |
|         <ion-card *ngIf="spaceUsage">
 | |
|             <ion-item class="ion-text-wrap total">
 | |
|                 <ion-label>
 | |
|                     <p class="item-heading ion-text-wrap">{{ 'addon.storagemanager.totalspaceusage' | translate }}</p>
 | |
|                     <ion-badge color="light" *ngIf="spaceUsage.spaceUsage">{{ spaceUsage.spaceUsage | coreBytesToSize }}</ion-badge>
 | |
|                 </ion-label>
 | |
|                 <ion-button fill="clear" color="danger" slot="end" (click)="deleteSiteStorage($event)"
 | |
|                     [hidden]="spaceUsage.spaceUsage! + spaceUsage.cacheEntries! <= 0"
 | |
|                     [attr.aria-label]="'addon.storagemanager.deleteallsitedata' | translate">
 | |
|                     <ion-icon name="fas-trash" slot="icon-only" aria-hidden="true"></ion-icon>
 | |
|                 </ion-button>
 | |
|             </ion-item>
 | |
|         </ion-card>
 | |
| 
 | |
|         <div class="ion-padding-horizontal ion-text-wrap">
 | |
|             <h2>{{ 'addon.storagemanager.downloadedcourses' | translate }}</h2>
 | |
|         </div>
 | |
|         <ion-card>
 | |
|             <ion-item class="size courses ion-text-wrap" lines="full">
 | |
|                 <ion-label>
 | |
|                     <p class="item-heading">{{ 'addon.storagemanager.totalspaceusage' | translate }}</p>
 | |
|                     <ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
 | |
|                 </ion-label>
 | |
|                 <ion-button slot="end" (click)="deleteCompletelyDownloadedCourses($event)"
 | |
|                     [disabled]="completelyDownloadedCourses.length === 0" color="danger" fill="clear">
 | |
|                     <ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}">
 | |
|                     </ion-icon>
 | |
|                 </ion-button>
 | |
|             </ion-item>
 | |
|             <ion-item *ngFor="let course of downloadedCourses" class="course" (click)="openCourse(course.id, course.title)" button
 | |
|                 detail="true">
 | |
|                 <ion-label class="ion-text-wrap">
 | |
|                     <p class="item-heading">{{ course.title }}</p>
 | |
|                     <p class="item-heading item-heading-secondary" *ngIf="course.isDownloading">
 | |
|                         {{ 'core.downloading' | translate }}
 | |
|                     </p>
 | |
|                     <ion-badge color="light">
 | |
|                         {{ course.totalSize | coreBytesToSize }}
 | |
|                     </ion-badge>
 | |
|                 </ion-label>
 | |
|                 <ion-button slot="end" (click)="deleteCourse($event, course)" [disabled]="course.isDownloading" color="danger" fill="clear">
 | |
|                     <ion-icon name="fas-trash" slot="icon-only" [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate:
 | |
|                             { name: course.title }">
 | |
|                     </ion-icon>
 | |
|                 </ion-button>
 | |
|             </ion-item>
 | |
|         </ion-card>
 | |
|     </core-loading>
 | |
| </ion-content>
 |