diff --git a/tauri-app/src/components/Modal/SetPasswordModal.tsx b/tauri-app/src/components/Modal/SetPasswordModal.tsx
index aaa3d4b..40a8a46 100644
--- a/tauri-app/src/components/Modal/SetPasswordModal.tsx
+++ b/tauri-app/src/components/Modal/SetPasswordModal.tsx
@@ -95,12 +95,24 @@ export default function SetPasswordModal({
marginBottom: '16px',
};
- const labelStyle: React.CSSProperties = {
- display: 'block',
+ const rowStyle: React.CSSProperties = {
+ display: 'flex',
+ alignItems: 'center',
+ gap: '12px',
+ };
+
+ const rowLabelStyle: React.CSSProperties = {
fontSize: '13px',
fontWeight: 500,
color: 'var(--text-secondary)',
- marginBottom: '6px',
+ width: '60px',
+ flexShrink: 0,
+ textAlign: 'right',
+ };
+
+ const rowInputWrapStyle: React.CSSProperties = {
+ flex: 1,
+ position: 'relative',
};
const errorStyle: React.CSSProperties = {
@@ -153,18 +165,65 @@ export default function SetPasswordModal({
{hasPassword && (
-
-
+
+
+
+
setOldPassword(e.target.value)}
+ style={inputStyle}
+ onKeyDown={e => { if (e.key === 'Enter') handleSubmit(); }}
+ />
+
+
+
+
+
+ )}
+
+
+
- )}
-
-
-
-
-
setNewPassword(e.target.value)}
- style={inputStyle}
- onKeyDown={e => { if (e.key === 'Enter') handleSubmit(); }}
- />
-
-
-
{pwdTooShort ? '密码至少需要6位' : ''}
+
{pwdTooShort ? '密码至少需要6位' : ''}
-
-
-
setConfirmPassword(e.target.value)}
- style={inputStyle}
- onKeyDown={e => { if (e.key === 'Enter') handleSubmit(); }}
- />
-
+
+
+
+
setConfirmPassword(e.target.value)}
+ style={inputStyle}
+ onKeyDown={e => { if (e.key === 'Enter') handleSubmit(); }}
+ />
+
+
-
{pwdMismatch ? '两次输入的密码不一致' : ''}
+
{pwdMismatch ? '两次输入的密码不一致' : ''}