╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │72 // kinds that borrow them live as long as this page's widget tree. │ │73 const aa = session.page_arena.allocator(); │ │74 const repos_link = try std.fmt.allocPrint(aa, "ai:/user/{s}", .{data.name}); │ │75 + const forks_link = try std.fmt.allocPrint(aa, "ai:/user/{s}/forks", .{data.name}); │ │76 const settings_link = try std.fmt.allocPrint(aa, "ai:/user/{s}/settings", .{data.name});│ │77 const auth_link = try std.fmt.allocPrint(aa, "ai:/user/{s}/auth", .{data.name}); │ │78 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │81 const current_link: []const u8 = switch (session.data.current_page) {│ │82 .user_settings => settings_link, │ │83 .user_auth => auth_link, │ │84 + .user_forks => forks_link, │ │85 else => repos_link, │ │86 }; │ │87 var selected_tab: ?usize = null; │ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │101 }); │ │102 } │ │103 │ │104 + // forks tab │ │105 + { │ │106 + var text_box = try wgt.TextBox(ui.Widget).init(allocator, "forks", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │107 + errdefer text_box.deinit(allocator); │ │108 + text_box.getFocus().focusable = true; │ │109 + text_box.getFocus().kind = .{ .custom = forks_link }; │ │110 + try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │111 + if (std.mem.eql(u8, forks_link, current_link)) selected_tab = text_box.getFocus().id; │ │112 + try box.children.put(allocator, text_box.getFocus().id, .{ │ │113 + .widget = .{ .text_box = text_box }, │ │114 + .rect = null, │ │115 + .min_size = .{ .width = "forks".len + 2, .height = null }, │ │116 + }); │ │117 + } │ │118 + │ │119 // spacer pushes settings + auth to the right │ │120 { │ │121 var spacer = try ui.Spacer.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯