commit
e52156f19c
|
@ -63,5 +63,13 @@ export class AddonModLabelPrefetchHandlerService extends CoreCourseResourcePrefe
|
||||||
await CoreUtils.allPromises(promises);
|
await CoreUtils.allPromises(promises);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @inheritdoc
|
||||||
|
*/
|
||||||
|
async loadContents(module: CoreCourseAnyModuleData): Promise<void> {
|
||||||
|
// Labels don't have contents.
|
||||||
|
module.contents = [];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
export const AddonModLabelPrefetchHandler = makeSingleton(AddonModLabelPrefetchHandlerService);
|
export const AddonModLabelPrefetchHandler = makeSingleton(AddonModLabelPrefetchHandlerService);
|
||||||
|
|
|
@ -71,14 +71,15 @@
|
||||||
</ion-card-header>
|
</ion-card-header>
|
||||||
<ion-card-content>
|
<ion-card-content>
|
||||||
<ng-container *ngFor="let module of section.modules">
|
<ng-container *ngFor="let module of section.modules">
|
||||||
<ion-item class="ion-no-padding"
|
<ion-item class="ion-no-padding core-course-storage-activity" *ngIf="downloadEnabled || module.totalSize > 0">
|
||||||
*ngIf="(downloadEnabled && module.handlerData?.showDownloadButton) || module.totalSize > 0">
|
|
||||||
<core-mod-icon slot="start" *ngIf="module.handlerData.icon" [modicon]="module.handlerData.icon"
|
<core-mod-icon slot="start" *ngIf="module.handlerData.icon" [modicon]="module.handlerData.icon"
|
||||||
[modname]="module.modname" [componentId]="module.instance">
|
[modname]="module.modname" [componentId]="module.instance">
|
||||||
</core-mod-icon>
|
</core-mod-icon>
|
||||||
<ion-label class="ion-text-wrap">
|
<ion-label class="ion-text-wrap">
|
||||||
<h3 class="{{module.handlerData!.class}} addon-storagemanager-module-size">
|
<h3 class="{{module.handlerData!.class}} addon-storagemanager-module-size">
|
||||||
{{ module.name }}
|
<core-format-text [text]="module.handlerData.title" [courseId]="module.course" contextLevel="module"
|
||||||
|
[contextInstanceId]="module.id" [adaptImg]="false">
|
||||||
|
</core-format-text>
|
||||||
</h3>
|
</h3>
|
||||||
<ion-badge color="light" *ngIf="module.totalSize > 0">
|
<ion-badge color="light" *ngIf="module.totalSize > 0">
|
||||||
{{ module.totalSize | coreBytesToSize }}
|
{{ module.totalSize | coreBytesToSize }}
|
||||||
|
|
|
@ -1,4 +1,9 @@
|
||||||
|
@import "~theme/globals";
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
|
--core-format-text-background-gradient-rgb: var(--background-rgb, #{$ion-item-background-rgb});
|
||||||
|
--course-storage-max-activity-height: 120px;
|
||||||
|
|
||||||
ion-card.section ion-card-header {
|
ion-card.section ion-card-header {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
|
@ -8,6 +13,22 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.core-course-storage-activity ion-label {
|
||||||
|
max-height: var(--course-storage-max-activity-height);
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
content: '';
|
||||||
|
height: 100%;
|
||||||
|
min-height: var(--course-storage-max-activity-height);
|
||||||
|
position: absolute;
|
||||||
|
@include position(0, 0, null, 0);
|
||||||
|
background: -webkit-linear-gradient(top, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 20px));
|
||||||
|
background: linear-gradient(to bottom, rgba(var(--core-format-text-background-gradient-rgb), 0) calc(100% - 30px), rgba(var(--core-format-text-background-gradient-rgb), 1) calc(100% - 20px));
|
||||||
|
z-index: 6;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.storage-buttons {
|
.storage-buttons {
|
||||||
|
|
Loading…
Reference in New Issue