╭ changed ─────────╮ │src/ui/AuthTab.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────╮ │ 7 const Key = xitui.input.Key; │ │ 8 const Grid = xitui.grid.Grid; │ │ 9 const Focus = xitui.focus.Focus; │ │10 + │ │11 +const login_tab_label = "login"; │ │12 +const logout_tab_label = "logout";│ │13 │ │14 pub const View = struct { │ │15 text_box: wgt.TextBox, │ ╰──────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │18 bottom_label_buf: [ui.clipped_bottom_label_max_len]u8, │ │19 │ │20 pub fn init(allocator: std.mem.Allocator, session: *ui.Session) !View { │ │18 - var text_box = try wgt.TextBox.init(allocator, "login", .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none }); │ │21 + var text_box = try wgt.TextBox.init(allocator, login_tab_label, .{ .border_style = .single, .rounded_corners = true, .wrap_kind = .none });│ │22 errdefer text_box.deinit(allocator); │ │23 text_box.getFocus().mode = .all; │ │24 text_box.getFocus().kind = .{ .custom = "ai:/auth" }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │34 } │ │35 │ │36 fn text(self: *const View) []const u8 { │ │34 - return if (self.session.data.user_id == null) "login" else "logout"; │ │37 + return if (self.session.data.user_id == null) login_tab_label else logout_tab_label;│ │38 } │ │39 │ │40 fn bottomLabel(self: *View) []const u8 { │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯