From 482edc2dcb375e87a39e8fc424081dcab322e1d8 Mon Sep 17 00:00:00 2001 From: Harry Martland Date: Fri, 22 Nov 2024 17:47:49 +0000 Subject: [PATCH 1/3] prompts the user with their camera on mobile devices rather than file upload --- app/components/assets/form.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/components/assets/form.tsx b/app/components/assets/form.tsx index 8e89026d3..04d349182 100644 --- a/app/components/assets/form.tsx +++ b/app/components/assets/form.tsx @@ -201,6 +201,7 @@ export const AssetForm = ({ onChange={validateFile} label={"Main image"} hideLabel + capture={"environment"} error={fileError} className="mt-2" inputClassName="border-0 shadow-none p-0 rounded-none" From a9e42ddc4bab62d02c20f1003c456475adaeffc4 Mon Sep 17 00:00:00 2001 From: Harry Martland Date: Mon, 25 Nov 2024 17:33:32 +0000 Subject: [PATCH 2/3] fix: android 14 camera file updload issue --- app/components/assets/form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/assets/form.tsx b/app/components/assets/form.tsx index 04d349182..a3e22d2a3 100644 --- a/app/components/assets/form.tsx +++ b/app/components/assets/form.tsx @@ -195,13 +195,13 @@ export const AssetForm = ({

Date: Tue, 26 Nov 2024 18:34:02 +0000 Subject: [PATCH 3/3] fix: applys android 14 camera workaround to all image file inputs --- app/components/assets/form.tsx | 4 ++-- app/components/kits/form.tsx | 3 ++- app/components/location/form.tsx | 3 ++- app/components/workspace/edit-form.tsx | 3 ++- app/components/workspace/form.tsx | 3 ++- app/routes/_layout+/account-details.general.tsx | 3 ++- app/utils/constants.ts | 4 ++++ 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/components/assets/form.tsx b/app/components/assets/form.tsx index a3e22d2a3..7364e2ad4 100644 --- a/app/components/assets/form.tsx +++ b/app/components/assets/form.tsx @@ -12,6 +12,7 @@ import { z } from "zod"; import { updateDynamicTitleAtom } from "~/atoms/dynamic-title-atom"; import { fileErrorAtom, validateFileAtom } from "~/atoms/file"; import type { loader } from "~/routes/_layout+/assets.$assetId_.edit"; +import { ACCEPT_SUPPORTED_IMAGES } from "~/utils/constants"; import type { CustomFieldZodSchema } from "~/utils/custom-fields"; import { mergedSchema } from "~/utils/custom-fields"; import { isFormProcessing } from "~/utils/form"; @@ -195,8 +196,7 @@ export const AssetForm = ({

{

{

Accepts PNG, JPG or JPEG (max.4 MB)