╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │91 │ │92 // every tab link is user-scoped so selecting one stays on this page — │ │93 // switching its stack and updating the url — instead of navigating to │ │95 - // the global settings or auth pages. the "ai:" prefix makes each an │ │94 + // the global new repo or auth pages. the "ai:" prefix makes each an │ │95 // in-page anchor: crossPageLink ignores it so a wasm click just switches│ │96 // tabs (the page already holds every tab's content), while the href is │ │97 // still followed with js off. allocated in the page arena so the focus │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │102 const current_link = try std.fmt.allocPrint(aa, "ai:{s}", .{try current_page.toUrl(session.page_arena)}); │ │103 const repos_link = if (current_tag == .user_repos) current_link else try std.fmt.allocPrint(aa, "ai:/user/{s}", .{data.name}); │ │104 const forks_link = if (current_tag == .user_forks) current_link else try std.fmt.allocPrint(aa, "ai:/user/{s}/forks", .{data.name}); │ │106 - const settings_link = if (current_tag == .user_settings) current_link else try std.fmt.allocPrint(aa, "ai:/user/{s}/settings", .{data.name});│ │105 const new_repo_link = if (current_tag == .user_new_repo) current_link else try std.fmt.allocPrint(aa, "ai:/user/{s}/new-repo", .{data.name});│ │106 const auth_link = if (current_tag == .user_auth) current_link else try std.fmt.allocPrint(aa, "ai:/user/{s}/auth", .{data.name}); │ │107 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────╮ │108 // the tab matching the current page is focused initially; matching by│ │109 // link (rather than position) keeps this robust to tab changes. │ │110 const selected_link: []const u8 = switch (current_page) { │ │113 - .user_settings => settings_link, │ │111 .user_new_repo => new_repo_link, │ │112 .user_auth => auth_link, │ │113 .user_forks => forks_link, │ ╰───────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────╮ │145 }); │ │146 } │ │147 │ │151 - // spacer pushes settings, new repo and auth to the right│ │148 + // spacer pushes new repo and auth to the right │ │149 { │ │150 var spacer = try ui.widget.Spacer.init(allocator); │ │151 errdefer spacer.deinit(allocator); │ ╰──────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │169 .widget = .{ .text_box = text_box }, │ │170 .rect = null, │ │171 .min_size = .{ .width = new_repo_tab_label.len + 2, .height = null }, │ │175 - }); │ │176 - } │ │177 - │ │178 - // settings tab. settings are account preferences, so it needs a login. │ │179 - if (session.data.user_id != null) { │ │180 - var text_box = try wgt.TextBox.init(allocator, settings_tab_label, .{ .border_style = .single, .round_corners = true, .wrap_kind = .none });│ │181 - errdefer text_box.deinit(allocator); │ │182 - text_box.getFocus().mode = .all; │ │183 - text_box.getFocus().kind = .{ .custom = settings_link }; │ │184 - try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │185 - if (std.mem.eql(u8, settings_link, selected_link)) selected_tab = text_box.getFocus().id; │ │186 - try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │187 - .widget = .{ .text_box = text_box }, │ │188 - .rect = null, │ │189 - .min_size = .{ .width = settings_tab_label.len + 2, .height = null }, │ │172 }); │ │173 } │ │174 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────────╮ │src/ui/widget.zig│ ╰─────────────────╯ ╭──────────────────────────────────────────────╮ │68 home_about: ui.Home.About.View, │ │69 home_users: ui.Home.Users.View, │ │70 auth_tab: ui.Home.Header.AuthTab.View,│ │71 - home_settings: ui.Home.Settings.View, │ │71 new_repo: ui.NewRepo.View, │ │72 home_auth: ui.Home.Auth.View, │ │73 auth_login: ui.Home.Auth.Login.View, │ ╰──────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │113 // whether moving up should return to the page header │ │114 pub fn atTop(self: *Widget, root_focus: *Focus) bool { │ │115 return switch (self.*) { │ │117 - inline .home_about, .home_users, .user_repos, .flow_box_scroll, .home_settings, .new_repo, .auth_login, .auth_logout, .quit, .repo_files, .repo_commits, .diff_view, .repo_refs, .repo_issues, .repo_patches, .repo_discussions, .repo_events, .repo_undo => |*view| view.atTop(),│ │116 + inline .home_about, .home_users, .user_repos, .flow_box_scroll, .new_repo, .auth_login, .auth_logout, .quit, .repo_files, .repo_commits, .diff_view, .repo_refs, .repo_issues, .repo_patches, .repo_discussions, .repo_events, .repo_undo => |*view| view.atTop(), │ │117 inline .home_auth, .repo_patch_detail => |*view| view.atTop(root_focus), │ │118 else => false, │ │119 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │493 try evt.User.toggleAnsi(evt.admin_repo_opts, io, allocator, &repo, users_dir, &user_id);│ │494 } │ │495 │ │496 - // return to the settings tab the toggle came from so the change is visible. │ │497 - const location = try std.fmt.allocPrint(allocator, "{s}/settings", .{base}); │ │496 + // return to the auth tab the toggle came from so the change is visible. │ │497 + const location = try std.fmt.allocPrint(allocator, "{s}/auth", .{base}); │ │498 defer allocator.free(location); │ │499 │ │500 // like logout, this is a bodyless POST, so close the connection rather than │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯