╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Repos.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
106 .link = if (owner.len > 0) try std.fmt.allocPrint(aa, "a:/repo/{s}/{s}", .{ owner, repo.event.name }) else "", 107 }); 108 } 109 if (data.next_start) |next_start| 110 try items.append(aa, .{ .text = "next →", .link = try std.fmt.allocPrint(aa, "a:/repos/start:{d}", .{next_start}) }); 111 try self.list.setItems(allocator, items.items); 112 113 return self; 114 } 115 116 pub fn deinit(self: *View, allocator: std.mem.Allocator) void { 117 self.list.deinit(allocator); 118 } 119 120 pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void { 121 try self.list.build(allocator, constraint, root_focus); 122 } 123 124 pub fn input(self: *View, allocator: std.mem.Allocator, key: Key, root_focus: *Focus) !void { 125 try self.list.input(allocator, key, root_focus); 126 } 127 128 pub fn clearGrid(self: *View) void { 129 self.list.clearGrid(); 130 } 131 132 pub fn getGrid(self: View) ?Grid { 133 return self.list.getGrid(); 134 } 135 136 pub fn getFocus(self: *View) *Focus { 137 return self.list.getFocus(); 138 } 139 140 pub fn getSelectedIndex(self: View) ?usize { 141 return self.list.getSelectedIndex(); 142 } 143 }; 144