╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────╮ │10 const Grid = xitui.grid.Grid; │ │11 const Focus = xitui.focus.Focus; │ │12 │ │13 +const commits_tab_label = "commits"; │ │14 +const patch_tab_label = "patch"; │ │15 +const diff_tab_label = "diff"; │ │16 +const files_tab_label = "files"; │ │17 +const settings_tab_label = "settings"; │ │18 + │ │19 pub const AuthTab = @import("../AuthTab.zig");│ │20 │ │21 name: []const u8, │ ╰──────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │60 │ │61 const aa = session.page_arena.allocator(); │ │62 const identity = try std.fmt.allocPrint(aa, "{s}/{s}", .{ data.owner_name, data.name }); │ │57 - const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, "commits ({d})", .{count}) else "commits"; │ │63 + const commits_label = if (commit_count) |count| try std.fmt.allocPrint(aa, commits_tab_label ++ " ({d})", .{count}) else commits_tab_label;│ │64 var first_group_width = try data.title.width(); │ │65 │ │66 try ui.widget.addBackButton(allocator, &title_box, session); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │102 ui.RoutablePage.forkCommitsRoute(identity, data.id, data.oid, 0, "") orelse return error.RouteTooLong,│ │103 }; │ │104 const tags = [_]std.meta.Tag(ui.RoutablePage){ .fork_patch, .fork_diff, .fork_files, .fork_commits }; │ │ 99 - const labels = [_][]const u8{ "patch", "diff", "files", commits_label }; │ │105 + const labels = [_][]const u8{ patch_tab_label, diff_tab_label, files_tab_label, commits_label }; │ │106 var selected_tab: ?usize = null; │ │107 │ │108 for (routes, tags, labels) |route, tag, label| { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │134 │ │135 // settings are account preferences, so they require a login. │ │136 if (session.data.user_id != null) { │ │131 - var settings = try wgt.TextBox.init(allocator, "settings", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │137 + var settings = try wgt.TextBox.init(allocator, settings_tab_label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │138 errdefer settings.deinit(allocator); │ │139 settings.getFocus().mode = .all; │ │140 settings.getFocus().kind = .{ .custom = settings_link }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │141 try tab_ids.put(allocator, settings.getFocus().id, {}); │ │142 if (current_tag == .fork_settings) selected_tab = settings.getFocus().id; │ │137 - try tabs_box.children.put(allocator, settings.getFocus().id, .{ .widget = .{ .text_box = settings }, .rect = null, .min_size = .{ .width = "settings".len + 2, .height = null } }); │ │143 + try tabs_box.children.put(allocator, settings.getFocus().id, .{ .widget = .{ .text_box = settings }, .rect = null, .min_size = .{ .width = settings_tab_label.len + 2, .height = null } });│ │144 } │ │145 │ │146 // keep authentication within the fork page. │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯