Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
more fixes
Sara Vieira88af3913b327
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-info.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-info.tsxindex 6b109a7453..98bff6efd6 100644--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-info.tsx+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-info.tsx@@ -9,7 +9,7 @@ import {} from "@webstudio-is/design-system";import type { Asset } from "@webstudio-is/prisma-client";import {- getAspectRatio,+ getFormattedAspectRatio,getHumanReadableFileSize,getStartAndEndOfString,} from "./utils";@@ -37,7 +37,7 @@ export const AssetInfo = ({setIsDeleting,}: AssetInfoProps) => {const submit = useSubmit();- const onDelete = () => {+ const handleDeleteAsset = () => {const formData = new FormData();formData.append("assetId", id);formData.append("assetName", name);@@ -87,7 +87,7 @@ export const AssetInfo = ({<Flex align="center" css={{ gap: "$1" }}><AspectRatioIcon /><Text size="1">- {getAspectRatio(+ {getFormattedAspectRatio(width as unknown as number,height as unknown as number)}@@ -96,7 +96,7 @@ export const AssetInfo = ({</Grid></Box><Box css={{ p: "$2 $3" }}>- <Button variant="red" size="2" onClick={onDelete}>+ <Button variant="red" size="2" onClick={handleDeleteAsset}><Flex align="center" css={{ gap: "$1" }}><TrashIcon />Deletediff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/utils.ts b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/utils.tsindex b29a81bcae..732681078f 100644--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/utils.ts+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/utils.ts@@ -11,11 +11,11 @@ export const getStartAndEndOfString = (str: string) => {return str;};-export const gcd = (a: number, b: number): number => {+const gcd = (a: number, b: number): number => {return b ? gcd(b, a % b) : a;};-export const getAspectRatio = (width: number, height: number) => {+export const getFormattedAspectRatio = (width: number, height: number) => {const divisor = gcd(width, height);return `${width / divisor}:${height / divisor}`;diff --git a/packages/icons/src/aspect-ratio.tsx b/packages/icons/src/aspect-ratio.tsxindex c47e3333f7..0147ad7475 100644--- a/packages/icons/src/aspect-ratio.tsx+++ b/packages/icons/src/aspect-ratio.tsx@@ -5,9 +5,9 @@ export const AspectRatioIcon = React.forwardRef<SVGSVGElement, IconProps>(({ color = "currentColor", ...props }, forwardedRef) => {return (<svg- width={15}- height={15}- viewBox="0 0 15 15"+ width={16}+ height={16}+ viewBox="0 0 16 16"fill="none"xmlns="http://www.w3.org/2000/svg"{...props}