╭ changed ──────────────────╮ │src/ui/Home/Auth/Logout.zig│ ╰───────────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │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); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯