╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────╮ │14 const patch_tab_label = "patch"; │ │15 const diff_tab_label = "diff"; │ │16 const files_tab_label = "files"; │ │17 -const new_repo_tab_label = "new"; │ │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");│ │22 │ ╰──────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │123 }); │ │124 } │ │125 │ │125 - // spacer pushes new repo and auth to the right. │ │126 + // spacer pushes new repo, new user, and auth to the right.│ │127 { │ │128 var spacer = try ui.widget.Spacer.init(allocator); │ │129 errdefer spacer.deinit(allocator); │ ╰────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │132 │ │133 const new_repo_route = ui.RoutablePage.forkNewRepoRoute(fork_identity, data.id) orelse return error.RouteTooLong;│ │134 const new_repo_link = try ui.inPageTabLink(session, new_repo_route, current_tag == .fork_new_repo); │ │135 + const new_user_route = ui.RoutablePage.forkNewUserRoute(fork_identity, data.id) orelse return error.RouteTooLong;│ │136 + const new_user_link = try ui.inPageTabLink(session, new_user_route, current_tag == .fork_new_user); │ │137 const auth_route = ui.RoutablePage.forkAuthRoute(fork_identity, data.id) orelse return error.RouteTooLong; │ │138 const auth_link = try ui.inPageTabLink(session, auth_route, current_tag == .fork_auth); │ │139 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │137 - // repos are created for the logged-in user. │ │140 + // new repo tab with a login, new user tab without one outside local mode │ │141 if (session.data.user_id != null) { │ │139 - var new_repo = try wgt.TextBox.init(allocator, new_repo_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = new_repo_tab_bottom_label });│ │142 + var new_repo = try wgt.TextBox.init(allocator, new_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = new_repo_tab_bottom_label }); │ │143 errdefer new_repo.deinit(allocator); │ │144 new_repo.getFocus().mode = .all; │ │145 new_repo.getFocus().kind = .{ .custom = new_repo_link }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │146 try tab_ids.put(allocator, new_repo.getFocus().id, {}); │ │147 if (current_tag == .fork_new_repo) selected_tab = new_repo.getFocus().id; │ │145 - try tabs_box.children.put(allocator, new_repo.getFocus().id, .{ .widget = .{ .text_box = new_repo }, .rect = null, .min_size = .{ .width = @max(new_repo_tab_label.len, new_repo_tab_bottom_label.len) + 2, .height = null } });│ │148 + try tabs_box.children.put(allocator, new_repo.getFocus().id, .{ .widget = .{ .text_box = new_repo }, .rect = null, .min_size = .{ .width = @max(new_tab_label.len, new_repo_tab_bottom_label.len) + 2, .height = null } }); │ │149 + } else if (session.data.host_kind == .server) { │ │150 + var new_user = try wgt.TextBox.init(allocator, new_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = new_user_tab_bottom_label }); │ │151 + errdefer new_user.deinit(allocator); │ │152 + new_user.getFocus().mode = .all; │ │153 + new_user.getFocus().kind = .{ .custom = new_user_link }; │ │154 + try tab_ids.put(allocator, new_user.getFocus().id, {}); │ │155 + if (current_tag == .fork_new_user) selected_tab = new_user.getFocus().id; │ │156 + 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 } }); │ │157 } │ │158 │ │159 // keep authentication within the fork page. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯