╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────╮ │20 │ │21 name: []const u8, │ │22 owner_name: []const u8, │ │23 +forker_name: []const u8,│ │24 title: ui.Title, │ │25 id: []const u8, │ │26 oid: []const u8, │ ╰────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │27 │ │28 const Self = @This(); │ │29 │ │29 -pub fn init(arena: *std.heap.ArenaAllocator, name: []const u8, owner_name: []const u8, id: []const u8, oid: []const u8) !Self { │ │30 +pub fn init(arena: *std.heap.ArenaAllocator, name: []const u8, owner_name: []const u8, forker_name: []const u8, id: []const u8, oid: []const u8) !Self {│ │31 return .{ │ │32 .name = name, │ │33 .owner_name = owner_name, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────╮ │34 + .forker_name = forker_name, │ │35 .title = try ui.Title.init(arena, name, .scanlines),│ │36 .id = try arena.allocator().dupe(u8, id), │ │37 .oid = try arena.allocator().dupe(u8, oid), │ ╰────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │63 │ │64 const aa = session.page_arena.allocator(); │ │65 const identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.owner_name, data.name }); │ │66 + const fork_identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.forker_name, data.name }); │ │67 const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, commits_tab_label ++ " ({d})", .{count}) else commits_tab_label;│ │68 var first_group_width = try data.title.width(); │ │69 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │100 │ │101 const current_tag = std.meta.activeTag(session.data.current_page); │ │102 const routes = [_]ui.RoutablePage{ │ │100 - ui.RoutablePage.forkPatchRoute(identity, data.id) orelse return error.RouteTooLong, │ │101 - ui.RoutablePage.forkDiffRoute(identity, data.id, 0, "") orelse return error.RouteTooLong, │ │102 - ui.RoutablePage.forkFilesRoute(identity, data.id, data.oid, "", 0) orelse return error.RouteTooLong, │ │103 - ui.RoutablePage.forkCommitsRoute(identity, data.id, data.oid, 0, "") orelse return error.RouteTooLong, │ │103 + ui.RoutablePage.forkPatchRoute(fork_identity, data.id) orelse return error.RouteTooLong, │ │104 + ui.RoutablePage.forkDiffRoute(fork_identity, data.id, 0, "") orelse return error.RouteTooLong, │ │105 + ui.RoutablePage.forkFilesRoute(fork_identity, data.id, data.oid, "", 0) orelse return error.RouteTooLong, │ │106 + ui.RoutablePage.forkCommitsRoute(fork_identity, data.id, data.oid, 0, "") orelse return error.RouteTooLong,│ │107 }; │ │108 const tags = [_]std.meta.Tag(ui.RoutablePage){ .fork_patch, .fork_diff, .fork_files, .fork_commits }; │ │109 const labels = [_][]const u8{ patch_tab_label, diff_tab_label, files_tab_label, commits_label }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │131 try tabs_box.children.put(allocator, spacer.getFocus().id, .{ .widget = .{ .spacer = spacer }, .rect = null, .min_size = null, .flex = .grow });│ │132 } │ │133 │ │131 - const settings_route = ui.RoutablePage.forkSettingsRoute(identity, data.id) orelse return error.RouteTooLong; │ │134 + const settings_route = ui.RoutablePage.forkSettingsRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │135 const settings_link = try ui.inPageTabLink(session, settings_route, current_tag == .fork_settings); │ │133 - const auth_route = ui.RoutablePage.forkAuthRoute(identity, data.id) orelse return error.RouteTooLong; │ │136 + const auth_route = ui.RoutablePage.forkAuthRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │137 const auth_link = try ui.inPageTabLink(session, auth_route, current_tag == .fork_auth); │ │138 │ │139 // settings are account preferences, so they require a login. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯