forked from CIT/Vmeda.Online
		
	MOBILE-3954 storage: Apply UX changes to text
This commit is contained in:
		
							parent
							
								
									e97f70d1fb
								
							
						
					
					
						commit
						514b4150de
					
				@ -1104,13 +1104,17 @@
 | 
				
			|||||||
  "addon.report_insights.notapplicable": "analytics",
 | 
					  "addon.report_insights.notapplicable": "analytics",
 | 
				
			||||||
  "addon.report_insights.notuseful": "analytics",
 | 
					  "addon.report_insights.notuseful": "analytics",
 | 
				
			||||||
  "addon.report_insights.useful": "analytics",
 | 
					  "addon.report_insights.useful": "analytics",
 | 
				
			||||||
 | 
					  "addon.storagemanager.coursedownloads": "local_moodlemobileapp",
 | 
				
			||||||
 | 
					  "addon.storagemanager.courseinfo": "local_moodlemobileapp",
 | 
				
			||||||
 | 
					  "addon.storagemanager.coursesspaceusage": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.deletecourse": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.deletecourse": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.deletecourses": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.deletecourses": "local_moodlemobileapp",
 | 
				
			||||||
 | 
					  "addon.storagemanager.deletedata": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.deletedatafrom": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.deletedatafrom": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.info": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.downloadedcourses": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.managecoursestorage": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.managedownloads": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.managestorage": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.totaldownloads": "local_moodlemobileapp",
 | 
				
			||||||
  "addon.storagemanager.storageused": "local_moodlemobileapp",
 | 
					  "addon.storagemanager.totalspaceusage": "local_moodlemobileapp",
 | 
				
			||||||
  "assets.countries.AD": "countries",
 | 
					  "assets.countries.AD": "countries",
 | 
				
			||||||
  "assets.countries.AE": "countries",
 | 
					  "assets.countries.AE": "countries",
 | 
				
			||||||
  "assets.countries.AF": "countries",
 | 
					  "assets.countries.AF": "countries",
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,13 @@
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    "deletecourse": "Offload all course data",
 | 
					    "deletedata": "Delete offline data",
 | 
				
			||||||
    "deletecourses": "Offload all courses data",
 | 
					    "deletecourse": "Delete offline data from this course",
 | 
				
			||||||
    "deletedatafrom": "Offload data from {{name}}",
 | 
					    "deletecourses": "Delete offline data from all courses",
 | 
				
			||||||
    "info": "Files stored on your device make the app work faster and enable the app to be used offline. You can safely offload files if you need to free up storage space.",
 | 
					    "deletedatafrom": "Delete offline data from {{name}}",
 | 
				
			||||||
    "managestorage": "Manage storage",
 | 
					    "courseinfo": "Download course content to work offline. Your activity will sync automatically when your device is back online.",
 | 
				
			||||||
    "managecoursestorage": "Manage course storage",
 | 
					    "managedownloads": "Manage downloads",
 | 
				
			||||||
    "storageused": "File storage used:"
 | 
					    "coursedownloads": "Course downloads",
 | 
				
			||||||
 | 
					    "totaldownloads": "Total downloads",
 | 
				
			||||||
 | 
					    "totalspaceusage": "Total space usage",
 | 
				
			||||||
 | 
					    "coursesspaceusage": "Courses space usage",
 | 
				
			||||||
 | 
					    "downloadedcourses": "Downloaded courses"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
					            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
				
			||||||
        </ion-buttons>
 | 
					        </ion-buttons>
 | 
				
			||||||
        <ion-title>
 | 
					        <ion-title>
 | 
				
			||||||
            <h1>{{ 'addon.storagemanager.managecoursestorage' | translate }}</h1>
 | 
					            <h1>{{ 'addon.storagemanager.coursedownloads' | translate }}</h1>
 | 
				
			||||||
        </ion-title>
 | 
					        </ion-title>
 | 
				
			||||||
    </ion-toolbar>
 | 
					    </ion-toolbar>
 | 
				
			||||||
</ion-header>
 | 
					</ion-header>
 | 
				
			||||||
@ -12,15 +12,14 @@
 | 
				
			|||||||
    <core-loading [hideUntil]="loaded">
 | 
					    <core-loading [hideUntil]="loaded">
 | 
				
			||||||
        <ion-card class="wholecourse">
 | 
					        <ion-card class="wholecourse">
 | 
				
			||||||
            <ion-card-header>
 | 
					            <ion-card-header>
 | 
				
			||||||
                <p class="ion-text-wrap">{{ 'addon.storagemanager.info' | translate }}</p>
 | 
					                <p class="ion-text-wrap ion-no-margin">{{ 'addon.storagemanager.courseinfo' | translate }}</p>
 | 
				
			||||||
                <ion-card-title>{{ title }}</ion-card-title>
 | 
					                <ion-card-title>{{ title }}</ion-card-title>
 | 
				
			||||||
                <ion-item class="size ion-text-wrap ion-no-padding" lines="none">
 | 
					                <ion-item class="size ion-text-wrap ion-no-padding" lines="none">
 | 
				
			||||||
                    <ion-icon name="fas-archive" slot="start" aria-hidden="true"></ion-icon>
 | 
					 | 
				
			||||||
                    <ion-label>
 | 
					                    <ion-label>
 | 
				
			||||||
                        <p class="item-heading ion-text-wrap">{{ 'addon.storagemanager.storageused' | translate }}</p>
 | 
					                        <p class="item-heading ion-text-wrap">{{ 'addon.storagemanager.totaldownloads' | translate }}</p>
 | 
				
			||||||
                        <ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
 | 
					                        <ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
 | 
				
			||||||
                    </ion-label>
 | 
					                    </ion-label>
 | 
				
			||||||
                    <ion-button slot="end" (click)="deleteForCourse()" [disabled]="totalSize == 0" color="danger">
 | 
					                    <ion-button slot="end" (click)="deleteForCourse()" [disabled]="totalSize == 0" color="danger" fill="outline">
 | 
				
			||||||
                        <ion-icon name="fas-trash" slot="icon-only" [attr.aria-label]="'addon.storagemanager.deletecourse' | translate">
 | 
					                        <ion-icon name="fas-trash" slot="icon-only" [attr.aria-label]="'addon.storagemanager.deletecourse' | translate">
 | 
				
			||||||
                        </ion-icon>
 | 
					                        </ion-icon>
 | 
				
			||||||
                    </ion-button>
 | 
					                    </ion-button>
 | 
				
			||||||
@ -48,7 +47,7 @@
 | 
				
			|||||||
                            </p>
 | 
					                            </p>
 | 
				
			||||||
                        </ion-label>
 | 
					                        </ion-label>
 | 
				
			||||||
                        <div class="storage-buttons" slot="end" *ngIf="section.totalSize > 0 || downloadEnabled">
 | 
					                        <div class="storage-buttons" slot="end" *ngIf="section.totalSize > 0 || downloadEnabled">
 | 
				
			||||||
                            <ion-button (click)="deleteForSection(section)" *ngIf="section.totalSize > 0" color="danger">
 | 
					                            <ion-button (click)="deleteForSection(section)" *ngIf="section.totalSize > 0" color="danger" fill="outline">
 | 
				
			||||||
                                <ion-icon name="fas-trash" slot="icon-only"
 | 
					                                <ion-icon name="fas-trash" slot="icon-only"
 | 
				
			||||||
                                    [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: section.name }">
 | 
					                                    [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: section.name }">
 | 
				
			||||||
                                </ion-icon>
 | 
					                                </ion-icon>
 | 
				
			||||||
 | 
				
			|||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
					            <ion-back-button [text]="'core.back' | translate"></ion-back-button>
 | 
				
			||||||
        </ion-buttons>
 | 
					        </ion-buttons>
 | 
				
			||||||
        <ion-title>
 | 
					        <ion-title>
 | 
				
			||||||
            <h1>{{ 'addon.storagemanager.managestorage' | translate }}</h1>
 | 
					            <h1>{{ 'addon.storagemanager.managedownloads' | translate }}</h1>
 | 
				
			||||||
        </ion-title>
 | 
					        </ion-title>
 | 
				
			||||||
    </ion-toolbar>
 | 
					    </ion-toolbar>
 | 
				
			||||||
</ion-header>
 | 
					</ion-header>
 | 
				
			||||||
@ -12,12 +12,9 @@
 | 
				
			|||||||
    <core-loading [hideUntil]="loaded">
 | 
					    <core-loading [hideUntil]="loaded">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <ion-card>
 | 
					        <ion-card>
 | 
				
			||||||
            <ion-item class="ion-text-wrap">
 | 
					 | 
				
			||||||
                <ion-label>{{ 'addon.storagemanager.info' | translate }}</ion-label>
 | 
					 | 
				
			||||||
            </ion-item>
 | 
					 | 
				
			||||||
            <ion-item class="ion-text-wrap" *ngIf="spaceUsage">
 | 
					            <ion-item class="ion-text-wrap" *ngIf="spaceUsage">
 | 
				
			||||||
                <ion-label>
 | 
					                <ion-label>
 | 
				
			||||||
                    <p class="item-heading ion-text-wrap">{{ 'core.settings.spaceusage' | translate }}</p>
 | 
					                    <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-badge color="light" *ngIf="spaceUsage.spaceUsage">{{ spaceUsage.spaceUsage | coreBytesToSize }}</ion-badge>
 | 
				
			||||||
                    <p>
 | 
					                    <p>
 | 
				
			||||||
                        {{ 'core.settings.spaceusagehelp' | translate }}
 | 
					                        {{ 'core.settings.spaceusagehelp' | translate }}
 | 
				
			||||||
@ -25,29 +22,26 @@
 | 
				
			|||||||
                </ion-label>
 | 
					                </ion-label>
 | 
				
			||||||
                <ion-button fill="clear" color="danger" slot="end" (click)="deleteSiteStorage()"
 | 
					                <ion-button fill="clear" color="danger" slot="end" (click)="deleteSiteStorage()"
 | 
				
			||||||
                    [hidden]="spaceUsage.spaceUsage! + spaceUsage.cacheEntries! <= 0"
 | 
					                    [hidden]="spaceUsage.spaceUsage! + spaceUsage.cacheEntries! <= 0"
 | 
				
			||||||
                    [attr.aria-label]="'core.settings.deletesitefilestitle' | translate">
 | 
					                    [attr.aria-label]="'core.settings.deletesitefilestitle' | translate" fill="outline">
 | 
				
			||||||
                    <ion-icon name="fas-trash" slot="icon-only" aria-hidden="true"></ion-icon>
 | 
					                    <ion-icon name="fas-trash" slot="icon-only" aria-hidden="true"></ion-icon>
 | 
				
			||||||
                </ion-button>
 | 
					                </ion-button>
 | 
				
			||||||
            </ion-item>
 | 
					            </ion-item>
 | 
				
			||||||
 | 
					            <ion-item class="size ion-text-wrap" lines="none">
 | 
				
			||||||
 | 
					                <ion-label>
 | 
				
			||||||
 | 
					                    <h2 class="ion-text-wrap">{{ 'addon.storagemanager.coursesspaceusage' | translate }}</h2>
 | 
				
			||||||
 | 
					                    <ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
 | 
				
			||||||
 | 
					                </ion-label>
 | 
				
			||||||
 | 
					                <ion-button slot="end" (click)="deleteCompletelyDownloadedCourses()" [disabled]="completelyDownloadedCourses.length === 0"
 | 
				
			||||||
 | 
					                    color="danger" fill="outline">
 | 
				
			||||||
 | 
					                    <ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}">
 | 
				
			||||||
 | 
					                    </ion-icon>
 | 
				
			||||||
 | 
					                </ion-button>
 | 
				
			||||||
 | 
					            </ion-item>
 | 
				
			||||||
        </ion-card>
 | 
					        </ion-card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        <ion-card>
 | 
					        <div class="ion-padding-horizontal ion-text-wrap" *ngIf="downloadedCourses.length">
 | 
				
			||||||
            <ion-card-header>
 | 
					            <h2>{{ 'addon.storagemanager.downloadedcourses' | translate }}</h2>
 | 
				
			||||||
                <ion-card-title class="ion-text-wrap">{{ 'core.courses.courses' | translate }}</ion-card-title>
 | 
					        </div>
 | 
				
			||||||
                <ion-item class="size ion-text-wrap ion-no-padding" lines="none">
 | 
					 | 
				
			||||||
                    <ion-label>
 | 
					 | 
				
			||||||
                        <h2 class="ion-text-wrap">{{ 'addon.storagemanager.storageused' | translate }}</h2>
 | 
					 | 
				
			||||||
                        <ion-badge color="light">{{ totalSize | coreBytesToSize }}</ion-badge>
 | 
					 | 
				
			||||||
                    </ion-label>
 | 
					 | 
				
			||||||
                    <ion-button slot="end" (click)="deleteCompletelyDownloadedCourses()"
 | 
					 | 
				
			||||||
                        [disabled]="completelyDownloadedCourses.length === 0" color="danger">
 | 
					 | 
				
			||||||
                        <ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}">
 | 
					 | 
				
			||||||
                        </ion-icon>
 | 
					 | 
				
			||||||
                    </ion-button>
 | 
					 | 
				
			||||||
                </ion-item>
 | 
					 | 
				
			||||||
            </ion-card-header>
 | 
					 | 
				
			||||||
        </ion-card>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        <ion-card *ngIf="downloadedCourses.length">
 | 
					        <ion-card *ngIf="downloadedCourses.length">
 | 
				
			||||||
            <ion-card-content class="ion-no-padding">
 | 
					            <ion-card-content class="ion-no-padding">
 | 
				
			||||||
                <ion-list>
 | 
					                <ion-list>
 | 
				
			||||||
@ -61,7 +55,7 @@
 | 
				
			|||||||
                                {{ course.totalSize | coreBytesToSize }}
 | 
					                                {{ course.totalSize | coreBytesToSize }}
 | 
				
			||||||
                            </ion-badge>
 | 
					                            </ion-badge>
 | 
				
			||||||
                        </ion-label>
 | 
					                        </ion-label>
 | 
				
			||||||
                        <ion-button slot="end" (click)="deleteCourse(course)" [disabled]="course.isDownloading" color="danger">
 | 
					                        <ion-button slot="end" (click)="deleteCourse(course)" [disabled]="course.isDownloading" color="danger" fill="clear">
 | 
				
			||||||
                            <ion-icon name="fas-trash" slot="icon-only"
 | 
					                            <ion-icon name="fas-trash" slot="icon-only"
 | 
				
			||||||
                                [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: course.displayname }">
 | 
					                                [attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: course.displayname }">
 | 
				
			||||||
                            </ion-icon>
 | 
					                            </ion-icon>
 | 
				
			||||||
 | 
				
			|||||||
@ -48,8 +48,8 @@ export class AddonStorageManagerCourseMenuHandlerService implements CoreCourseOp
 | 
				
			|||||||
        course: CoreCourseAnyCourseDataWithOptions,
 | 
					        course: CoreCourseAnyCourseDataWithOptions,
 | 
				
			||||||
    ): CoreCourseOptionsMenuHandlerData {
 | 
					    ): CoreCourseOptionsMenuHandlerData {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            icon: 'fas-archive',
 | 
					            icon: 'cloud-download',
 | 
				
			||||||
            title: 'addon.storagemanager.managecoursestorage',
 | 
					            title: 'addon.storagemanager.coursedownloads',
 | 
				
			||||||
            page: 'storage/' + course.id,
 | 
					            page: 'storage/' + course.id,
 | 
				
			||||||
            pageParams: {
 | 
					            pageParams: {
 | 
				
			||||||
                title: course.displayname ?? course.fullname,
 | 
					                title: course.displayname ?? course.fullname,
 | 
				
			||||||
 | 
				
			|||||||
@ -41,7 +41,7 @@ export class AddonStorageManagerSettingsHandlerService implements CoreSettingsHa
 | 
				
			|||||||
    getDisplayData(): CoreSettingsHandlerData {
 | 
					    getDisplayData(): CoreSettingsHandlerData {
 | 
				
			||||||
        return {
 | 
					        return {
 | 
				
			||||||
            icon: 'fas-archive',
 | 
					            icon: 'fas-archive',
 | 
				
			||||||
            title: 'addon.storagemanager.managestorage',
 | 
					            title: 'addon.storagemanager.managedownloads',
 | 
				
			||||||
            page: AddonStorageManagerSettingsHandlerService.PAGE_NAME,
 | 
					            page: AddonStorageManagerSettingsHandlerService.PAGE_NAME,
 | 
				
			||||||
            class: 'addon-storagemanager-settings-handler',
 | 
					            class: 'addon-storagemanager-settings-handler',
 | 
				
			||||||
        };
 | 
					        };
 | 
				
			||||||
 | 
				
			|||||||
@ -9,7 +9,7 @@
 | 
				
			|||||||
    *ngIf="prefetch.status == 'downloaded' || prefetch.status == 'outdated'">
 | 
					    *ngIf="prefetch.status == 'downloaded' || prefetch.status == 'outdated'">
 | 
				
			||||||
    <ion-icon name="fas-trash" slot="start" aria-hidden="true"></ion-icon>
 | 
					    <ion-icon name="fas-trash" slot="start" aria-hidden="true"></ion-icon>
 | 
				
			||||||
    <ion-label>
 | 
					    <ion-label>
 | 
				
			||||||
        <h2>{{ 'addon.storagemanager.deletecourse' | translate }}</h2>
 | 
					        <h2>{{ 'addon.storagemanager.deletedata' | translate }}</h2>
 | 
				
			||||||
    </ion-label>
 | 
					    </ion-label>
 | 
				
			||||||
</ion-item>
 | 
					</ion-item>
 | 
				
			||||||
<ion-item button class="ion-text-wrap" (click)="action('hide')" *ngIf="!course.hidden" detail="false">
 | 
					<ion-item button class="ion-text-wrap" (click)="action('hide')" *ngIf="!course.hidden" detail="false">
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user