╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ─────────────────╮ │src/ui/Home/Auth/Login.zig│ ╰──────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────╮ │146 // submit on Enter from any nav field — typical "press Enter in│ │147 // a form to submit" UX │ │148 .enter => { │ │149 - try self.submit(root_focus); │ │149 + try self.submit(allocator, root_focus); │ │150 return; │ │151 }, │ │152 else => {}, │ ╰────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │161 if (mouse.x >= r.x and mouse.y >= r.y and │ │162 mouse.x < r.x + r.size.width and mouse.y < r.y + r.size.height)│ │163 { │ │164 - try self.submit(root_focus); │ │164 + try self.submit(allocator, root_focus); │ │165 return; │ │166 } │ │167 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │177 const password_len_before = password_input.content.items.len; │ │178 │ │179 if (box.children.getIndex(child_id)) |idx| { │ │180 - try box.children.values()[idx].widget.input(key, root_focus); │ │180 + try box.children.values()[idx].widget.input(allocator, key, root_focus);│ │181 } │ │182 │ │183 if (username_input.content.items.len != username_len_before or │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │211 return null; │ │212 } │ │213 │ │214 - fn submit(self: *View, root_focus: *Focus) !void { │ │214 + fn submit(self: *View, allocator: std.mem.Allocator, root_focus: *Focus) !void {│ │215 if (comptime wasm) { │ │216 // no DB cursor available on the wasm render path │ │217 self.status = .unknown_user; │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────╮ │262 │ │263 // wipe the entered credentials so they don't linger if the │ │264 // user returns to this page after logging out. │ │265 - username_input.clear(); │ │266 - password_input.clear(); │ │265 + username_input.clear(allocator); │ │266 + password_input.clear(allocator); │ │267 │ │268 // jump focus back to the users tab — the login button we │ │269 // just pressed is about to be hidden by the tab-label swap.│ ╰─────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────────╮ │src/ui/Home/Auth/Logout.zig│ ╰───────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │28 │ │29 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session, users_tab_id: usize) !View {│ │30 var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .direction = .vert }); │ │31 - errdefer box.deinit(); │ │31 + errdefer box.deinit(allocator); │ │32 │ │33 { │ │34 var prompt = wgt.Text(ui.Widget).init(allocator, "are you sure?"); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────╮ │35 - errdefer prompt.deinit(); │ │35 + errdefer prompt.deinit(allocator); │ │36 try box.children.put(allocator, prompt.getFocus().id, .{│ │37 .widget = .{ .text = prompt }, │ │38 .rect = null, │ ╰────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │43 var button_id: usize = undefined; │ │44 { │ │45 var button = try wgt.TextBox(ui.Widget).init(allocator, "logout", .{ .border_style = .single, .wrap_kind = .none });│ │46 - errdefer button.deinit(); │ │46 + errdefer button.deinit(allocator); │ │47 button.getFocus().focusable = true; │ │48 // the renderer distinguishes plain clickables from buttons that │ │49 // should POST to a server route by this kind. │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │67 }; │ │68 } │ │69 │ │70 - pub fn deinit(self: *View) void { │ │71 - self.center.deinit(); │ │70 + pub fn deinit(self: *View, allocator: std.mem.Allocator) void { │ │71 + self.center.deinit(allocator); │ │72 } │ │73 │ │74 - pub fn build(self: *View, constraint: layout.Constraint, root_focus: *Focus) !void { │ │74 + pub fn build(self: *View, allocator: std.mem.Allocator, constraint: layout.Constraint, root_focus: *Focus) !void {│ │75 const box = &self.center.child.box; │ │76 const button = &box.children.values()[button_index].widget.text_box; │ │77 button.options.border_style = if (root_focus.grandchild_id == self.button_id) │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │78 .double │ │79 else │ │80 .single; │ │81 - try self.center.build(constraint, root_focus); │ │81 + try self.center.build(allocator, constraint, root_focus); │ │82 } │ │83 │ │84 - pub fn input(self: *View, key: inp.Key, root_focus: *Focus) !void { │ │84 + pub fn input(self: *View, allocator: std.mem.Allocator, key: inp.Key, root_focus: *Focus) !void {│ │85 + _ = allocator; │ │86 switch (key) { │ │87 .enter => { │ │88 try self.logout(root_focus); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯