╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Login.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
249 const user_id_stable = try self.session.arena.allocator().dupe(u8, &user_id); 250 self.session.data.user_id = user_id_stable; 251 self.session.data.login_failure = null; 252 253 // adopt the user's persisted prefs 254 try self.session.loadUserPrefs(); 255 256 // wipe the entered credentials so they don't linger if the 257 // user returns to this page after logging out 258 username_input.clear(allocator); 259 password_input.clear(allocator); 260 261 // jump focus back to the users tab — the login button we 262 // just pressed is about to be hidden by the tab-label swap 263 root_focus.setFocus(self.success_redirect_tab_id); 264 }, 265 } 266 } 267 }; 268