From 97a8dc3f7a94439f530c1e83d703f96cae15851a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 17 Feb 2022 13:58:10 +0100 Subject: [PATCH] MOBILE-3931 module: Improve module summary style --- scripts/langindex.json | 1 + .../index/addon-mod-assign-index.html | 2 +- .../components/index/index.html | 2 +- .../index/addon-mod-book-index.html | 2 +- .../index/addon-mod-chat-index.html | 2 +- .../index/addon-mod-choice-index.html | 2 +- .../index/addon-mod-data-index.html | 2 +- src/addons/mod/data/components/index/index.ts | 2 +- .../index/addon-mod-feedback-index.html | 2 +- .../index/addon-mod-folder-index.html | 2 +- .../mod/forum/components/index/index.html | 2 +- .../index/addon-mod-glossary-index.html | 2 +- .../index/addon-mod-h5pactivity-index.html | 2 +- .../index/addon-mod-imscp-index.html | 2 +- .../index/addon-mod-lesson-index.html | 2 +- .../mod/lesson/components/index/index.ts | 1 - .../components/index/addon-mod-lti-index.html | 2 +- .../index/addon-mod-page-index.html | 2 +- .../index/addon-mod-quiz-index.html | 2 +- .../index/addon-mod-resource-index.html | 2 +- .../index/addon-mod-scorm-index.html | 2 +- .../index/addon-mod-survey-index.html | 2 +- .../components/index/addon-mod-url-index.html | 2 +- .../index/addon-mod-wiki-index.html | 2 +- .../index/addon-mod-workshop-index.html | 2 +- src/addons/storagemanager/lang.json | 1 + .../course/classes/main-resource-component.ts | 22 ++--- .../module-summary/module-summary.html | 87 ++++++++++++------- .../module-summary/module-summary.scss | 16 ++++ .../module-summary/module-summary.ts | 46 +++++----- .../features/course/services/course-helper.ts | 2 - .../core-courses-course-list-item.html | 5 +- .../features/grades/pages/course/course.scss | 4 +- .../features/grades/services/grades-helper.ts | 2 +- .../components/module-index/module-index.ts | 10 +-- src/theme/theme.base.scss | 5 ++ 36 files changed, 137 insertions(+), 111 deletions(-) diff --git a/scripts/langindex.json b/scripts/langindex.json index 59d395a92..e1beb3757 100644 --- a/scripts/langindex.json +++ b/scripts/langindex.json @@ -1114,6 +1114,7 @@ "addon.storagemanager.deletedata": "local_moodlemobileapp", "addon.storagemanager.deletedatafrom": "local_moodlemobileapp", "addon.storagemanager.downloadedcourses": "local_moodlemobileapp", + "addon.storagemanager.downloads": "local_moodlemobileapp", "addon.storagemanager.errordeletedownloadeddata": "local_moodlemobileapp", "addon.storagemanager.managedownloads": "local_moodlemobileapp", "addon.storagemanager.totaldownloads": "local_moodlemobileapp", diff --git a/src/addons/mod/assign/components/index/addon-mod-assign-index.html b/src/addons/mod/assign/components/index/addon-mod-assign-index.html index 69b0d2d25..44fce0030 100644 --- a/src/addons/mod/assign/components/index/addon-mod-assign-index.html +++ b/src/addons/mod/assign/components/index/addon-mod-assign-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/bigbluebuttonbn/components/index/index.html b/src/addons/mod/bigbluebuttonbn/components/index/index.html index e46bb4a56..49ebe332d 100644 --- a/src/addons/mod/bigbluebuttonbn/components/index/index.html +++ b/src/addons/mod/bigbluebuttonbn/components/index/index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/book/components/index/addon-mod-book-index.html b/src/addons/mod/book/components/index/addon-mod-book-index.html index c673defcf..f8d3545b6 100644 --- a/src/addons/mod/book/components/index/addon-mod-book-index.html +++ b/src/addons/mod/book/components/index/addon-mod-book-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/chat/components/index/addon-mod-chat-index.html b/src/addons/mod/chat/components/index/addon-mod-chat-index.html index 43db1e541..47f13bd8c 100644 --- a/src/addons/mod/chat/components/index/addon-mod-chat-index.html +++ b/src/addons/mod/chat/components/index/addon-mod-chat-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/choice/components/index/addon-mod-choice-index.html b/src/addons/mod/choice/components/index/addon-mod-choice-index.html index 15cdfbec4..e29970de6 100644 --- a/src/addons/mod/choice/components/index/addon-mod-choice-index.html +++ b/src/addons/mod/choice/components/index/addon-mod-choice-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/data/components/index/addon-mod-data-index.html b/src/addons/mod/data/components/index/addon-mod-data-index.html index a80142873..59f79533d 100644 --- a/src/addons/mod/data/components/index/addon-mod-data-index.html +++ b/src/addons/mod/data/components/index/addon-mod-data-index.html @@ -12,7 +12,7 @@ - + diff --git a/src/addons/mod/data/components/index/index.ts b/src/addons/mod/data/components/index/index.ts index 543cceeda..9bdb523fe 100644 --- a/src/addons/mod/data/components/index/index.ts +++ b/src/addons/mod/data/components/index/index.ts @@ -296,7 +296,7 @@ export class AddonModDataIndexComponent extends CoreCourseModuleMainActivityComp this.hasNextPage = numEntries >= AddonModDataProvider.PER_PAGE && ((this.search.page + 1) * AddonModDataProvider.PER_PAGE) < entries.totalcount; - this.hasOffline = entries.hasOfflineActions; + this.hasOffline = !!entries.hasOfflineActions; this.hasOfflineRatings = !!entries.hasOfflineRatings; diff --git a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html index eb54799b8..f564311d8 100644 --- a/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html +++ b/src/addons/mod/feedback/components/index/addon-mod-feedback-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/folder/components/index/addon-mod-folder-index.html b/src/addons/mod/folder/components/index/addon-mod-folder-index.html index e50f4f51b..b01b72741 100644 --- a/src/addons/mod/folder/components/index/addon-mod-folder-index.html +++ b/src/addons/mod/folder/components/index/addon-mod-folder-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/forum/components/index/index.html b/src/addons/mod/forum/components/index/index.html index f6d887a7f..a7a5afbdc 100644 --- a/src/addons/mod/forum/components/index/index.html +++ b/src/addons/mod/forum/components/index/index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/glossary/components/index/addon-mod-glossary-index.html b/src/addons/mod/glossary/components/index/addon-mod-glossary-index.html index 05414fc94..524abb9b1 100644 --- a/src/addons/mod/glossary/components/index/addon-mod-glossary-index.html +++ b/src/addons/mod/glossary/components/index/addon-mod-glossary-index.html @@ -9,7 +9,7 @@ - + diff --git a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html index fc7dfb9ed..039f30ce2 100644 --- a/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html +++ b/src/addons/mod/h5pactivity/components/index/addon-mod-h5pactivity-index.html @@ -10,7 +10,7 @@ - + diff --git a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html index a8d3096cf..d795fb3fe 100644 --- a/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html +++ b/src/addons/mod/imscp/components/index/addon-mod-imscp-index.html @@ -4,7 +4,7 @@ - + diff --git a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html index 350ed2e21..cb63e1d65 100644 --- a/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html +++ b/src/addons/mod/lesson/components/index/addon-mod-lesson-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/lesson/components/index/index.ts b/src/addons/mod/lesson/components/index/index.ts index c449a9fe9..1a9e8b614 100644 --- a/src/addons/mod/lesson/components/index/index.ts +++ b/src/addons/mod/lesson/components/index/index.ts @@ -73,7 +73,6 @@ export class AddonModLessonIndexComponent extends CoreCourseModuleMainActivityCo canManage?: boolean; // Whether the user can manage the lesson. canViewReports?: boolean; // Whether the user can view the lesson reports. showSpinner?: boolean; // Whether to display a spinner. - hasOffline?: boolean; // Whether there's offline data. retakeToReview?: AddonModLessonRetakeFinishedInSyncDBRecord; // A retake to review. preventReasons: AddonModLessonPreventAccessReason[] = []; // List of reasons that prevent the lesson from being seen. leftDuringTimed?: boolean; // Whether the user has started and left a retake. diff --git a/src/addons/mod/lti/components/index/addon-mod-lti-index.html b/src/addons/mod/lti/components/index/addon-mod-lti-index.html index 9892dd3ae..dc3b6068d 100644 --- a/src/addons/mod/lti/components/index/addon-mod-lti-index.html +++ b/src/addons/mod/lti/components/index/addon-mod-lti-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/page/components/index/addon-mod-page-index.html b/src/addons/mod/page/components/index/addon-mod-page-index.html index e17fa3571..1cfc5f303 100644 --- a/src/addons/mod/page/components/index/addon-mod-page-index.html +++ b/src/addons/mod/page/components/index/addon-mod-page-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html index 4f6ec82f8..6323f3cb5 100644 --- a/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html +++ b/src/addons/mod/quiz/components/index/addon-mod-quiz-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/resource/components/index/addon-mod-resource-index.html b/src/addons/mod/resource/components/index/addon-mod-resource-index.html index a299d9a31..89fbf28f7 100644 --- a/src/addons/mod/resource/components/index/addon-mod-resource-index.html +++ b/src/addons/mod/resource/components/index/addon-mod-resource-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html index 0fa5c17a4..275c81125 100644 --- a/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html +++ b/src/addons/mod/scorm/components/index/addon-mod-scorm-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/survey/components/index/addon-mod-survey-index.html b/src/addons/mod/survey/components/index/addon-mod-survey-index.html index dedf029c9..6f08add31 100644 --- a/src/addons/mod/survey/components/index/addon-mod-survey-index.html +++ b/src/addons/mod/survey/components/index/addon-mod-survey-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/url/components/index/addon-mod-url-index.html b/src/addons/mod/url/components/index/addon-mod-url-index.html index 8b531ded4..ccf09a1a2 100644 --- a/src/addons/mod/url/components/index/addon-mod-url-index.html +++ b/src/addons/mod/url/components/index/addon-mod-url-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/mod/wiki/components/index/addon-mod-wiki-index.html b/src/addons/mod/wiki/components/index/addon-mod-wiki-index.html index de251b747..462d5a1b4 100644 --- a/src/addons/mod/wiki/components/index/addon-mod-wiki-index.html +++ b/src/addons/mod/wiki/components/index/addon-mod-wiki-index.html @@ -21,7 +21,7 @@ - + diff --git a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html index 9ff979bf8..f24b28232 100644 --- a/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html +++ b/src/addons/mod/workshop/components/index/addon-mod-workshop-index.html @@ -1,6 +1,6 @@ - + diff --git a/src/addons/storagemanager/lang.json b/src/addons/storagemanager/lang.json index 84988fe0d..93476bbf6 100644 --- a/src/addons/storagemanager/lang.json +++ b/src/addons/storagemanager/lang.json @@ -11,6 +11,7 @@ "deletedata": "Delete downloaded data", "deletedatafrom": "Delete all downloaded data from '{{name}}'", "downloadedcourses": "Downloaded courses", + "downloads": "Downloads", "errordeletedownloadeddata": "Error deleting downloaded data.", "managedownloads": "Manage downloads", "totaldownloads": "Total downloads", diff --git a/src/core/features/course/classes/main-resource-component.ts b/src/core/features/course/classes/main-resource-component.ts index edbcd1680..6536145e0 100644 --- a/src/core/features/course/classes/main-resource-component.ts +++ b/src/core/features/course/classes/main-resource-component.ts @@ -115,7 +115,7 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, * @return Promise resolved when done. */ async doRefresh(refresher?: IonRefresher | null, showErrors = false): Promise { - if (!this.loaded || !this.module) { + if (!this.module) { // Module can be undefined if course format changes from single activity to weekly/topics. return; } @@ -224,7 +224,7 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, const lastDownloaded = await CoreCourseHelper.getModulePackageLastDownloaded(this.module, this.component); - this.downloadTimeReadable = lastDownloaded.downloadTimeReadable; + this.downloadTimeReadable = CoreTextUtils.ucFirst(lastDownloaded.downloadTimeReadable); } /** @@ -416,24 +416,14 @@ export class CoreCourseModuleMainResourceComponent implements OnInit, OnDestroy, }); if (data) { - if (data.action == 'refresh') { - const modal = await CoreDomUtils.showModalLoading(); - + if (this.loaded && (data.action == 'refresh' || data.action == 'sync')) { + this.loaded = false; try { - await this.doRefresh(); + await this.doRefresh(undefined, data.action == 'sync'); } finally { - modal.dismiss(); - } - } else if (data.action == 'sync') { - const modal = await CoreDomUtils.showModalLoading(); - - try { - await this.doRefresh( undefined, true); - } finally { - modal.dismiss(); + this.loaded = true; } } - } } diff --git a/src/core/features/course/components/module-summary/module-summary.html b/src/core/features/course/components/module-summary/module-summary.html index e77abac35..820e944ef 100644 --- a/src/core/features/course/components/module-summary/module-summary.html +++ b/src/core/features/course/components/module-summary/module-summary.html @@ -11,8 +11,13 @@ - + +

+ + + {{moduleNameTranslated}} +

@@ -25,9 +30,12 @@ - + -

{{ 'core.course' | translate}}

+

+ + {{ 'core.course' | translate}} +

@@ -35,44 +43,60 @@ - + +

+ {{ 'core.description' | translate}} +

- - -

{{ prefetchText }}

-

{{ downloadTimeReadable }}

-
- - + + + +

+ + {{ 'addon.storagemanager.downloads' | translate }} +

+
+
+ + +

{{ 'addon.storagemanager.totalspaceusage' | translate }}

+ {{ sizeReadable | coreBytesToSize }} +
+ + + + +
+ + +

{{ 'core.lastdownloaded' | translate }} {{ downloadTimeReadable }}

+
+
+ + + + + {{ 'core.download' | translate }} + - -
- - - -

{{ 'addon.storagemanager.totalspaceusage' | translate }}

- {{ sizeReadable | coreBytesToSize }} -
- - - - -
+ -

{{ 'core.grades.gradebook' | translate }}

+

+ {{ 'core.grades.gradebook' | translate + }} +

@@ -90,7 +114,8 @@

{{ 'core.grades.grade' | translate}}

-

+

+ Not graded @@ -163,12 +188,12 @@
- + {{ 'addon.blog.blog' | translate }} - +
diff --git a/src/core/features/course/components/module-summary/module-summary.scss b/src/core/features/course/components/module-summary/module-summary.scss index fb9664764..59ce443d5 100644 --- a/src/core/features/course/components/module-summary/module-summary.scss +++ b/src/core/features/course/components/module-summary/module-summary.scss @@ -1,3 +1,4 @@ +@import "~theme/globals"; :host ::ng-deep .collapsible-title ion-label { margin-top: 12px; @@ -6,3 +7,18 @@ h1 { font-size: 20px; } + +.core-modulename { + text-transform: uppercase; + core-mod-icon { + padding: 3px; + --size: 10px; + margin: 0; + } +} + + +ion-item ion-label ion-icon { + @include margin-horizontal(0, 4px); + vertical-align: text-top; +} diff --git a/src/core/features/course/components/module-summary/module-summary.ts b/src/core/features/course/components/module-summary/module-summary.ts index f66609555..a82c4801c 100644 --- a/src/core/features/course/components/module-summary/module-summary.ts +++ b/src/core/features/course/components/module-summary/module-summary.ts @@ -30,7 +30,7 @@ import { CoreSites } from '@services/sites'; import { CoreDomUtils } from '@services/utils/dom'; import { CoreTextUtils } from '@services/utils/text'; import { CoreUtils } from '@services/utils/utils'; -import { ModalController, Network, Translate, NgZone } from '@singletons'; +import { ModalController, Network, NgZone } from '@singletons'; import { CoreEventObserver, CoreEvents } from '@singletons/events'; import { Subscription } from 'rxjs'; @@ -59,16 +59,17 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { externalUrl?: string; // External URL to open in browser. removeFilesLoading = false; - prefetchStatusIcon?: string; - prefetchStatus?: string; - prefetchText?: string; - sizeReadable?: string; - downloadTimeReadable?: string; // Last download time in a readable format. - size = 0; + prefetchLoading = false; + canPrefetch = false;; + prefetchDisabled = false; + sizeReadable = ''; + downloadTimeReadable = ''; // Last download time in a readable format. grades?: CoreGradesFormattedRow[]; blog = false; // If blog is available. isOnline = false; // If the app is online or not. course?: CoreEnrolledCourseData; + modicon = ''; + moduleNameTranslated = ''; protected onlineSubscription: Subscription; // It will observe the status of the network connection. protected packageStatusObserver?: CoreEventObserver; // Observer of package status. @@ -172,6 +173,9 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { this.externalUrl = this.module.url; this.courseId = this.courseId || this.module.course; + this.modicon = await CoreCourseModuleDelegate.getModuleIconSrc(this.module.modname, this.module.modicon, this.module); + this.moduleNameTranslated = CoreCourse.translateModuleName(this.module.modname || ''); + this.blog = await AddonBlog.isPluginEnabled(); await Promise.all([ @@ -196,27 +200,20 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { const moduleInfo = await CoreCourseHelper.getModulePrefetchInfo(this.module, this.courseId, refresh, this.component); - this.prefetchStatusIcon = moduleInfo.statusIcon; - this.prefetchStatus = moduleInfo.status; + this.canPrefetch = moduleInfo.status != CoreConstants.NOT_DOWNLOADABLE; this.downloadTimeReadable = ''; - if (moduleInfo.status != CoreConstants.NOT_DOWNLOADABLE) { - // Module is downloadable, get the text to display to prefetch. + if (this.canPrefetch) { if (moduleInfo.downloadTime && moduleInfo.downloadTime > 0) { - this.prefetchText = Translate.instant('core.lastdownloaded'); this.downloadTimeReadable = CoreTextUtils.ucFirst(moduleInfo.downloadTimeReadable); - } else { - // Module not downloaded, show a default text. - this.prefetchText = Translate.instant('core.download'); } + this.prefetchLoading = moduleInfo.status == CoreConstants.DOWNLOADING; + this.prefetchDisabled = moduleInfo.status == CoreConstants.DOWNLOADED; } - this.sizeReadable = moduleInfo.sizeReadable; - this.size = moduleInfo.size; - if (moduleInfo.status == CoreConstants.DOWNLOADING) { - // Set this to empty to prevent "remove file" option showing up while downloading. - this.sizeReadable = ''; - } + this.sizeReadable = moduleInfo.size && moduleInfo.size > 0 + ? moduleInfo.sizeReadable + : ''; } /** @@ -280,8 +277,7 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { return; } - const initialIcon = this.prefetchStatusIcon; - this.prefetchStatusIcon = CoreConstants.ICON_DOWNLOADING; // Show spinner since this operation might take a while. + this.prefetchLoading = true; // Show spinner since this operation might take a while. try { // We need to call getDownloadSize, the package might have been updated. @@ -293,7 +289,7 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { await this.getPackageStatus(true); } catch (error) { - this.prefetchStatusIcon = initialIcon; + this.prefetchLoading = false; if (!this.isDestroyed) { CoreDomUtils.showErrorModalDefault(error, 'core.errordownloading', true); @@ -309,7 +305,7 @@ export class CoreCourseModuleSummaryComponent implements OnInit, OnDestroy { return; } - if (this.prefetchStatus == CoreConstants.DOWNLOADING) { + if (this.prefetchLoading) { CoreDomUtils.showAlertTranslated(undefined, 'core.course.cannotdeletewhiledownloading'); return; diff --git a/src/core/features/course/services/course-helper.ts b/src/core/features/course/services/course-helper.ts index 4c807d5e1..e14cae7f0 100644 --- a/src/core/features/course/services/course-helper.ts +++ b/src/core/features/course/services/course-helper.ts @@ -1426,8 +1426,6 @@ export class CoreCourseHelperProvider { downloadTimeReadable = moment(downloadTime * 1000).calendar(); } - downloadTimeReadable = CoreTextUtils.ucFirst(downloadTimeReadable); - return { downloadTime, downloadTimeReadable, diff --git a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html index 51cb1e650..c63576239 100644 --- a/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html +++ b/src/core/features/courses/components/course-list-item/core-courses-course-list-item.html @@ -4,7 +4,7 @@
- +
@@ -31,7 +31,8 @@ [class.item-disabled]="course.visible == 0"> - + diff --git a/src/core/features/grades/pages/course/course.scss b/src/core/features/grades/pages/course/course.scss index 32bb2b00a..1d73d15e2 100644 --- a/src/core/features/grades/pages/course/course.scss +++ b/src/core/features/grades/pages/course/course.scss @@ -80,8 +80,8 @@ } core-mod-icon { - padding: 0.1rem; - --size: 16px; + padding: 3px; + --size: 10px; } diff --git a/src/core/features/grades/services/grades-helper.ts b/src/core/features/grades/services/grades-helper.ts index 1a827ce7d..cff4e9b98 100644 --- a/src/core/features/grades/services/grades-helper.ts +++ b/src/core/features/grades/services/grades-helper.ts @@ -601,7 +601,7 @@ export class CoreGradesHelperProvider { row.iconAlt = Translate.instant('core.grades.aggregatesum'); } else if (text.indexOf('/outcomes') > -1 || text.indexOf('fa-tasks') > -1) { row.itemtype = 'outcome'; - row.icon = 'fas-chart-pie'; + row.icon = 'fas-tasks'; row.iconAlt = Translate.instant('core.grades.outcome'); } else if (text.indexOf('i/folder') > -1 || text.indexOf('fa-folder') > -1) { row.itemtype = 'category'; diff --git a/src/core/features/siteplugins/components/module-index/module-index.ts b/src/core/features/siteplugins/components/module-index/module-index.ts index 2bd8be6b8..3e15a13dc 100644 --- a/src/core/features/siteplugins/components/module-index/module-index.ts +++ b/src/core/features/siteplugins/components/module-index/module-index.ts @@ -206,14 +206,8 @@ export class CoreSitePluginsModuleIndexComponent implements OnInit, OnDestroy, C }, }); - if (data && data.action == 'refresh') { - const modal = await CoreDomUtils.showModalLoading(); - - try { - await this.doRefresh(); - } finally { - modal.dismiss(); - } + if (data && data.action == 'refresh' && this.content?.dataLoaded) { + this.content?.refreshContent(true); } } diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 55ba3c65c..c0d3691c8 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -307,6 +307,11 @@ ion-button { img[slot=end] { @include margin-horizontal(-0.3em, 0.3em); } + + ion-spinner[slot] { + width: 20px; + color: inherit; + } } ion-button.button-outline {