From 9453b7e87fe40f95179f98f972c804e63afefae7 Mon Sep 17 00:00:00 2001 From: Alex Freska Date: Thu, 19 Dec 2024 09:17:54 -0500 Subject: [PATCH] fix(renterd): files copy metadata --- .changeset/silver-pants-deliver.md | 5 +++++ .changeset/thick-geckos-laugh.md | 5 +++++ .../Files/FileContextMenu/CopyMetadataMenuItem.tsx | 5 +---- libs/renterd-types/src/bus.ts | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 .changeset/silver-pants-deliver.md create mode 100644 .changeset/thick-geckos-laugh.md diff --git a/.changeset/silver-pants-deliver.md b/.changeset/silver-pants-deliver.md new file mode 100644 index 000000000..710d20478 --- /dev/null +++ b/.changeset/silver-pants-deliver.md @@ -0,0 +1,5 @@ +--- +'renterd': patch +--- + +Fixed an issue with the copy file metadata action in the file context menu. diff --git a/.changeset/thick-geckos-laugh.md b/.changeset/thick-geckos-laugh.md new file mode 100644 index 000000000..e6f1e15fb --- /dev/null +++ b/.changeset/thick-geckos-laugh.md @@ -0,0 +1,5 @@ +--- +'@siafoundation/renterd-types': minor +--- + +The object response has been updated in v2. diff --git a/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx b/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx index f51564f97..ec4d33c2b 100644 --- a/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx +++ b/apps/renterd/components/Files/FileContextMenu/CopyMetadataMenuItem.tsx @@ -28,10 +28,7 @@ export function CopyMetadataMenuItem({ path }: Props) { disabled={!obj.data} onSelect={() => { if (obj.data) { - copyToClipboard( - JSON.stringify(obj.data.object, null, 2), - 'object metadata' - ) + copyToClipboard(JSON.stringify(obj.data, null, 2), 'object metadata') } }} > diff --git a/libs/renterd-types/src/bus.ts b/libs/renterd-types/src/bus.ts index 9614b7578..74d9eb644 100644 --- a/libs/renterd-types/src/bus.ts +++ b/libs/renterd-types/src/bus.ts @@ -417,7 +417,7 @@ export type ObjectsResponse = { export type ObjectParams = { key: string; bucket: string } export type ObjectPayload = void -export type ObjectResponse = { object: Obj } +export type ObjectResponse = Obj export type ObjectAddParams = { key: string; bucket: string } export type ObjectAddPayload = {