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.notuseful": "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.deletecourses": "local_moodlemobileapp",
"addon.storagemanager.deletedata": "local_moodlemobileapp",
"addon.storagemanager.deletedatafrom": "local_moodlemobileapp",
"addon.storagemanager.info": "local_moodlemobileapp",
"addon.storagemanager.managecoursestorage": "local_moodlemobileapp",
"addon.storagemanager.managestorage": "local_moodlemobileapp",
"addon.storagemanager.storageused": "local_moodlemobileapp",
"addon.storagemanager.downloadedcourses": "local_moodlemobileapp",
"addon.storagemanager.managedownloads": "local_moodlemobileapp",
"addon.storagemanager.totaldownloads": "local_moodlemobileapp",
"addon.storagemanager.totalspaceusage": "local_moodlemobileapp",
"assets.countries.AD": "countries",
"assets.countries.AE": "countries",
"assets.countries.AF": "countries",

View File

@ -1,9 +1,13 @@
{
"deletecourse": "Offload all course data",
"deletecourses": "Offload all courses data",
"deletedatafrom": "Offload data from {{name}}",
"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.",
"managestorage": "Manage storage",
"managecoursestorage": "Manage course storage",
"storageused": "File storage used:"
"deletedata": "Delete offline data",
"deletecourse": "Delete offline data from this course",
"deletecourses": "Delete offline data from all courses",
"deletedatafrom": "Delete offline data from {{name}}",
"courseinfo": "Download course content to work offline. Your activity will sync automatically when your device is back online.",
"managedownloads": "Manage downloads",
"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-buttons>
<ion-title>
<h1>{{ 'addon.storagemanager.managecoursestorage' | translate }}</h1>
<h1>{{ 'addon.storagemanager.coursedownloads' | translate }}</h1>
</ion-title>
</ion-toolbar>
</ion-header>
@ -12,15 +12,14 @@
<core-loading [hideUntil]="loaded">
<ion-card class="wholecourse">
<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-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>
<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-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>
</ion-button>
@ -48,7 +47,7 @@
</p>
</ion-label>
<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"
[attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: section.name }">
</ion-icon>

View File

@ -4,7 +4,7 @@
<ion-back-button [text]="'core.back' | translate"></ion-back-button>
</ion-buttons>
<ion-title>
<h1>{{ 'addon.storagemanager.managestorage' | translate }}</h1>
<h1>{{ 'addon.storagemanager.managedownloads' | translate }}</h1>
</ion-title>
</ion-toolbar>
</ion-header>
@ -12,12 +12,9 @@
<core-loading [hideUntil]="loaded">
<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-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>
<p>
{{ 'core.settings.spaceusagehelp' | translate }}
@ -25,29 +22,26 @@
</ion-label>
<ion-button fill="clear" color="danger" slot="end" (click)="deleteSiteStorage()"
[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-button>
</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-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>
<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>
<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-content class="ion-no-padding">
<ion-list>
@ -61,7 +55,7 @@
{{ course.totalSize | coreBytesToSize }}
</ion-badge>
</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"
[attr.aria-label]="'addon.storagemanager.deletedatafrom' | translate: { name: course.displayname }">
</ion-icon>

View File

@ -48,8 +48,8 @@ export class AddonStorageManagerCourseMenuHandlerService implements CoreCourseOp
course: CoreCourseAnyCourseDataWithOptions,
): CoreCourseOptionsMenuHandlerData {
return {
icon: 'fas-archive',
title: 'addon.storagemanager.managecoursestorage',
icon: 'cloud-download',
title: 'addon.storagemanager.coursedownloads',
page: 'storage/' + course.id,
pageParams: {
title: course.displayname ?? course.fullname,

View File

@ -41,7 +41,7 @@ export class AddonStorageManagerSettingsHandlerService implements CoreSettingsHa
getDisplayData(): CoreSettingsHandlerData {
return {
icon: 'fas-archive',
title: 'addon.storagemanager.managestorage',
title: 'addon.storagemanager.managedownloads',
page: AddonStorageManagerSettingsHandlerService.PAGE_NAME,
class: 'addon-storagemanager-settings-handler',
};

View File

@ -9,7 +9,7 @@
*ngIf="prefetch.status == 'downloaded' || prefetch.status == 'outdated'">
<ion-icon name="fas-trash" slot="start" aria-hidden="true"></ion-icon>
<ion-label>
<h2>{{ 'addon.storagemanager.deletecourse' | translate }}</h2>
<h2>{{ 'addon.storagemanager.deletedata' | translate }}</h2>
</ion-label>
</ion-item>
<ion-item button class="ion-text-wrap" (click)="action('hide')" *ngIf="!course.hidden" detail="false">