mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
feat: prompt on locked servers
This commit is contained in:
parent
8c7ae8acee
commit
8f3238e4de
@ -2677,6 +2677,17 @@ class TreeView(Gtk.TreeView):
|
||||
case WindowContext.TABLE_MODS | WindowContext.TABLE_LOG:
|
||||
self.update_quad_column(cr)
|
||||
case WindowContext.TABLE_SERVER | WindowContext.TABLE_API:
|
||||
record = self.get_record_dict()
|
||||
if record is None:
|
||||
return
|
||||
if Servers.is_passworded(record["ip"], int(record["qport"])):
|
||||
msg = (
|
||||
"This server is password-protected and you will be "
|
||||
"prompted when connecting. Do you want to proceed?"
|
||||
)
|
||||
res = spawn_dialog(msg, Popup.CONFIRM)
|
||||
if res is True:
|
||||
return
|
||||
self._attempt_connection()
|
||||
case _: # any other non-server option from the main menu
|
||||
process_tree_option(output)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user