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