Merge pull request #2294 from dpalou/MOBILE-3269
MOBILE-3269 login: Use function to get logo URLmain
commit
1c3fa6dd8a
|
@ -156,7 +156,7 @@ export class CoreLoginCredentialsPage {
|
|||
protected treatSiteConfig(): void {
|
||||
if (this.siteConfig) {
|
||||
this.siteName = CoreConfigConstants.sitename ? CoreConfigConstants.sitename : this.siteConfig.sitename;
|
||||
this.logoUrl = this.siteConfig.logourl || this.siteConfig.compactlogourl;
|
||||
this.logoUrl = this.loginHelper.getLogoUrl(this.siteConfig);
|
||||
this.authInstructions = this.siteConfig.authinstructions || this.translate.instant('core.login.loginsteps');
|
||||
|
||||
const disabledFeatures = this.loginHelper.getDisabledFeatures(this.siteConfig);
|
||||
|
|
|
@ -105,7 +105,7 @@ export class CoreLoginReconnectPage {
|
|||
// Check logoURL if user avatar is not set.
|
||||
if (this.site.avatar.startsWith(site.infos.siteurl + '/theme/image.php')) {
|
||||
this.showSiteAvatar = false;
|
||||
this.logoUrl = config.logourl || config.compactlogourl;
|
||||
this.logoUrl = this.loginHelper.getLogoUrl(config);
|
||||
}
|
||||
|
||||
this.getDataFromConfig(this.siteConfig);
|
||||
|
|
|
@ -389,6 +389,16 @@ export class CoreLoginHelperProvider {
|
|||
return errors;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get logo URL from a site public config.
|
||||
*
|
||||
* @param config Site public config.
|
||||
* @return Logo URL.
|
||||
*/
|
||||
getLogoUrl(config: any): string {
|
||||
return config ? (config.logourl || config.compactlogourl) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the logout label of a site.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue