╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │36 tabs_id: usize, │ │37 first_group_width: usize, │ │38 │ │39 - pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │39 + pub fn init(allocator: std.mem.Allocator, data: *const Self, commit_count: ?u64, session: *ui.Session) !View { │ │40 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = .hidden, .rounded_corners = true, .direction = .horiz });│ │41 errdefer box.deinit(allocator); │ │42 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │53 │ │54 const aa = session.page_arena.allocator(); │ │55 const identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.owner_name, data.name }); │ │56 + const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, "commits ({d})", .{count}) else "commits";│ │57 var first_group_width = try data.title.width(); │ │58 │ │59 // the user's name links to their page. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │92 ui.RoutablePage.forkCommitsRoute(identity, data.id, data.oid, 0, "") orelse return error.RouteTooLong,│ │93 }; │ │94 const tags = [_]std.meta.Tag(ui.RoutablePage){ .fork_patch, .fork_files, .fork_commits }; │ │94 - const labels = [_][]const u8{ "patch", "files", "commits" }; │ │95 + const labels = [_][]const u8{ "patch", "files", commits_label }; │ │96 var selected_tab: ?usize = null; │ │97 │ │98 for (routes, tags, labels) |route, tag, label| { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯