MOBILE-3401 login: Fix site logo show on fixed sites

main
Pau Ferrer Ocaña 2020-06-10 10:27:20 +02:00
parent 8f85933df2
commit 7cdb06c69f
5 changed files with 8 additions and 10 deletions

View File

@ -93,11 +93,8 @@ ion-app.app-root page-core-login-site {
} }
.core-login-site-logo { .core-login-site-logo {
margin-top: 5px;
margin-bottom: 5px;
img {
width: 90%; width: 90%;
max-width: 300px; max-width: 300px;
} margin: 5px auto;
} }
} }

View File

@ -14,7 +14,7 @@
<div text-wrap text-center margin-bottom> <div text-wrap text-center margin-bottom>
<div class="core-login-site-logo"> <div class="core-login-site-logo">
<!-- Show site logo or a default image. --> <!-- Show site logo or a default image. -->
<img *ngIf="logoUrl" [src]="logoUrl" role="presentation"> <img *ngIf="logoUrl" [src]="logoUrl" role="presentation" onError="this.src='assets/img/login_logo.png'">
<img *ngIf="!logoUrl" src="assets/img/login_logo.png" role="presentation"> <img *ngIf="!logoUrl" src="assets/img/login_logo.png" role="presentation">
</div> </div>

View File

@ -14,7 +14,7 @@
<div class="core-login-site-logo" *ngIf="!showSiteAvatar"> <div class="core-login-site-logo" *ngIf="!showSiteAvatar">
<!-- Show site logo or a default image. --> <!-- Show site logo or a default image. -->
<img *ngIf="logoUrl" [src]="logoUrl" core-external-content [siteId]="siteId" role="presentation"> <img *ngIf="logoUrl" [src]="logoUrl" role="presentation" onError="this.src='assets/img/login_logo.png'">
<img *ngIf="!logoUrl" src="assets/img/login_logo.png" role="presentation"> <img *ngIf="!logoUrl" src="assets/img/login_logo.png" role="presentation">
</div> </div>

View File

@ -105,8 +105,8 @@ export class CoreLoginReconnectPage {
// Check logoURL if user avatar is not set. // Check logoURL if user avatar is not set.
if (this.site.avatar.startsWith(site.infos.siteurl + '/theme/image.php')) { if (this.site.avatar.startsWith(site.infos.siteurl + '/theme/image.php')) {
this.showSiteAvatar = false; this.showSiteAvatar = false;
this.logoUrl = this.loginHelper.getLogoUrl(config);
} }
this.logoUrl = this.loginHelper.getLogoUrl(config);
this.getDataFromConfig(this.siteConfig); this.getDataFromConfig(this.siteConfig);
}).catch(() => { }).catch(() => {

View File

@ -54,7 +54,8 @@ ion-app.app-root page-core-login-site {
&.hidden { &.hidden {
opacity: 0; opacity: 0;
visibility: hidden; visibility: hidden;
margin: 0; margin-top: 0;
margin-bottom: 0;
padding: 0; padding: 0;
max-height: 0; max-height: 0;
} }