mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: OTP dialog width
This commit is contained in:
@@ -12,6 +12,7 @@ import java.awt.Dimension
|
||||
import java.awt.Window
|
||||
import javax.swing.JComponent
|
||||
import javax.swing.text.JTextComponent
|
||||
import kotlin.math.max
|
||||
|
||||
class KeyboardInteractiveDialog(
|
||||
owner: Window,
|
||||
@@ -30,7 +31,8 @@ class KeyboardInteractiveDialog(
|
||||
|
||||
init()
|
||||
pack()
|
||||
size = Dimension(300, size.height)
|
||||
size = Dimension(max(300, size.width), size.height)
|
||||
|
||||
setLocationRelativeTo(null)
|
||||
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class TerminalUserInteraction(
|
||||
true
|
||||
)
|
||||
dialog.setLocationRelativeTo(owner)
|
||||
dialog.title = instruction ?: name ?: StringUtils.EMPTY
|
||||
dialog.title = instruction ?: name ?: "OTP"
|
||||
passwords[i] = dialog.getText()
|
||||
if (passwords[i].isBlank()) {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user