╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───────────╮ │src/ui/Home/Auth.zig│ ╰────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────╮ │38 var logout_view = try Logout.View.init(allocator, &data.logout, session, users_tab_id);│ │39 errdefer logout_view.deinit(allocator); │ │40 return .{ │ │41 - .focus = Focus.init(allocator, .container), │ │41 + .focus = Focus.init(.container), │ │42 .login = login_view, │ │43 .logout = logout_view, │ │44 .session = session, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────╮ │46 } │ │47 │ │48 pub fn deinit(self: *View, allocator: std.mem.Allocator) void {│ │49 - self.focus.deinit(); │ │49 + self.focus.deinit(allocator); │ │50 self.login.deinit(allocator); │ │51 self.logout.deinit(allocator); │ │52 } │ ╰───────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────╮ │56 if (self.session.data.user_id != null) { │ │57 try self.logout.build(allocator, constraint, root_focus); │ │58 if (self.logout.getGrid()) |inner_grid| { │ │59 - try self.focus.addChild(self.logout.getFocus(), inner_grid.size, 0, 0); │ │59 + try self.focus.addChild(allocator, self.logout.getFocus(), inner_grid.size, 0, 0);│ │60 } │ │61 self.focus.child_id = self.logout.getFocus().id; │ │62 } else { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────╮ │63 try self.login.build(allocator, constraint, root_focus); │ │64 if (self.login.getGrid()) |inner_grid| { │ │65 - try self.focus.addChild(self.login.getFocus(), inner_grid.size, 0, 0); │ │65 + try self.focus.addChild(allocator, self.login.getFocus(), inner_grid.size, 0, 0);│ │66 } │ │67 self.focus.child_id = self.login.getFocus().id; │ │68 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────────╮ │src/ui/Home/Auth/Login.zig│ ╰──────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │42 const button_index: usize = 2; │ │43 │ │44 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session, users_tab_id: usize) !View { │ │45 - var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .vert });│ │45 + var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │46 errdefer box.deinit(allocator); │ │47 // marks this subtree as an HTML form scope for the web overlay │ │48 box.getFocus().kind = .{ .custom = "form:/login" }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │50 var nav_ids: [3]usize = undefined; │ │51 │ │52 { │ │53 - var username = wgt.TextInput(ui.Widget).init(allocator, .{ .label = " username ", .name = "username", .rounded_corners = true });│ │53 + var username = wgt.TextInput(ui.Widget).init(.{ .label = " username ", .name = "username", .rounded_corners = true }); │ │54 errdefer username.deinit(allocator); │ │55 username.getFocus().focusable = true; │ │56 nav_ids[username_index] = username.getFocus().id; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │62 } │ │63 │ │64 { │ │65 - var password = wgt.TextInput(ui.Widget).init(allocator, .{ .label = " password ", .password = true, .name = "password", .rounded_corners = true });│ │65 + var password = wgt.TextInput(ui.Widget).init(.{ .label = " password ", .password = true, .name = "password", .rounded_corners = true }); │ │66 errdefer password.deinit(allocator); │ │67 password.getFocus().focusable = true; │ │68 nav_ids[password_index] = password.getFocus().id; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ──────────────────╮ │src/ui/Home/Auth/Logout.zig│ ╰───────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │27 const button_index: usize = 1; │ │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, .rounded_corners = true, .direction = .vert });│ │30 + var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .vert }); │ │31 errdefer box.deinit(allocator); │ │32 // marks this subtree as an HTML form scope for the web overlay │ │33 box.getFocus().kind = .{ .custom = "form:/logout" }; │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────╮ │34 │ │35 { │ │36 - var prompt = wgt.Text(ui.Widget).init(allocator, "are you sure?");│ │36 + var prompt = wgt.Text(ui.Widget).init("are you sure?"); │ │37 errdefer prompt.deinit(allocator); │ │38 try box.children.put(allocator, prompt.getFocus().id, .{ │ │39 .widget = .{ .text = prompt }, │ ╰──────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │28 const auth_tab_min_width: usize = @as(usize, "logout".len) + 2; │ │29 │ │30 pub fn init(allocator: std.mem.Allocator, data: *const Self, session: *ui.Session) !View { │ │31 - var box = try wgt.Box(ui.Widget).init(allocator, .{ .border_style = null, .rounded_corners = true, .direction = .horiz });│ │31 + var box = wgt.Box(ui.Widget).init(.{ .border_style = null, .rounded_corners = true, .direction = .horiz }); │ │32 errdefer box.deinit(allocator); │ │33 │ │34 var tab_ids: [3]usize = undefined; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯