mirror of
https://github.com/TermoraDev/termora.git
synced 2026-01-16 02:12:58 +08:00
fix: ensure dialog title is set correctly in KeyboardInteractiveDialog
This commit is contained in:
@@ -27,12 +27,14 @@ class KeyboardInteractiveDialog(
|
||||
isModal = true
|
||||
isResizable = true
|
||||
controlsVisible = false
|
||||
title = I18n.getString("termora.new-host.title")
|
||||
|
||||
init()
|
||||
pack()
|
||||
size = Dimension(max(300, size.width), size.height)
|
||||
|
||||
// fix https://github.com/TermoraDev/termora/issues/1311
|
||||
pack()
|
||||
|
||||
setLocationRelativeTo(null)
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ class TerminalUserInteraction(
|
||||
)
|
||||
dialog.setLocationRelativeTo(owner)
|
||||
dialog.title = instruction ?: name ?: "OTP"
|
||||
dialog.title = StringUtils.defaultIfBlank(dialog.title, "OTP")
|
||||
passwords[i] = dialog.getText()
|
||||
if (passwords[i].isBlank()) {
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user