From a5be9fbc95f97a88d07b8b056adbdb9aa54f4f68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 8 Feb 2022 12:06:48 +0100 Subject: [PATCH] MOBILE-3808 styles: Some style fixes --- .../messages/pages/discussion/discussion.html | 2 +- .../messages/pages/discussion/discussion.scss | 4 -- .../pages/course-storage/course-storage.html | 4 +- .../core-download-refresh.html | 4 +- .../download-refresh/download-refresh.ts | 5 +- src/core/components/file/core-file.html | 4 +- src/core/components/mod-icon/mod-icon.scss | 4 +- src/core/components/tabs/tabs.scss | 1 + src/core/directives/collapsible-header.ts | 1 - .../core-course-module-completion.html | 7 ++- .../components/module/core-course-module.html | 62 +++++++++++-------- .../course/components/module/module.ts | 5 +- src/core/features/login/login.scss | 2 +- .../login/pages/credentials/credentials.html | 4 +- .../login/pages/reconnect/reconnect.html | 4 +- src/core/features/login/pages/site/site.html | 4 +- .../features/sitehome/pages/index/index.html | 8 +-- .../features/sitehome/pages/index/index.scss | 4 +- src/theme/components/format-text.scss | 2 +- src/theme/theme.base.scss | 19 +++++- src/theme/theme.light.scss | 11 ++-- 21 files changed, 96 insertions(+), 65 deletions(-) diff --git a/src/addons/messages/pages/discussion/discussion.html b/src/addons/messages/pages/discussion/discussion.html index fe42e7ac1..68417d729 100644 --- a/src/addons/messages/pages/discussion/discussion.html +++ b/src/addons/messages/pages/discussion/discussion.html @@ -128,7 +128,7 @@ [attr.aria-label]="'addon.messages.newmessages' | translate"> {{ 'addon.messages.newmessages' | translate }} - {{ newMessages }} + {{ newMessages }} diff --git a/src/addons/messages/pages/discussion/discussion.scss b/src/addons/messages/pages/discussion/discussion.scss index 2f8f0935d..57320a0c6 100644 --- a/src/addons/messages/pages/discussion/discussion.scss +++ b/src/addons/messages/pages/discussion/discussion.scss @@ -27,13 +27,9 @@ .core-discussion-messages-badge { position: absolute; - border-radius: 50%; color: var(--addon-messages-discussion-badge-text); background-color: var(--addon-messages-discussion-badge); display: block; - line-height: 20px; - height: 20px; - width: 20px; @include position(-6px, -6px, null, null); } } diff --git a/src/addons/storagemanager/pages/course-storage/course-storage.html b/src/addons/storagemanager/pages/course-storage/course-storage.html index 4db31b1e0..dab853fb1 100644 --- a/src/addons/storagemanager/pages/course-storage/course-storage.html +++ b/src/addons/storagemanager/pages/course-storage/course-storage.html @@ -55,7 +55,7 @@
+ [canTrustDownload]="true">
diff --git a/src/core/components/download-refresh/core-download-refresh.html b/src/core/components/download-refresh/core-download-refresh.html index 9ba3490a9..f9580727f 100644 --- a/src/core/components/download-refresh/core-download-refresh.html +++ b/src/core/components/download-refresh/core-download-refresh.html @@ -1,14 +1,14 @@ + [attr.aria-label]="(statusTranslatable || 'core.download') | translate"> + [attr.aria-label]="(statusTranslatable || 'core.refresh') | translate"> diff --git a/src/core/components/download-refresh/download-refresh.ts b/src/core/components/download-refresh/download-refresh.ts index 26487f98b..7dd013c02 100644 --- a/src/core/components/download-refresh/download-refresh.ts +++ b/src/core/components/download-refresh/download-refresh.ts @@ -35,7 +35,10 @@ export class CoreDownloadRefreshComponent { @Input() statusTranslatable?: string; // Download status translatable string. @Input() enabled = false; // Whether the download is enabled. @Input() loading = true; // Force loading status when is not downloading. - @Input() size: 'small' | 'default' | 'large' = 'default'; // Size of the buttons. + /** + * @deprecated since 4.0. It has no effect. + */ + @Input() size = ''; // Size of the buttons. @Input() canTrustDownload = false; // If false, refresh will be shown if downloaded. @Output() action: EventEmitter; // Will emit an event when the item clicked. diff --git a/src/core/components/file/core-file.html b/src/core/components/file/core-file.html index a5e2fbc7c..ff3e41e9b 100644 --- a/src/core/components/file/core-file.html +++ b/src/core/components/file/core-file.html @@ -9,7 +9,7 @@
+ (action)="download()"> + color="danger">
diff --git a/src/core/components/mod-icon/mod-icon.scss b/src/core/components/mod-icon/mod-icon.scss index b0dcb46d0..45b236cb6 100644 --- a/src/core/components/mod-icon/mod-icon.scss +++ b/src/core/components/mod-icon/mod-icon.scss @@ -5,12 +5,13 @@ --size: var(--module-icon-size); --margin-end: 0px; --margin-vertical: 0px; + --icon-radius: var(--small-radius); margin-top: var(--margin-vertical); margin-bottom: var(--margin-vertical); @include margin-horizontal(null, var(--margin-end)); - border-radius: var(--small-radius); + border-radius: var(--icon-radius); padding: 0.7rem; background-color: $gray-100; line-height: var(--size); @@ -50,4 +51,5 @@ img { :host-context(ion-card ion-item) { --margin-vertical: 12px; --margin-end: 12px; + --icon-radius: var(--module-icon-radius); } diff --git a/src/core/components/tabs/tabs.scss b/src/core/components/tabs/tabs.scss index dbc1f28e7..ff1c17bfe 100644 --- a/src/core/components/tabs/tabs.scss +++ b/src/core/components/tabs/tabs.scss @@ -7,6 +7,7 @@ height: 100%; display: flex; flex-direction: column; + --ion-safe-area-top: 0px; ion-tabs { background: transparent; diff --git a/src/core/directives/collapsible-header.ts b/src/core/directives/collapsible-header.ts index e0927de10..1981fd416 100644 --- a/src/core/directives/collapsible-header.ts +++ b/src/core/directives/collapsible-header.ts @@ -32,7 +32,6 @@ import { CoreMath } from '@singletons/math'; }) export class CoreCollapsibleHeaderDirective implements OnDestroy { - protected scrollElement?: HTMLElement; protected loadingObserver: CoreEventObserver; protected content?: HTMLIonContentElement | null; protected header: HTMLIonHeaderElement; diff --git a/src/core/features/course/components/module-completion/core-course-module-completion.html b/src/core/features/course/components/module-completion/core-course-module-completion.html index dbdc18616..a96265860 100644 --- a/src/core/features/course/components/module-completion/core-course-module-completion.html +++ b/src/core/features/course/components/module-completion/core-course-module-completion.html @@ -24,8 +24,11 @@
- - {{ rule.rulevalue.description }} + + + + {{ 'core.course.completion_automatic:todo' | translate }} {{ rule.rulevalue.description }} + diff --git a/src/core/features/course/components/module/core-course-module.html b/src/core/features/course/components/module/core-course-module.html index adfa73f2a..5a85d4f1d 100644 --- a/src/core/features/course/components/module/core-course-module.html +++ b/src/core/features/course/components/module/core-course-module.html @@ -1,12 +1,12 @@ - + }" [button]="module.handlerData.action && module.uservisible"> @@ -19,8 +19,8 @@

+ - {{ 'core.course.todo' | translate }} @@ -50,7 +50,7 @@
- @@ -58,11 +58,11 @@
- + }"> @@ -82,30 +82,38 @@ [showManualCompletion]="showManualCompletion" (completionChanged)="completionChanged.emit($event)"> - - - {{ 'core.course.manualcompletionnotsynced' | translate }} - +
+ + + {{ 'core.course.manualcompletionnotsynced' | translate }} + +
- - - {{ 'core.course.hiddenfromstudents' | translate }} - +
+ + + {{ 'core.course.hiddenfromstudents' | translate }} + +
- - - {{ 'core.course.hiddenoncoursepage' | translate }} - +
+ + + {{ 'core.course.hiddenoncoursepage' | translate }} + +
- - - - - - - +
+ + + + + + + +
@@ -114,7 +122,7 @@ + [ngClass]="['core-course-module-handler', 'core-module-loading', module.handlerData.class]" detail="false" lines="none"> diff --git a/src/core/features/course/components/module/module.ts b/src/core/features/course/components/module/module.ts index 287c2a484..fa25f2e50 100644 --- a/src/core/features/course/components/module/module.ts +++ b/src/core/features/course/components/module/module.ts @@ -62,8 +62,9 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { } this.module.handlerData.a11yTitle = this.module.handlerData.a11yTitle ?? this.module.handlerData.title; - this.completionStatus = this.module.completiondata === undefined || - this.module.completiondata.tracking == CoreCourseModuleCompletionTracking.COMPLETION_TRACKING_NONE + this.completionStatus = this.module.completiondata === undefined || + !this.module.completiondata?.istrackeduser || + this.module.completiondata.tracking == CoreCourseModuleCompletionTracking.COMPLETION_TRACKING_NONE ? undefined : this.module.completiondata.state; diff --git a/src/core/features/login/login.scss b/src/core/features/login/login.scss index 129a185de..053125e44 100644 --- a/src/core/features/login/login.scss +++ b/src/core/features/login/login.scss @@ -106,7 +106,7 @@ :host-context(body.dark) { @if ($core-login-button-outline-dark) { - form ion-button-dark { + form ion-button { --background: white; --color: var(--core-login-background-dark); } diff --git a/src/core/features/login/pages/credentials/credentials.html b/src/core/features/login/pages/credentials/credentials.html index bd28dced2..11772f5e6 100644 --- a/src/core/features/login/pages/credentials/credentials.html +++ b/src/core/features/login/pages/credentials/credentials.html @@ -56,7 +56,7 @@
{{ 'core.login.or' | translate }}
- {{ 'core.scanqr' | translate }} + {{ 'core.scanqr' | translate }}
@@ -64,7 +64,7 @@