From 5a05e696a7ad3f2e8c6dcf6e0e91f0e1fc7474f6 Mon Sep 17 00:00:00 2001 From: YCC3741 Date: Sat, 25 Apr 2026 11:28:51 +0800 Subject: [PATCH 1/9] fix: restore double-click to copy OTP and hide account ID from row --- src/pages/AccountList.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/pages/AccountList.vue b/src/pages/AccountList.vue index ae192e2..4c2858b 100644 --- a/src/pages/AccountList.vue +++ b/src/pages/AccountList.vue @@ -313,6 +313,18 @@ function selectRow(a: ServiceAccount): void { account.selectedSid = a.sid } +/** + * Double-click on a row → select + fetch OTP + copy to clipboard. + * Mirrors WPF `lstViewAccount_MouseDoubleClick` which called + * `btnGetOtp_Click` on the double-clicked row. Banned rows are + * ignored (same guard as {@link selectRow}). + */ +function handleRowDblClick(a: ServiceAccount): void { + if (!a.is_enable) return + account.selectedSid = a.sid + void handleGetOtp() +} + /* --------------- logout --------------- */ async function handleLogout(): Promise { @@ -2243,6 +2255,7 @@ onBeforeUnmount(() => { }" :data-test="`account-row-${a.sid}`" @click="selectRow(a)" + @dblclick="handleRowDblClick(a)" >