diff --git a/package.json b/package.json index 56a1ba8..49e8507 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "@elysiajs/eden": "^1.4.5", "@ionic/vue": "^8.7.11", "@ionic/vue-router": "^8.7.11", - "@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz", + "@riwa/api-types": "http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz", "@tailwindcss/vite": "^4.1.18", "@vee-validate/zod": "^4.15.1", "@vueuse/core": "^14.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 18d0d8e..6b3fa47 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -69,8 +69,8 @@ importers: specifier: ^8.7.11 version: 8.7.11(@stencil/core@4.39.0)(vue-router@4.6.3(vue@3.5.25(typescript@5.9.3)))(vue@3.5.25(typescript@5.9.3)) '@riwa/api-types': - specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz - version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))' + specifier: http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz + version: '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))' '@tailwindcss/vite': specifier: ^4.1.18 version: 4.1.18(vite@7.2.7(@types/node@24.10.2)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.44.1)(yaml@2.8.2)) @@ -2804,9 +2804,9 @@ packages: '@remirror/core-constants@3.0.0': resolution: {integrity: sha512-42aWfPrimMfDKDi4YegyS7x+/0tlzaqwPQCULLanv3DMIlu96KTJR0fM5isWX2UViOqlGnX6YFgqWepcX+XMNg==} - '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz': - resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz} - version: 0.0.125 + '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz': + resolution: {tarball: http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz} + version: 0.0.126 peerDependencies: '@elysiajs/eden': ^1.4.5 @@ -12161,7 +12161,7 @@ snapshots: '@remirror/core-constants@3.0.0': {} - '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.125.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))': + '@riwa/eden@http://192.168.1.7:9527/api/riwa-eden-0.0.126.tgz(@elysiajs/eden@1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)))': dependencies: '@elysiajs/eden': 1.4.5(elysia@1.4.18(@sinclair/typebox@0.34.41)(exact-mirror@0.2.5(@sinclair/typebox@0.34.41))(file-type@21.1.1)(openapi-types@12.1.3)(typescript@5.9.3)) diff --git a/src/ui/file-preview/index.vue b/src/ui/file-preview/index.vue index 5b27cc4..113a0d1 100644 --- a/src/ui/file-preview/index.vue +++ b/src/ui/file-preview/index.vue @@ -3,18 +3,24 @@ import IcRoundDownload from "~icons/ic/round-download"; import { client, safeClient } from "@/api"; const props = defineProps<{ - id: string; + fileIds: string[]; }>(); -const { data } = await safeClient(client.api.file_storage({ id: props.id }).get()); +const { data } = safeClient(client.api.file_storage.access_urls.post({ fileIds: props.fileIds })); + +function handleDownload(item) { + window.open(item.url, "_blank"); +} diff --git a/src/ui/index.ts b/src/ui/index.ts index 3ba6ac5..fa52837 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -37,5 +37,6 @@ declare module "vue" { UiTextareaLabel: typeof import("./textarea-label/index.vue")["default"]; UiBackButton: typeof import("./back-button/index.vue")["default"]; UiEmpty: typeof import("./empty/index.vue")["default"]; + UiFilePreview: typeof import("./file-preview/index.vue")["default"]; } } diff --git a/src/views/trade-rwa/components/about.vue b/src/views/trade-rwa/components/about.vue index ba4449d..5047b7a 100644 --- a/src/views/trade-rwa/components/about.vue +++ b/src/views/trade-rwa/components/about.vue @@ -5,18 +5,16 @@ import { client, safeClient } from "@/api"; const props = defineProps<{ data: RwaData | null; }>(); - -const { data: file } = safeClient(client.api.file_storage({ id: props.data?.product.proofDocumentIds || "" }).get());