From 2e2e41f86dad0100fcd4b6d927f40009e0eeffa4 Mon Sep 17 00:00:00 2001 From: FTCHD <144691102+FTCHD@users.noreply.github.com> Date: Sun, 17 Aug 2025 00:17:31 +0200 Subject: [PATCH] custom endpoint & region for s3 Signed-off-by: FTCHD <144691102+FTCHD@users.noreply.github.com> --- src/components/RemoteCreateDrawer.tsx | 48 +++++++++++++++++++++++++-- src/components/RemoteEditDrawer.tsx | 44 ++++++++++++++++++++++++ 2 files changed, 89 insertions(+), 3 deletions(-) diff --git a/src/components/RemoteCreateDrawer.tsx b/src/components/RemoteCreateDrawer.tsx index 9ce1462..00cd298 100644 --- a/src/components/RemoteCreateDrawer.tsx +++ b/src/components/RemoteCreateDrawer.tsx @@ -136,7 +136,6 @@ export default function RemoteCreateDrawer({ const formData = new FormData(e.currentTarget) const data: Record = {} - // First collect all form values for (const [key, value] of formData.entries()) { if (value.toString().trim() === '') continue if ( @@ -155,7 +154,6 @@ export default function RemoteCreateDrawer({ Object.entries(data).filter(([key]) => key !== 'name' && key !== 'type') ) - // Create the remote await createRemote(name, type, parameters) addRemote(name) onClose() @@ -223,7 +221,7 @@ export default function RemoteCreateDrawer({ name="name" label="name" labelPlacement="outside" - placeholder="Remote Name" + placeholder="Remote Name (for your reference)" value={config.name || ''} onValueChange={(value) => setConfig({ ...config, name: value })} isRequired={true} @@ -273,6 +271,50 @@ export default function RemoteCreateDrawer({ )} More Options + {config.type === 's3' && ( + <> + { + // console.log(value) + setConfig({ ...config, region: value }) + }} + /> + { + // console.log(value) + setConfig({ ...config, endpoint: value }) + }} + /> + + )} {showMoreOptions && (
{currentBackendFields diff --git a/src/components/RemoteEditDrawer.tsx b/src/components/RemoteEditDrawer.tsx index b3c486f..3916e6b 100644 --- a/src/components/RemoteEditDrawer.tsx +++ b/src/components/RemoteEditDrawer.tsx @@ -228,6 +228,50 @@ export default function RemoteEditDrawer({ )} Advanced Options + {config.type === 's3' && ( + <> + { + // console.log(value) + setConfig({ ...config, region: value }) + }} + /> + { + // console.log(value) + setConfig({ ...config, endpoint: value }) + }} + /> + + )} {showAdvanced && (
{currentBackend.Options.filter(