╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────╮ │src/ui/Fork.zig│ ╰───────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 96 - patch_data = Patches.init(.xit, .{}, arena, target_repo, io, haxy_moment, session, target_id, identity.identity, target_branch, "", "", &id_hex, "", 0, "", .open) catch |err| switch (err) {│ │102 + patch_data = Patches.init(.xit, .{}, arena, target_repo, io, haxy_moment, session, target_id, target_identity, target_branch, "", "", &id_hex, "", 0, "", .open) catch |err| switch (err) { │ │103 error.NotFound => patch_data, │ │104 else => |other| return other, │ │105 }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │151 }; │ │152 │ │153 return .{ │ │148 - .header = try Header.init(arena, target_record.event.name, owner.event.name, &id_hex, requested_value), │ │154 + .header = try Header.init(arena, target_record.event.name, owner.event.name, identity.owner, &id_hex, requested_value),│ │155 .files = files, │ │156 .commits = commits, │ │157 .patch = patch_data, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────╮ │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. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────╮ │src/ui/Home.zig│ ╰───────────────╯ ╭────────────────────────────────────────────────────╮ │12 │ │13 pub const About = @import("./Home/About.zig"); │ │14 pub const Users = @import("./Home/Users.zig"); │ │15 -pub const Repos = @import("./Home/Repos.zig"); │ │15 pub const Header = @import("./Home/Header.zig");│ │16 pub const Settings = @import("./Settings.zig"); │ │17 pub const Auth = @import("./Auth.zig"); │ ╰────────────────────────────────────────────────────╯ ╭───────────────────────╮ │20 header: Header, │ │21 about: About, │ │22 users: Users, │ │24 -repos: Repos, │ │23 settings: Settings,│ │24 auth: Auth, │ │25 quit: Quit, │ ╰───────────────────────╯ ╭──────╮ │next →│ ╰──────╯