╭ changed ─────────────╮ │src/ui/Fork/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │168 if (session.data.host_kind == .server) { │ │169 const label = ui.UserSettings.tabLabel(session); │ │170 const count_label = try ui.UserSettings.tabBottomLabel(session); │ │171 - var user_tab = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = count_label } });│ │171 + var user_tab = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = count_label }); │ │172 errdefer user_tab.deinit(allocator); │ │173 user_tab.getFocus().mode = .all; │ │174 user_tab.getFocus().kind = .{ .custom = user_link }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │175 try tab_ids.put(allocator, user_tab.getFocus().id, {}); │ │176 if (current_tag == .fork_user) selected_tab = user_tab.getFocus().id; │ │177 - try tabs_box.children.put(allocator, user_tab.getFocus().id, .{ .widget = .{ .text_box = user_tab }, .rect = null, .min_size = .{ .width = @max(label.len, count_label.len) + 2, .height = null } }); │ │177 + try tabs_box.children.put(allocator, user_tab.getFocus().id, .{ .widget = .{ .text_box = user_tab }, .rect = null, .min_size = .{ .width = @max(label.len, count_label.text.len) + 2, .height = null } });│ │178 } │ │179 │ │180 if (session.is_terminal) { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Home/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │176 { │ │177 const label = ui.UserSettings.tabLabel(session); │ │178 const count_label = try ui.UserSettings.tabBottomLabel(session); │ │179 - var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = count_label } });│ │179 + var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = count_label }); │ │180 errdefer text_box.deinit(allocator); │ │181 text_box.getFocus().mode = .all; │ │182 text_box.getFocus().kind = .{ .custom = user_link }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │185 try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │186 .widget = .{ .text_box = text_box }, │ │187 .rect = null, │ │188 - .min_size = .{ .width = @max(label.len, count_label.len) + 2, .height = null }, │ │188 + .min_size = .{ .width = @max(label.len, count_label.text.len) + 2, .height = null },│ │189 }); │ │190 } │ │191 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/Repo/Header.zig│ ╰──────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │363 .write => "(member)", │ │364 .read => "", │ │365 } else ""; │ │366 - var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .top_label = .{ .text = role_label }, .bottom_label = .{ .text = count_label } });│ │366 + var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .top_label = .{ .text = role_label }, .bottom_label = count_label }); │ │367 errdefer text_box.deinit(allocator); │ │368 text_box.getFocus().mode = .all; │ │369 text_box.getFocus().kind = .{ .custom = user_link }; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │372 try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │373 .widget = .{ .text_box = text_box }, │ │374 .rect = null, │ │375 - .min_size = .{ .width = @max(label.len, count_label.len, role_label.len) + 2, .height = null }, │ │375 + .min_size = .{ .width = @max(label.len, count_label.text.len, role_label.len) + 2, .height = null },│ │376 }); │ │377 } │ │378 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ─────────────╮ │src/ui/User/Header.zig│ ╰──────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │190 { │ │191 const label = ui.UserSettings.tabLabel(session); │ │192 const count_label = try ui.UserSettings.tabBottomLabel(session); │ │193 - var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = count_label } });│ │193 + var text_box = try wgt.TextBox.init(allocator, label, .{ .border = .single, .round_corners = true, .wrap_kind = .none, .bottom_label = count_label }); │ │194 errdefer text_box.deinit(allocator); │ │195 text_box.getFocus().mode = .all; │ │196 text_box.getFocus().kind = .{ .custom = user_link }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │199 try tabs_box.children.put(allocator, text_box.getFocus().id, .{ │ │200 .widget = .{ .text_box = text_box }, │ │201 .rect = null, │ │202 - .min_size = .{ .width = @max(label.len, count_label.len) + 2, .height = null }, │ │202 + .min_size = .{ .width = @max(label.len, count_label.text.len) + 2, .height = null },│ │203 }); │ │204 } │ │205 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────────╮ │src/ui/UserNotifications.zig│ ╰────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │112 const on_tab = std.meta.activeTag(session.data.current_page) == std.meta.activeTag(user_route); │ │113 const routes = [_]ui.RoutablePage{ user_route.withUserTab(.{}), settings_route, keys_route, delete_route }; │ │114 for ([_]ui.RoutablePage.UserView{ .notifications, .settings, .keys, .delete }, [_][]const u8{ "notifications", "user settings", "ssh keys", "delete user" }, routes, 0..) |view, label, route, index| {│ │115 - var tab = try wgt.TextBox.init(allocator, label, .{ .border = .hidden, .round_corners = true, .wrap_kind = .none }); │ │115 + const count_label = if (view == .notifications) try ui.UserSettings.notifCountLabel(session) else ""; │ │116 + var tab = try wgt.TextBox.init(allocator, label, .{ .border = .hidden, .round_corners = true, .wrap_kind = .none, .bottom_label = .{ .text = count_label } }); │ │117 errdefer tab.deinit(allocator); │ │118 tab.getFocus().mode = .all; │ │119 tab.getFocus().kind = .{ .custom = try ui.inPageTabLink(session, route, on_tab and data.view == view) }; │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │120 control_ids[index] = tab.getFocus().id; │ │120 - try header.children.put(allocator, tab.getFocus().id, .{ .widget = .{ .text_box = tab }, .rect = null, .min_size = .{ .width = label.len + 2, .height = null } }); │ │121 + try header.children.put(allocator, tab.getFocus().id, .{ .widget = .{ .text_box = tab }, .rect = null, .min_size = .{ .width = @max(label.len, count_label.len) + 2, .height = null } });│ │122 } │ │123 // the spacer pushes the buttons to the right edge │ │124 { │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯