╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Logout.zig ───────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
62 switch (key) { 63 .enter => try self.logOut(), 64 .mouse => |mouse| if (inp.leftClickOn(root_focus, self.logout_id, mouse)) try self.logOut(), 65 else => {}, 66 } 67 } 68 69 fn logOut(self: *View) !void { 70 self.session.logOut(); 71 // leave the auth tab for the page it belongs to, where the web's 72 // /logout redirect also lands 73 try self.session.navigate(self.session.data.current_page.pageRoot()); 74 } 75 76 pub fn clearGrid(self: *View) void { 77 self.center.clearGrid(); 78 } 79 80 pub fn getGrid(self: View) ?Grid { 81 return self.center.getGrid(); 82 } 83 84 pub fn getFocus(self: *View) *Focus { 85 return self.center.getFocus(); 86 } 87 88 pub fn atTop(self: View) bool { 89 _ = self; 90 return true; 91 } 92 }; 93