mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(web): fixes previous pull request: set asset as profile image (#3415)
* set photoviewer 100% width, fixes transparent ede * remove unnecessary class * format fix --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
7d3ec8af37
commit
05fa3092bf
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { AssetResponseDto, api } from '@api';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import { notificationController, NotificationType } from './notification/notification';
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import domtoimage from 'dom-to-image';
|
||||
|
@ -13,6 +13,10 @@
|
|||
const dispatch = createEventDispatcher();
|
||||
let imgElement: HTMLDivElement;
|
||||
|
||||
onMount(() => {
|
||||
imgElement.style.width = '100%';
|
||||
});
|
||||
|
||||
const hasTransparentPixels = async (blob: Blob) => {
|
||||
const img = new Image();
|
||||
img.src = URL.createObjectURL(blob);
|
||||
|
|
Loading…
Reference in a new issue