From b281d94a34ae26eeca70f7cfe060429054163547 Mon Sep 17 00:00:00 2001
From: 035966-L3 <139025318+035966-L3@users.noreply.github.com>
Date: Sat, 31 Jan 2026 15:25:43 +0800
Subject: [PATCH 1/2] ui: preview: Rearrange buttons from dialog actions (fix
#1121)
---
packages/ui-default/components/preview/preview.page.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/ui-default/components/preview/preview.page.ts b/packages/ui-default/components/preview/preview.page.ts
index 223a024761..54da6b936c 100644
--- a/packages/ui-default/components/preview/preview.page.ts
+++ b/packages/ui-default/components/preview/preview.page.ts
@@ -42,7 +42,7 @@ async function startEdit(filename, value, fileCategory = 'file') {
const dialogAction = (id) => [
tpl``,
tpl``,
- tpl``,
+ tpl``,
];
function bindCopyLink(id, src: string) {
@@ -148,7 +148,7 @@ export async function previewFile(ev?, type = '') {
});
bindCopyLink(id, link);
const action = await dialog.open();
- if (action === 'ok') window.open(link);
+ if (action === 'download') window.open(link);
return null;
}
if (['mp4', 'webm', 'ogg'].includes(ext)) return previewVideo(link);
From 1446f47a36620882ca57922d2c58507da88ee5aa Mon Sep 17 00:00:00 2001
From: 035966-L3 <139025318+035966-L3@users.noreply.github.com>
Date: Sat, 31 Jan 2026 15:47:33 +0800
Subject: [PATCH 2/2] Swap "Download" and "Cancel" buttons
---
packages/ui-default/components/preview/preview.page.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/ui-default/components/preview/preview.page.ts b/packages/ui-default/components/preview/preview.page.ts
index 54da6b936c..fc4387d40e 100644
--- a/packages/ui-default/components/preview/preview.page.ts
+++ b/packages/ui-default/components/preview/preview.page.ts
@@ -41,8 +41,8 @@ async function startEdit(filename, value, fileCategory = 'file') {
const dialogAction = (id) => [
tpl``,
- tpl``,
- tpl``,
+ tpl``,
+ tpl``,
];
function bindCopyLink(id, src: string) {