Merge branch 'master' into integration

main
Pau Ferrer Ocaña 2021-08-09 11:25:33 +02:00
commit edaeb05b4d
6 changed files with 20 additions and 16 deletions

View File

@ -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(<CoreLoginSiteInfoExtended[]> 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;

View File

@ -1443,3 +1443,9 @@ type StoredLoginLaunchData = {
pageOptions: CoreNavigationOptions;
ssoUrlParams: CoreUrlParams;
};
export type CoreLoginSiteSelectorListMethod =
'url'|
'sitefinder'|
'list'|
'';

View File

@ -27,7 +27,7 @@ import { AddonModForum, AddonModForumData } from '@addons/mod/forum/services/for
export enum FrontPageItemNames {
NEWS_ITEMS = 0,
LIST_OF_CATEGORIES = 2,
COMBO_LIST = 3,
COMBO_LIST = 4,
ENROLLED_COURSES = 5,
LIST_OF_COURSE = 6,
COURSE_SEARCH_BOX = 7,

View File

@ -201,6 +201,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% {

View File

@ -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;
}
}

View File

@ -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<string, unknown>;
onlyallowlistedsites: boolean;
skipssoconfirmation: boolean;