From 19d366595ef7db19e8e992ee121bfa4ee8f585ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 6 Aug 2021 11:25:43 +0200 Subject: [PATCH 1/6] MOBILE-3783 login: Remove unused multisite selectors --- src/core/features/login/pages/site/site.ts | 16 +++------------- src/core/features/login/services/login-helper.ts | 6 ++++++ src/types/config.d.ts | 3 ++- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/core/features/login/pages/site/site.ts b/src/core/features/login/pages/site/site.ts index e158b5016..ea3f85f98 100644 --- a/src/core/features/login/pages/site/site.ts +++ b/src/core/features/login/pages/site/site.ts @@ -20,7 +20,7 @@ import { CoreConfig } from '@services/config'; import { CoreSites, CoreSiteCheckResponse, CoreLoginSiteInfo, CoreSitesDemoSiteData } from '@services/sites'; import { CoreUtils } from '@services/utils/utils'; import { CoreDomUtils } from '@services/utils/dom'; -import { CoreLoginHelper, CoreLoginHelperProvider } from '@features/login/services/login-helper'; +import { CoreLoginHelper, CoreLoginHelperProvider, CoreLoginSiteSelectorListMethod } from '@features/login/services/login-helper'; import { CoreSite } from '@classes/site'; import { CoreError } from '@classes/errors/error'; import { CoreConstants } from '@/core/constants'; @@ -49,7 +49,7 @@ export class CoreLoginSitePage implements OnInit { siteForm: FormGroup; fixedSites?: CoreLoginSiteInfoExtended[]; filteredSites?: CoreLoginSiteInfoExtended[]; - siteSelector = 'sitefinder'; + siteSelector: CoreLoginSiteSelectorListMethod = 'sitefinder'; showKeyboard = false; filter = ''; sites: CoreLoginSiteInfoExtended[] = []; @@ -124,24 +124,14 @@ export class CoreLoginSitePage implements OnInit { * @return URL of the first site. */ protected initSiteSelector(): string { - // Deprecate listnourl on 3.9.3, remove this block on the following release. - if (this.siteSelector == 'listnourl') { - this.siteSelector = 'list'; - this.siteFinderSettings.displayurl = false; - } - this.fixedSites = this.extendCoreLoginSiteInfo( CoreLoginHelper.getFixedSites()); + this.siteSelector = 'list'; // In case it's not defined // Do not show images if none are set. if (!this.fixedSites.some((site) => !!site.imageurl)) { this.siteFinderSettings.displayimage = false; } - // Autoselect if not defined. - if (this.siteSelector != 'list' && this.siteSelector != 'buttons') { - this.siteSelector = this.fixedSites.length > 3 ? 'list' : 'buttons'; - } - this.filteredSites = this.fixedSites; return this.fixedSites[0].url; diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index 6f0d6ba67..68a8f63d4 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -1443,3 +1443,9 @@ type StoredLoginLaunchData = { pageOptions: CoreNavigationOptions; ssoUrlParams: CoreUrlParams; }; + +export type CoreLoginSiteSelectorListMethod = + 'url'| + 'sitefinder'| + 'list'| + ''; diff --git a/src/types/config.d.ts b/src/types/config.d.ts index 497a3b8a4..25d7151f8 100644 --- a/src/types/config.d.ts +++ b/src/types/config.d.ts @@ -16,6 +16,7 @@ import { CoreColorScheme, CoreZoomLevel } from '@features/settings/services/sett import { CoreMainMenuLocalizedCustomItem } from '@features/mainmenu/services/mainmenu'; import { CoreSitesDemoSiteData } from '@services/sites'; import { OpenFileAction } from '@services/utils/utils'; +import { CoreLoginSiteSelectorListMethod } from '@features/login/services/login-helper'; /* eslint-disable @typescript-eslint/naming-convention */ @@ -37,7 +38,7 @@ export interface EnvironmentConfig { customurlscheme: string; siteurl: string; sitename: string; - multisitesdisplay: string; + multisitesdisplay: CoreLoginSiteSelectorListMethod; sitefindersettings: Record; onlyallowlistedsites: boolean; skipssoconfirmation: boolean; From 5a573f3dfa84aed85c557a102e1aa7cdf39ea02c Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 3 Aug 2021 12:14:47 +0200 Subject: [PATCH 2/6] MOBILE-3832 core: Fix infinite calls if error on infinite loading --- src/core/components/infinite-loading/infinite-loading.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/components/infinite-loading/infinite-loading.ts b/src/core/components/infinite-loading/infinite-loading.ts index 994f6ea43..33eb9d81b 100644 --- a/src/core/components/infinite-loading/infinite-loading.ts +++ b/src/core/components/infinite-loading/infinite-loading.ts @@ -69,7 +69,7 @@ export class CoreInfiniteLoadingComponent implements OnChanges { * like the Ionic component does. */ protected async checkScrollDistance(): Promise { - if (!this.enabled) { + if (!this.enabled || this.error || this.loadingMore) { return; } From 5a150867c21feb1178717a12896b904cbe740cf6 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 6 Aug 2021 11:28:06 +0200 Subject: [PATCH 3/6] MOBILE-3783 core: Fix iframe in item not clickable --- src/theme/theme.base.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index f18cc6ad5..bca6e62d9 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -922,7 +922,7 @@ ion-item.ion-activatable:not(.only-links) { ion-anchor, a, ion-button, button, - audio, video, select, input { + audio, video, select, input, iframe { pointer-events: visible; } } From 90370aa51cd8b93d6e38513686d2f402fecbc62b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 6 Aug 2021 11:34:50 +0200 Subject: [PATCH 4/6] MOBILE-3783 styles: Quick fix on some styles --- src/core/components/combobox/combobox.scss | 1 + src/theme/components/format-text.scss | 7 +++++++ src/theme/theme.base.scss | 8 ++++---- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/core/components/combobox/combobox.scss b/src/core/components/combobox/combobox.scss index 1de608344..950503000 100644 --- a/src/core/components/combobox/combobox.scss +++ b/src/core/components/combobox/combobox.scss @@ -99,6 +99,7 @@ ion-button { font-weight: 400; font-size: 16px; line-height: 20px; + border-radius: 0; } .select-text { diff --git a/src/theme/components/format-text.scss b/src/theme/components/format-text.scss index 325ab0460..1948e56fa 100644 --- a/src/theme/components/format-text.scss +++ b/src/theme/components/format-text.scss @@ -193,6 +193,13 @@ core-format-text { } } +// Erase if core-format-text display is contents again. +.flex > core-format-text { + display: flex; +} +.core-course-title > p.item-heading > core-format-text { + display: inline; +} @keyframes loading { 0% { diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index f18cc6ad5..d2825f348 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -466,7 +466,7 @@ ion-toolbar { border-bottom: 3px solid var(--color-base); - ion-item::part(native) { + ion-item { --inner-border-width: 0; } ion-label { @@ -480,9 +480,9 @@ ion-toolbar { .item.core-#{$color-name}-item { --color-base: var(--ion-color-#{$color-name}); - --inner-border-width: 0 0 3px 0; - --border-width: 0; - border-bottom: 3px solid var(--color-base) !important; + --border-width: 0 0 3px 0; + --border-color: var(--color-base); + --inner-border-width: 0; ion-icon { color: var(--color-base); } From 7904139fff998737a048afc24f8fdee3c9381781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Fri, 6 Aug 2021 11:35:18 +0200 Subject: [PATCH 5/6] MOBILE-3783 sitehome: Fix combolist not shown --- src/core/features/sitehome/pages/index/index.html | 4 ++-- src/core/features/sitehome/services/sitehome.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/features/sitehome/pages/index/index.html b/src/core/features/sitehome/pages/index/index.html index 799dede96..9ee1cac42 100644 --- a/src/core/features/sitehome/pages/index/index.html +++ b/src/core/features/sitehome/pages/index/index.html @@ -21,8 +21,8 @@ - - + + Date: Fri, 6 Aug 2021 12:36:24 +0200 Subject: [PATCH 6/6] MOBILE-3783 release: Bump build numbers 3.9.5.2 --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 7d7f7f72b..b75246779 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Moodle Moodle official app Moodle Mobile team