From f9034cbb394bc509feaa027dc13533d463ec3b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 9 Feb 2023 11:49:43 +0100 Subject: [PATCH 01/20] Revert `isProduction` helper to get value from the Vite --- src/common/helpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/helpers.ts b/src/common/helpers.ts index a2dafc3c59..1a80e0acce 100644 --- a/src/common/helpers.ts +++ b/src/common/helpers.ts @@ -105,5 +105,5 @@ export function isDemo() { } export function isProduction() { - return import.meta.env.VITE_IS_PRODUCTION === 'true'; + return import.meta.env.PROD; } From 40c96e0ce7d80948211c8b118a9da1ab9188f0ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 9 Feb 2023 11:50:15 +0100 Subject: [PATCH 02/20] Remove VITE_IS_PRODUCTION variable --- .env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.example b/.env.example index 858f2bda40..15ac4e39fc 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,6 @@ VITE_API_URL= VITE_IS_HOSTED=false VITE_APP_TITLE="Invoice Ninja" -VITE_IS_PRODUCTION=false # Supported values: "browser", "hash" VITE_ROUTER=hash From 1f64d2a1f83c7aa1251002135901263650dd93c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Thu, 9 Feb 2023 16:44:01 +0100 Subject: [PATCH 03/20] DebouncedCombobox: Support for loading spinner while in disabled state --- src/components/forms/DebouncedCombobox.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/forms/DebouncedCombobox.tsx b/src/components/forms/DebouncedCombobox.tsx index 3be61afcd3..e6030590ac 100644 --- a/src/components/forms/DebouncedCombobox.tsx +++ b/src/components/forms/DebouncedCombobox.tsx @@ -53,6 +53,7 @@ interface Props { withProperty?: string; sortBy?: string; staleTime?: number; // in ms + disableWithSpinner?: boolean; } export function DebouncedCombobox(props: Props) { @@ -304,7 +305,7 @@ export function DebouncedCombobox(props: Props) { {(!props.clearButton || (!props.defaultValue && !props.value)) && !isLoading && ( -
+