╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Login.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
228 // adopt the user's name and persisted prefs 229 try self.session.loadUser(); 230 231 // wipe the entered credentials so they don't linger if the 232 // user returns to this page after logging out 233 username_input.clear(allocator); 234 password_input.clear(allocator); 235 236 // leave the auth tab for the page it belongs to, where the 237 // web's /login redirect also lands 238 try self.session.navigate(self.session.data.current_page.pageRoot()); 239 }, 240 } 241 } 242 243 fn rememberFailure(self: *View, failure: ui.Session.FormFeedback.LoginFailure, username: []const u8) !void { 244 self.session.data.form_feedback = .{ .login = .{ 245 .failure = failure, 246 .username = try self.session.arena.allocator().dupe(u8, username), 247 } }; 248 } 249 }; 250