╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────╮ │10 const Focus = xitui.focus.Focus; │ │11 │ │12 const about_tab_label = "about"; │ │13 -const repos_tab_label = "repos"; │ │13 const users_tab_label = "users"; │ │14 const settings_tab_label = "settings";│ │15 │ ╰──────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │90 // link (rather than position) keeps this robust to tab changes. │ │91 const current_tag = std.meta.activeTag(session.data.current_page); │ │92 const about_link = try ui.inPageTabLink(session, .home_about, current_tag == .home_about); │ │94 - const repos_link = try ui.inPageTabLink(session, .{ .home_repos = 0 }, current_tag == .home_repos);│ │93 const users_link = try ui.inPageTabLink(session, .{ .home_users = 0 }, current_tag == .home_users);│ │94 const settings_link = try ui.inPageTabLink(session, .home_settings, current_tag == .home_settings);│ │95 const auth_link = try ui.inPageTabLink(session, .home_auth, current_tag == .home_auth); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────╮ │96 const current_link: []const u8 = switch (current_tag) {│ │99 - .home_repos => repos_link, │ │97 .home_users => users_link, │ │98 .home_settings => settings_link, │ │99 .home_auth => auth_link, │ ╰───────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │113 .widget = .{ .text_box = text_box }, │ │114 .rect = null, │ │115 .min_size = .{ .width = about_tab_label.len + 2, .height = null }, │ │119 - }); │ │120 - } │ │121 - │ │122 - // repos tab │ │123 - { │ │124 - var text_box = try wgt.TextBox.init(allocator, repos_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │125 - errdefer text_box.deinit(allocator); │ │126 - text_box.getFocus().mode = .all; │ │127 - text_box.getFocus().kind = .{ .custom = repos_link }; │ │128 - try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │129 - if (std.mem.eql(u8, repos_link, current_link)) selected_tab = text_box.getFocus().id; │ │130 - try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │131 - .widget = .{ .text_box = text_box }, │ │132 - .rect = null, │ │133 - .min_size = .{ .width = repos_tab_label.len + 2, .height = null }, │ │116 }); │ │117 } │ │118 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯