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