@@ -48,6 +49,9 @@
{{ formattedResourceSize(download) }}
|
+
+ {{ formatDownloadRequestedDate(download) }}
+ |
{
if (activityType && activityType !== 'all') {
return download.metadata.learning_activities.includes(activityType);
@@ -227,7 +238,6 @@
return downloadsToDisplay;
},
paginatedDownloads() {
- console.log([...this.downloads]);
if (this.downloads && this.downloads.length > 0) {
const startIndex = (this.currentPage - 1) * this.itemsPerPage;
const endIndex = startIndex + this.itemsPerPage;
@@ -321,6 +331,9 @@
}
return icon;
},
+ formatDownloadRequestedDate(download) {
+ return this.$formatRelative(download.requested_at, { now: this.now });
+ },
formattedDownloadStatus(download) {
let message = '';
switch (download.status) {
@@ -330,11 +343,10 @@
case 'IN_PROGRESS':
message = this.coreString('inProgressLabel');
break;
- case 'COMPLETED' && this.now - download.requested_at < 10000:
- message = this.coreString('justNow');
- break;
case 'COMPLETED':
- message = this.$formatRelative(download.requested_at, { now: this.now });
+ /* eslint-disable kolibri/vue-no-undefined-string-uses */
+ message = ChannelContentsSummaryStrings.$tr('onDeviceRow');
+ /* eslint-enable */
break;
case 'FAILED':
if (this.sourceDeviceIsAvailable(download)) {
diff --git a/kolibri/plugins/learn/assets/src/my_downloads/views/MyDownloads.vue b/kolibri/plugins/learn/assets/src/my_downloads/views/MyDownloads.vue
index 096bec4c66f..bc9eebffca9 100644
--- a/kolibri/plugins/learn/assets/src/my_downloads/views/MyDownloads.vue
+++ b/kolibri/plugins/learn/assets/src/my_downloads/views/MyDownloads.vue
@@ -124,7 +124,7 @@
},
},
created() {
- this.startPolling();
+ this.fetchDownloads().then(this.startPolling);
},
beforeDestroy() {
clearInterval(this.pollingInterval);
|