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