diff --git a/src/addons/calendar/components/filter/addon-calendar-filter-popover.html b/src/addons/calendar/components/filter/addon-calendar-filter-popover.html index 5d998548a..8c2d75c7d 100644 --- a/src/addons/calendar/components/filter/addon-calendar-filter-popover.html +++ b/src/addons/calendar/components/filter/addon-calendar-filter-popover.html @@ -4,9 +4,7 @@ {{ 'addon.calendar.' + type + 'events' | translate}} - - - + diff --git a/src/addons/mod/feedback/pages/attempt/attempt.html b/src/addons/mod/feedback/pages/attempt/attempt.html index cd14c1419..1c9e6ce9c 100644 --- a/src/addons/mod/feedback/pages/attempt/attempt.html +++ b/src/addons/mod/feedback/pages/attempt/attempt.html @@ -33,9 +33,7 @@ - - - +

diff --git a/src/addons/mod/feedback/pages/form/form.html b/src/addons/mod/feedback/pages/form/form.html index 2bd0091ab..63acf1936 100644 --- a/src/addons/mod/feedback/pages/form/form.html +++ b/src/addons/mod/feedback/pages/form/form.html @@ -21,9 +21,7 @@ - - - + diff --git a/src/addons/mod/forum/pages/discussion/discussion.html b/src/addons/mod/forum/pages/discussion/discussion.html index 2f85f8fb2..ed7efa355 100644 --- a/src/addons/mod/forum/pages/discussion/discussion.html +++ b/src/addons/mod/forum/pages/discussion/discussion.html @@ -101,7 +101,7 @@ - +

Couldn't find the directive to render this access rule.

- +
diff --git a/src/core/components/components.module.ts b/src/core/components/components.module.ts index f319a9ff2..0ca148450 100644 --- a/src/core/components/components.module.ts +++ b/src/core/components/components.module.ts @@ -56,6 +56,7 @@ import { CoreTabsOutletComponent } from './tabs-outlet/tabs-outlet'; import { CoreTimerComponent } from './timer/timer'; import { CoreUserAvatarComponent } from './user-avatar/user-avatar'; import { CoreComboboxComponent } from './combobox/combobox'; +import { CoreSpacerComponent } from './spacer/spacer'; @NgModule({ declarations: [ @@ -94,6 +95,7 @@ import { CoreComboboxComponent } from './combobox/combobox'; CoreTimerComponent, CoreUserAvatarComponent, CoreComboboxComponent, + CoreSpacerComponent, ], imports: [ CommonModule, @@ -139,6 +141,7 @@ import { CoreComboboxComponent } from './combobox/combobox'; CoreTimerComponent, CoreUserAvatarComponent, CoreComboboxComponent, + CoreSpacerComponent, ], }) export class CoreComponentsModule {} diff --git a/src/core/components/spacer/spacer.ts b/src/core/components/spacer/spacer.ts new file mode 100644 index 000000000..e2196dd81 --- /dev/null +++ b/src/core/components/spacer/spacer.ts @@ -0,0 +1,30 @@ +// (C) Copyright 2015 Moodle Pty Ltd. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import { Component } from '@angular/core'; + +/** + * Component to display an empty spacer using item divider. + * + * Example usage: + * + */ +@Component({ + selector: 'core-spacer', + template: '', + styles: [':host {--item-divider-min-height: 30px;}'], +}) +export class CoreSpacerComponent { + +} diff --git a/src/core/features/course/components/module/module.ts b/src/core/features/course/components/module/module.ts index 0241aa2a5..abe5646e4 100644 --- a/src/core/features/course/components/module/module.ts +++ b/src/core/features/course/components/module/module.ts @@ -44,14 +44,14 @@ import { }) export class CoreCourseModuleComponent implements OnInit, OnDestroy { - @Input() module?: CoreCourseModule; // The module to render. + @Input() module!: CoreCourseModule; // The module to render. @Input() courseId?: number; // The course the module belongs to. @Input() section?: CoreCourseSection; // The section the module belongs to. // eslint-disable-next-line @angular-eslint/no-input-rename @Input('downloadEnabled') set enabled(value: boolean) { this.downloadEnabled = value; - if (!this.module?.handlerData?.showDownloadButton || !this.downloadEnabled || this.statusCalculated) { + if (!this.module.handlerData?.showDownloadButton || !this.downloadEnabled || this.statusCalculated) { return; } @@ -81,10 +81,6 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { * Component being initialized. */ ngOnInit(): void { - if (!this.module) { - return; - } - this.courseId = this.courseId || this.module.course; this.modNameTranslated = CoreCourse.translateModuleName(this.module.modname) || ''; @@ -125,7 +121,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { * @param event Click event. */ moduleClicked(event: Event): void { - if (this.module?.uservisible !== false && this.module?.handlerData?.action) { + if (this.module.uservisible !== false && this.module.handlerData?.action) { this.module.handlerData.action(event, this.module, this.courseId!); } } @@ -195,7 +191,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { this.spinner = false; this.downloadStatus = status; - this.module?.handlerData?.updateStatus?.(status); + this.module.handlerData?.updateStatus?.(status); } /** @@ -218,7 +214,7 @@ export class CoreCourseModuleComponent implements OnInit, OnDestroy { */ ngOnDestroy(): void { // this.statusObserver?.off(); - this.module?.handlerData?.onDestroy?.(); + this.module.handlerData?.onDestroy?.(); this.isDestroyed = true; } diff --git a/src/core/features/course/pages/preview/preview.html b/src/core/features/course/pages/preview/preview.html index 166ee40f1..02223dce5 100644 --- a/src/core/features/course/pages/preview/preview.html +++ b/src/core/features/course/pages/preview/preview.html @@ -58,7 +58,7 @@

{{contact.fullname}}

- +
diff --git a/src/core/features/mainmenu/pages/more/more.html b/src/core/features/mainmenu/pages/more/more.html index 6f0fc716f..79b029c4e 100644 --- a/src/core/features/mainmenu/pages/more/more.html +++ b/src/core/features/mainmenu/pages/more/more.html @@ -20,7 +20,7 @@

{{ siteUrl }}

- + @@ -82,7 +82,7 @@

{{ logoutLabel | translate }}

- + diff --git a/src/core/features/settings/pages/site/site.html b/src/core/features/settings/pages/site/site.html index e24c54f74..a422e7c92 100644 --- a/src/core/features/settings/pages/site/site.html +++ b/src/core/features/settings/pages/site/site.html @@ -25,7 +25,7 @@

{{ siteUrl }}

- + - - - + diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index e5cf4b140..7069ba7aa 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -193,11 +193,6 @@ ion-item-divider { opacity: var(--ion-item-detail-icon-opacity); padding-inline-end: 16px; } - - &.ios { - padding-top: 10px; - padding-bottom: 10px; - } } // Ionic list. diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss index daea2834f..5ffcbe996 100644 --- a/src/theme/theme.light.scss +++ b/src/theme/theme.light.scss @@ -171,10 +171,11 @@ --detail-icon-opacity: var(--ion-item-detail-icon-opacity); } + --item-divider-min-height: calc(var(--a11y-min-target-size) + 8px); ion-item-divider { --background: var(--gray-lighter); --color: inherit; - min-height: calc(var(--a11y-min-target-size) + 8px); + min-height: var(--item-divider-min-height); } --core-combobox-background: var(--ion-item-background);