╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────╮ │17 const new_tab_label = "new"; │ │18 const new_repo_tab_bottom_label = "repo"; │ │19 const new_user_tab_bottom_label = "user"; │ │20 - │ │21 -pub const AuthTab = @import("../AuthTab.zig");│ │20 │ │21 name: []const u8, │ │22 forker_name: []const u8, │ ╰──────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │126 }); │ │127 } │ │128 │ │131 - // spacer pushes new repo, new user, and auth to the right.│ │129 + // spacer pushes new repo, new user, and user to the right.│ │130 { │ │131 var spacer = try ui.widget.Spacer.init(allocator); │ │132 errdefer spacer.deinit(allocator); │ ╰────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │137 const new_repo_link = try ui.inPageTabLink(session, new_repo_route, current_tag == .fork_new_repo); │ │138 const new_user_route = ui.RoutablePage.forkNewUserRoute(fork_identity, data.id) orelse return error.RouteTooLong;│ │139 const new_user_link = try ui.inPageTabLink(session, new_user_route, current_tag == .fork_new_user); │ │142 - const auth_route = ui.RoutablePage.forkAuthRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │143 - const auth_link = try ui.inPageTabLink(session, auth_route, current_tag == .fork_auth); │ │140 + const user_route = ui.RoutablePage.forkUserRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │141 + const user_link = try ui.inPageTabLink(session, user_route, current_tag == .fork_user); │ │142 │ │143 // new repo tab with a login, new user tab without one outside local mode │ │144 if (session.data.user_id != null) { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │159 try tabs_box.children.put(allocator, new_user.getFocus().id, .{ .widget = .{ .text_box = new_user }, .rect = null, .min_size = .{ .width = @max(new_tab_label.len, new_user_tab_bottom_label.len) + 2, .height = null } });│ │160 } │ │161 │ │164 - // keep authentication within the fork page. │ │162 if (session.data.host_kind == .server) { │ │166 - var auth_tab = try AuthTab.View.init(allocator, session); │ │167 - errdefer auth_tab.deinit(allocator); │ │168 - auth_tab.text_box.getFocus().kind = .{ .custom = auth_link }; │ │169 - try tab_ids.put(allocator, auth_tab.getFocus().id, {}); │ │170 - if (current_tag == .fork_auth) selected_tab = auth_tab.getFocus().id; │ │171 - try tabs_box.children.put(allocator, auth_tab.getFocus().id, .{ .widget = .{ .auth_tab = auth_tab }, .rect = null, .min_size = .{ .width = auth_tab.minWidth(), .height = null } }); │ │163 + const label = ui.UserLogout.tabLabel(session); │ │164 + var user_tab = try wgt.TextBox.init(allocator, label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none }); │ │165 + errdefer user_tab.deinit(allocator); │ │166 + user_tab.getFocus().mode = .all; │ │167 + user_tab.getFocus().kind = .{ .custom = user_link }; │ │168 + try tab_ids.put(allocator, user_tab.getFocus().id, {}); │ │169 + if (current_tag == .fork_user) selected_tab = user_tab.getFocus().id; │ │170 + try tabs_box.children.put(allocator, user_tab.getFocus().id, .{ .widget = .{ .text_box = user_tab }, .rect = null, .min_size = .{ .width = label.len + 2, .height = null } }); │ │171 } │ │172 │ │173 if (session.is_terminal) { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │224 for (tabs_box.children.keys(), tabs_box.children.values()) |id, *child| { │ │225 const text_box: ?*wgt.TextBox = switch (child.widget) { │ │226 .text_box => |*value| value, │ │228 - .auth_tab => |*auth_tab| blk: { │ │229 - child.min_size = .{ .width = auth_tab.minWidth(), .height = null };│ │230 - break :blk &auth_tab.text_box; │ │231 - }, │ │227 else => null, │ │228 }; │ │229 if (text_box) |tab| ui.widget.markSelected(tab, selected_tab == id); │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯