From b9a5eaa3dcb791a2f95fd74e9d51ab77bf8e1bbd Mon Sep 17 00:00:00 2001 From: Nic Date: Tue, 14 Jul 2026 12:21:42 +0100 Subject: [PATCH] feat(files): unified download dialog, public-upload fix, and upload UX polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Download: - Merge "Download by Address" and "Download by Datamap" into one Download dialog with a smart input that auto-detects a hex address, an autonomi:// link, a local .datamap path, or an http(s) .datamap URL, plus a drop zone and an auto-filled save-as name. - Require a full 64-hex address (was >=8 chars, which enabled the button then failed in the backend). - Parse autonomi:// links for name / filename+filetype. - Fetch a datamap from an http(s) URL (read_datamap_url; reqwest with a 15s timeout and a 5 MiB streamed cap). Upload: - Fix: public uploads in direct-key mode (devnet / imported key) were silently stored private — wallet_upload now takes visibility and returns public_address, so the PUBLIC badge and shareable address show. - Already-on-network files no longer auto-dismiss the confirm dialog; the private (get datamap) vs public (publish) choice is preserved, the approve gate counts them, and the button reads "Get Datamap" for already-stored + private. - Remove the redundant "Already stored" badge that crowded the filename. Table: - Address column truncates to the column width (full address when it fits) and never truncates the PUBLIC tag. - Vertically centre the status column. i18n: new/updated download and upload strings across all 18 locales (machine-generated best guess for non-English; will refine with feedback). Co-Authored-By: Claude Opus 4.8 (1M context) --- components/files/DatamapSaveAsDialog.vue | 84 -------- components/files/DownloadByDatamapDialog.vue | 96 --------- components/files/DownloadDialog.vue | 140 ++++++++----- components/files/UploadConfirmDialog.vue | 23 +-- locales/ar.json | 15 +- locales/bg.json | 15 +- locales/de.json | 15 +- locales/en.json | 13 +- locales/es.json | 15 +- locales/fr.json | 15 +- locales/he.json | 15 +- locales/id.json | 15 +- locales/ja.json | 15 +- locales/ko.json | 15 +- locales/nl.json | 15 +- locales/pt-BR.json | 15 +- locales/ru.json | 15 +- locales/tr.json | 15 +- locales/uk.json | 15 +- locales/vi.json | 15 +- locales/zh-CN.json | 15 +- locales/zh-TW.json | 15 +- pages/files.vue | 198 ++++++------------- src-tauri/src/autonomi_ops.rs | 92 ++++++++- src-tauri/src/lib.rs | 1 + stores/files.ts | 58 +++++- utils/validators.ts | 125 +++++++++++- 27 files changed, 619 insertions(+), 466 deletions(-) delete mode 100644 components/files/DatamapSaveAsDialog.vue delete mode 100644 components/files/DownloadByDatamapDialog.vue diff --git a/components/files/DatamapSaveAsDialog.vue b/components/files/DatamapSaveAsDialog.vue deleted file mode 100644 index 124a9e7..0000000 --- a/components/files/DatamapSaveAsDialog.vue +++ /dev/null @@ -1,84 +0,0 @@ - - - diff --git a/components/files/DownloadByDatamapDialog.vue b/components/files/DownloadByDatamapDialog.vue deleted file mode 100644 index 12cdf5d..0000000 --- a/components/files/DownloadByDatamapDialog.vue +++ /dev/null @@ -1,96 +0,0 @@ - - - diff --git a/components/files/DownloadDialog.vue b/components/files/DownloadDialog.vue index 9e1870f..3536176 100644 --- a/components/files/DownloadDialog.vue +++ b/components/files/DownloadDialog.vue @@ -5,14 +5,15 @@ class="fixed inset-0 z-50 flex items-center justify-center bg-black/50" @click.self="$emit('close')" > -