╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │264 }); │ │265 } │ │266 │ │267 - // events │ │268 - { │ │267 + // events, which a server only shows to whoever it shows undo to │ │268 + if (session.data.host_kind == .local or page.undo != null) { │ │269 var text_box = try wgt.TextBox.init(allocator, events_tab_label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │270 errdefer text_box.deinit(allocator); │ │271 text_box.getFocus().mode = .all; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │279 }); │ │280 } │ │281 │ │282 + if (page.undo != null) { │ │283 + const route = ui.RoutablePage.repoUndoRoute(identity, null) orelse return error.RouteTooLong; │ │284 + var text_box = try wgt.TextBox.init(allocator, "undo", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │285 + errdefer text_box.deinit(allocator); │ │286 + text_box.getFocus().mode = .all; │ │287 + text_box.getFocus().kind = .{ .custom = try ui.inPageTabLink(session, route, current_tag == .repo_undo) }; │ │288 + try tab_ids.put(allocator, text_box.getFocus().id, {}); │ │289 + if (current_tag == .repo_undo) selected_tab = text_box.getFocus().id; │ │290 + try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │291 + .widget = .{ .text_box = text_box }, │ │292 + .rect = null, │ │293 + .min_size = .{ .width = 6, .height = null }, │ │294 + }); │ │295 + } │ │296 + │ │297 // spacer pushes settings + auth to the right │ │298 { │ │299 var spacer = try ui.widget.Spacer.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯