mirror of
https://github.com/mempool/mempool.git
synced 2025-02-22 22:25:34 +01:00
Merge pull request #5759 from mempool/nymkappa/image-md5
This commit is contained in:
commit
b2456d104c
4 changed files with 8 additions and 9 deletions
|
@ -217,7 +217,7 @@
|
||||||
<ng-container>
|
<ng-container>
|
||||||
<ng-template ngFor let-sponsor [ngForOf]="profiles.whales">
|
<ng-template ngFor let-sponsor [ngForOf]="profiles.whales">
|
||||||
<a [href]="'https://x.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
|
<a [href]="'https://x.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
|
||||||
<img class="image" [src]="'/api/v1/services/account/images/' + sponsor.username + '/md5=' + sponsor.imageMd5" onError="this.src = '/resources/profile/grumpy.svg'; this.className = 'image unknown'"/>
|
<img class="image" [src]="'/api/v1/services/account/images/' + sponsor.username" onError="this.src = '/resources/profile/grumpy.svg'; this.className = 'image unknown'"/>
|
||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -229,7 +229,7 @@
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<ng-template ngFor let-sponsor [ngForOf]="profiles.chads">
|
<ng-template ngFor let-sponsor [ngForOf]="profiles.chads">
|
||||||
<a [href]="'https://x.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
|
<a [href]="'https://x.com/' + sponsor.username" target="_blank" rel="sponsored" [title]="sponsor.username">
|
||||||
<img class="image" [src]="'/api/v1/services/account/images/' + sponsor.username + '/md5=' + sponsor.imageMd5" onError="this.src = '/resources/profile/grumpy.svg'; this.className = 'image unknown'"/>
|
<img class="image" [src]="'/api/v1/services/account/images/' + sponsor.username" onError="this.src = '/resources/profile/grumpy.svg'; this.className = 'image unknown'"/>
|
||||||
</a>
|
</a>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
<nav class="navbar navbar-expand-md navbar-dark">
|
<nav class="navbar navbar-expand-md navbar-dark">
|
||||||
<!-- Hamburger -->
|
<!-- Hamburger -->
|
||||||
<ng-container *ngIf="servicesEnabled">
|
<ng-container *ngIf="servicesEnabled">
|
||||||
<div *ngIf="user" class="profile_image_container" [class]="{'anon': !user.imageMd5}" (click)="hamburgerClick($event)">
|
<div *ngIf="user" class="profile_image_container" (click)="hamburgerClick($event)">
|
||||||
<img *ngIf="user.imageMd5" [src]="'/api/v1/services/account/images/' + user.username + '/md5=' + user.imageMd5" class="profile_image">
|
<img [src]="'/api/v1/services/account/images/' + user.username" class="profile_image" onError="this.src = '/resources/anon.svg'; this.className = 'anon'" />
|
||||||
<app-svg-images style="color: lightgrey; fill: lightgray" *ngIf="!user.imageMd5" name="anon"></app-svg-images>
|
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="false && user === null" class="profile_image_container" (click)="hamburgerClick($event)">
|
<div *ngIf="false && user === null" class="profile_image_container" (click)="hamburgerClick($event)">
|
||||||
<app-svg-images name="hamburger" height="40"></app-svg-images>
|
<app-svg-images name="hamburger" height="40"></app-svg-images>
|
||||||
|
@ -23,7 +22,7 @@
|
||||||
} @else {
|
} @else {
|
||||||
<ng-template [ngIf]="subdomain && enterpriseInfo">
|
<ng-template [ngIf]="subdomain && enterpriseInfo">
|
||||||
<div class="subdomain_container">
|
<div class="subdomain_container">
|
||||||
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + subdomain + '/logo?imageMd5=' + enterpriseInfo.imageMd5" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + subdomain + '/logo'" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
||||||
</div>
|
</div>
|
||||||
<div class="vertical-line"></div>
|
<div class="vertical-line"></div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -43,7 +42,7 @@
|
||||||
} @else {
|
} @else {
|
||||||
<ng-template [ngIf]="subdomain && enterpriseInfo">
|
<ng-template [ngIf]="subdomain && enterpriseInfo">
|
||||||
<div class="subdomain_container">
|
<div class="subdomain_container">
|
||||||
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + subdomain + '/logo?imageMd5=' + enterpriseInfo.imageMd5" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + subdomain + '/logo'" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
||||||
</div>
|
</div>
|
||||||
<div class="vertical-line"></div>
|
<div class="vertical-line"></div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
|
@ -269,7 +269,7 @@ nav {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
&.anon {
|
.anon {
|
||||||
border: 1.5px solid lightgrey;
|
border: 1.5px solid lightgrey;
|
||||||
color: lightgrey;
|
color: lightgrey;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</a>
|
</a>
|
||||||
} @else if (enterpriseInfo?.img || enterpriseInfo?.imageMd5) {
|
} @else if (enterpriseInfo?.img || enterpriseInfo?.imageMd5) {
|
||||||
<a [routerLink]="['/' | relativeUrl]">
|
<a [routerLink]="['/' | relativeUrl]">
|
||||||
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + enterpriseInfo.name + '/logo?imageMd5=' + enterpriseInfo.imageMd5" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
<img [src]="enterpriseInfo.img || '/api/v1/services/enterprise/images/' + enterpriseInfo.name + '/logo'" class="subdomain_logo" [class]="{'rounded': enterpriseInfo.rounded_corner}">
|
||||||
</a>
|
</a>
|
||||||
<div class="vertical-line"></div>
|
<div class="vertical-line"></div>
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue