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