diff --git a/icloud_gui.py b/icloud_gui.py
index f03c493..2067218 100644
--- a/icloud_gui.py
+++ b/icloud_gui.py
@@ -1186,23 +1186,27 @@ class AuthPage(Gtk.Box):
tfa_card.pack_start(self.tfa_status, False, False, 0)
self.pack_start(tfa_card, False, False, 0)
- def _on_auth(self, _):
+ def _on_auth(self, btn):
+ btn.set_sensitive(False)
+ btn.set_label("Signing in…")
args = ["auth"]
if self.sms_check.get_active():
args.append("--force-sms")
if self.debug_check.get_active():
args.append("--debug")
- self.status_label.set_markup('Connecting to Apple...')
+ self.status_label.set_markup('Connecting to Apple — a code will be sent to your device…')
def _worker():
rc, out, err = icloudctl(*args)
- GLib.idle_add(self._auth_result, rc, out + err)
+ GLib.idle_add(self._auth_result, rc, out + err, btn)
threading.Thread(target=_worker, daemon=True).start()
- def _auth_result(self, rc, output):
- if "two-factor" in output.lower() or "verification" in output.lower() or "2fa" in output.lower():
+ def _auth_result(self, rc, output, btn):
+ btn.set_sensitive(True)
+ btn.set_label("Sign in with Apple ID")
+ if "two-factor" in output.lower() or "verification" in output.lower() or "2fa" in output.lower() or "enter" in output.lower():
self.status_label.set_markup(
- 'A code was sent to your Apple device — enter it below.'
+ 'Code sent — enter it in the box below.'
)
self.tfa_entry.grab_focus()
elif rc == 0: