mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
feat: prompt on locked servers
This commit is contained in:
1 parent
8c7ae8acee
commit
8f3238e4de
1 file changed
+11
@@ -2677,6 +2677,17 @@ class TreeView(Gtk.TreeView):
|
|||||||
case WindowContext.TABLE_MODS | WindowContext.TABLE_LOG:
|
case WindowContext.TABLE_MODS | WindowContext.TABLE_LOG:
|
||||||
self.update_quad_column(cr)
|
self.update_quad_column(cr)
|
||||||
case WindowContext.TABLE_SERVER | WindowContext.TABLE_API:
|
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()
|
self._attempt_connection()
|
||||||
case _: # any other non-server option from the main menu
|
case _: # any other non-server option from the main menu
|
||||||
process_tree_option(output)
|
process_tree_option(output)
|
||||||
|
|||||||
Reference in new issue
Block a user