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