Revert "[desktop] Force <img> elements to use Angular HttpClient for image downloads (bypassing WebView)"
This reverts commit 76289610ee.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<header>
|
<header>
|
||||||
<img [attr.src]="feature?.IconURL | httpImgSrc | async">
|
<img [attr.src]="feature?.IconURL">
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
{{ feature?.Name }}
|
{{ feature?.Name }}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<span *ngIf="!src && !isIgnoredProfile">
|
<span *ngIf="!src && !isIgnoredProfile">
|
||||||
{{letter}}
|
{{letter}}
|
||||||
</span>
|
</span>
|
||||||
<img [attr.src]="src | httpImgSrc | async" *ngIf="!!src">
|
<img [attr.src]="src" *ngIf="!!src" loading="lazy">
|
||||||
<svg *ngIf="!src && isIgnoredProfile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
<svg *ngIf="!src && isIgnoredProfile" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"
|
||||||
stroke-width="1.5" stroke="currentColor" class="w-full h-full text-gray-700">
|
stroke-width="1.5" stroke="currentColor" class="w-full h-full text-gray-700">
|
||||||
<path stroke-linecap="round" stroke-linejoin="round"
|
<path stroke-linecap="round" stroke-linejoin="round"
|
||||||
|
|||||||
@@ -2,12 +2,10 @@ import { CommonModule } from "@angular/common";
|
|||||||
import { NgModule } from "@angular/core";
|
import { NgModule } from "@angular/core";
|
||||||
import { AppIconComponent } from "./app-icon";
|
import { AppIconComponent } from "./app-icon";
|
||||||
import { AppIconResolver, DefaultIconResolver } from "./app-icon-resolver";
|
import { AppIconResolver, DefaultIconResolver } from "./app-icon-resolver";
|
||||||
import { CommonPipesModule } from "../pipes/common-pipes.module";
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule
|
||||||
CommonPipesModule,
|
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
AppIconComponent,
|
AppIconComponent,
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||||||
if (!!profile.Icons?.length) {
|
if (!!profile.Icons?.length) {
|
||||||
const firstIcon = profile.Icons[0];
|
const firstIcon = profile.Icons[0];
|
||||||
|
|
||||||
console.log(`profile '${profile.Name}' has icon of from source '${firstIcon.Source}' stored in '${firstIcon.Type}'`)
|
console.log(`profile ${profile.Name} has icon of from source ${firstIcon.Source} stored in ${firstIcon.Type}`)
|
||||||
|
|
||||||
switch (firstIcon.Type) {
|
switch (firstIcon.Type) {
|
||||||
case 'database':
|
case 'database':
|
||||||
@@ -292,7 +292,7 @@ export class AppIconComponent implements OnInit, OnDestroy {
|
|||||||
icon = '';
|
icon = '';
|
||||||
}
|
}
|
||||||
if (icon !== '') {
|
if (icon !== '') {
|
||||||
this.src = icon; // this.src = this.sanitzier.bypassSecurityTrustUrl(icon);
|
this.src = this.sanitzier.bypassSecurityTrustUrl(icon);
|
||||||
this.color = 'unset';
|
this.color = 'unset';
|
||||||
} else {
|
} else {
|
||||||
this.src = '';
|
this.src = '';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<h1 class="flex flex-row gap-2 items-center">
|
<h1 class="flex flex-row gap-2 items-center">
|
||||||
<img
|
<img
|
||||||
[src]="iconObjectURL | httpImgSrc | async"
|
[src]="iconObjectURL"
|
||||||
*ngIf="imageError === null && !!iconData"
|
*ngIf="imageError === null && !!iconData"
|
||||||
class="w-8 h-8 rounded-full border border-gray-400"
|
class="w-8 h-8 rounded-full border border-gray-400"
|
||||||
/>
|
/>
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<img
|
<img
|
||||||
[src]="iconObjectURL | httpImgSrc | async"
|
[src]="iconObjectURL"
|
||||||
*ngIf="imageError === null && !!iconData"
|
*ngIf="imageError === null && !!iconData"
|
||||||
class="w-12 h-12 rounded-full border border-gray-400"
|
class="w-12 h-12 rounded-full border border-gray-400"
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user