Merge pull request #647 from nyakang/fix/password-reveal-620

fix(ui): avoid duplicate password reveal buttons on Windows
This commit is contained in:
Kang authored and GitHub committed 2026-09-11 12:18:20 +08:00
commit 241cb2da0f
10 files changed
+15

No files matched your search

@@ -603,6 +603,7 @@ function SecretInput({
<div className="relative mt-1">
<Input
ref={inputRef}
data-custom-password-reveal
type={showValue ? "text" : "password"}
value={value}
onChange={(event) => onChange(event.target.value)}
@@ -111,6 +111,7 @@ export default function DockerSudoPasswordDialog({
<div className="relative">
<Input
ref={inputRef}
data-custom-password-reveal
type={showPassword ? "text" : "password"}
value={password}
onChange={(event) => setPassword(event.target.value)}
@@ -174,6 +174,7 @@ export function CredentialEditorDialog({
</Label>
<div className="relative">
<Input
data-custom-password-reveal
type={showPassword ? "text" : "password"}
placeholder={
passwordLoading
@@ -259,6 +259,7 @@ export function KeyEditorDialog({
)}
<div className="relative">
<Input
data-custom-password-reveal
type={editShowPassphrase ? "text" : "password"}
placeholder={passphraseLoading ? t("common.loading") : t("settings.passphrase")}
className="h-8 pr-8 text-xs"
@@ -67,6 +67,7 @@ function PasswordEditor({
/>
<div className="relative">
<Input
data-custom-password-reveal
type={showPassword ? "text" : "password"}
placeholder={
passwordLoading
+1
View File
@@ -252,6 +252,7 @@ export function RdpForm({
<div className="relative mt-1">
<Input
className="h-8 pr-16 text-xs"
data-custom-password-reveal
type={showPassword ? "text" : "password"}
value={password}
placeholder={
+1
View File
@@ -917,6 +917,7 @@ export function SshForm({
</Label>
<div className="relative mt-1">
<Input
data-custom-password-reveal
type={showDirectPassword ? "text" : "password"}
className="text-xs h-8 pr-16"
placeholder={
+1
View File
@@ -328,6 +328,7 @@ export function TelnetForm({
</Label>
<div className="relative mt-1">
<Input
data-custom-password-reveal
type={showDirectPassword ? "text" : "password"}
className="text-xs h-8 pr-16"
placeholder={
+1
View File
@@ -208,6 +208,7 @@ export function VncForm({
<div className="relative mt-1">
<Input
className="h-8 pr-16 text-xs"
data-custom-password-reveal
type={showPassword ? "text" : "password"}
value={password}
placeholder={
+6
View File
@@ -305,6 +305,12 @@ textarea,
user-select: text;
}
/* Edge/WebView2 adds a native reveal button to password inputs. Hide it only
when NyaTerm renders its own password visibility control. */
input[data-custom-password-reveal]::-ms-reveal {
display: none;
}
.nyaterm-wallpaper-shell[data-wallpaper-enabled="true"] .xterm,
.nyaterm-wallpaper-shell[data-wallpaper-enabled="true"] .xterm .xterm-viewport,
.nyaterm-wallpaper-shell[data-wallpaper-enabled="true"] .xterm .xterm-screen,