╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ User.zig ─────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
474 475 pub fn clearGrid(self: *ReposView) void { 476 self.box.clearGrid(); 477 } 478 479 pub fn getGrid(self: ReposView) ?Grid { 480 return self.box.getGrid(); 481 } 482 483 pub fn getFocus(self: *ReposView) *Focus { 484 return self.box.getFocus(); 485 } 486 487 // up leaves the tab from the search box 488 pub fn atTop(self: *ReposView) bool { 489 return self.headerActive(); 490 } 491 492 pub fn focusHeader(self: *ReposView, root_focus: *Focus) void { 493 root_focus.setFocus(self.searchBox().getFocus().id); 494 } 495 }; 496 497 // the first window of `name`'s repos 498 fn reposRoute(name: []const u8) ?ui.RoutablePage { 499 return .{ .user_repos = .{ .name = ui.RoutablePage.Array(evt.User.name_max_len).from(name) orelse return null } }; 500 } 501