From a870142b7bcc66313017b9869669d090e59b06ca Mon Sep 17 00:00:00 2001 From: shuaiplus <2327005759@qq.com> Date: Tue, 7 Jul 2026 00:31:56 +0800 Subject: [PATCH] Show password indicator and masked password field for encrypted sends - Add password and authType fields to Send type - Show lock icon in send list for password-protected sends - Display masked dots in password field when editing a send that has a password set - Add Remove button to clear existing password --- webapp/src/components/SendsPage.tsx | 28 +++++++++++++++++++++------- webapp/src/lib/types.ts | 3 +++ webapp/src/styles/vault.css | 5 +++++ 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/webapp/src/components/SendsPage.tsx b/webapp/src/components/SendsPage.tsx index 8a788e1..0b88e67 100644 --- a/webapp/src/components/SendsPage.tsx +++ b/webapp/src/components/SendsPage.tsx @@ -1,5 +1,5 @@ import { useEffect, useMemo, useRef, useState } from 'preact/hooks'; -import { CheckCheck, ChevronLeft, Copy, Eye, EyeOff, File, FileText, LayoutGrid, Pencil, Plus, RefreshCw, Save, Send as SendIcon, Trash2, X } from 'lucide-preact'; +import { CheckCheck, ChevronLeft, Copy, Eye, EyeOff, File, FileText, LayoutGrid, Lock, Pencil, Plus, RefreshCw, Save, Send as SendIcon, Trash2, X } from 'lucide-preact'; import { copyTextToClipboard } from '@/lib/clipboard'; import LoadingState from '@/components/LoadingState'; import type { Send, SendDraft } from '@/lib/types'; @@ -43,6 +43,7 @@ function buildDefaultDraft(): SendDraft { expirationDays: '0', maxAccessCount: '', password: '', + hasPassword: false, disabled: false, }; } @@ -59,6 +60,7 @@ function draftFromSend(send: Send): SendDraft { expirationDays: daysFromNow(send.expirationDate, 0), maxAccessCount: send.maxAccessCount !== null && send.maxAccessCount !== undefined ? String(send.maxAccessCount) : '', password: '', + hasPassword: !!send.password, disabled: !!send.disabled, }; } @@ -380,6 +382,7 @@ export default function SendsPage(props: SendsPageProps) {