Explorar o código

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>
faupau %!s(int64=2) %!d(string=hai) anos
pai
achega
05fa3092bf

+ 5 - 1
web/src/lib/components/shared-components/profile-image-cropper.svelte

@@ -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);