╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Patches.zig ──────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
709 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.drafts)); 710 var label_buf: [64]u8 = undefined; 711 const label = try std.fmt.bufPrint(&label_buf, "drafts ({d})", .{data.drafts.count}); 712 try header.addTab(allocator, label, link, View.viewIndex(.drafts)); 713 } 714 715 // conflicts tab, labeled with the conflict count 716 if (data.conflicts.count > 0) { 717 const route = ui.RoutablePage.repoPatchesConflictsRoute(data.identity, "") orelse return error.RouteTooLong; 718 const link = try ui.inPageTabLink(session, route, page_selected and selected_index == View.viewIndex(.conflicts)); 719 var label_buf: [64]u8 = undefined; 720 const label = try std.fmt.bufPrint(&label_buf, "conflicts ({d})", .{data.conflicts.count}); 721 try header.addTab(allocator, label, link, View.viewIndex(.conflicts)); 722 } 723 724 header.select(View.viewIndex(data.view)); 725 return header; 726 } 727