MOBILE-3954 storage: Apply UX changes to text

main
Pau Ferrer Ocaña 2022-02-02 15:20:21 +01:00
parent e97f70d1fb
commit 514b4150de
7 changed files with 46 additions and 45 deletions

View File

@ -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",

View File

@ -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"
} }

View File

@ -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>

View File

@ -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-card> <ion-item class="size ion-text-wrap" lines="none">
<ion-card>
<ion-card-header>
<ion-card-title class="ion-text-wrap">{{ 'core.courses.courses' | translate }}</ion-card-title>
<ion-item class="size ion-text-wrap ion-no-padding" lines="none">
<ion-label> <ion-label>
<h2 class="ion-text-wrap">{{ 'addon.storagemanager.storageused' | translate }}</h2> <h2 class="ion-text-wrap">{{ 'addon.storagemanager.coursesspaceusage' | translate }}</h2>
<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)="deleteCompletelyDownloadedCourses()" <ion-button slot="end" (click)="deleteCompletelyDownloadedCourses()" [disabled]="completelyDownloadedCourses.length === 0"
[disabled]="completelyDownloadedCourses.length === 0" color="danger"> color="danger" fill="outline">
<ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}"> <ion-icon name="fas-trash" slot="icon-only" ariaLabel="{{ 'addon.storagemanager.deletecourses' | translate }}">
</ion-icon> </ion-icon>
</ion-button> </ion-button>
</ion-item> </ion-item>
</ion-card-header>
</ion-card> </ion-card>
<div class="ion-padding-horizontal ion-text-wrap" *ngIf="downloadedCourses.length">
<h2>{{ 'addon.storagemanager.downloadedcourses' | translate }}</h2>
</div>
<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>

View File

@ -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,

View File

@ -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',
}; };

View File

@ -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">