From 13475f705c4c7fdaf070d28040ded5c2f1a03be7 Mon Sep 17 00:00:00 2001 From: DianaXWiki Date: Wed, 25 Feb 2026 13:42:37 +0200 Subject: [PATCH] Move fix to a higher scope - fixes also sidebar for notifications, support, teams --- customize.dist/src/less2/include/sidebar-layout.less | 8 ++++++++ www/common/inner/sidebar-layout.js | 2 +- www/notifications/inner.js | 2 +- www/settings/app-settings.less | 12 ------------ www/support/inner.js | 2 +- 5 files changed, 11 insertions(+), 15 deletions(-) diff --git a/customize.dist/src/less2/include/sidebar-layout.less b/customize.dist/src/less2/include/sidebar-layout.less index 86eab5a38..985d20afe 100644 --- a/customize.dist/src/less2/include/sidebar-layout.less +++ b/customize.dist/src/less2/include/sidebar-layout.less @@ -46,6 +46,14 @@ .cp-sidebarlayout-category { display: flex; align-items: center; + white-space: nowrap; + svg { + flex: 0 0 auto; + } + .cp-sidebarlayout-category-name { + overflow: hidden; + text-overflow: ellipsis; + } .leftside-menu-category_main(); box-shadow: @cryptpad_ui_shadow; &:focus-visible { diff --git a/www/common/inner/sidebar-layout.js b/www/common/inner/sidebar-layout.js index 6422d945b..6fa277d1e 100644 --- a/www/common/inner/sidebar-layout.js +++ b/www/common/inner/sidebar-layout.js @@ -378,7 +378,7 @@ define([ 'data-category': key }, [ icon, - category.name || Messages[`${app}_cat_${key}`] || key, + h('span.cp-sidebarlayout-category-name', category.name || Messages[`${app}_cat_${key}`] || key), ]); var $item = $(item).appendTo(container); Util.onClickEnter($item, function () { diff --git a/www/notifications/inner.js b/www/notifications/inner.js index 1c0700ba1..af5e91c53 100644 --- a/www/notifications/inner.js +++ b/www/notifications/inner.js @@ -245,7 +245,7 @@ define([ showCategories(categories[key]); }); - $category.append(Messages['notifications_cat_'+key] || key); + $category.append(h('span.cp-sidebarlayout-category-name', Messages['notifications_cat_'+key] || key)); }); showCategories(categories[active]); }; diff --git a/www/settings/app-settings.less b/www/settings/app-settings.less index 2ed1e4aaf..98fe4f2ef 100644 --- a/www/settings/app-settings.less +++ b/www/settings/app-settings.less @@ -65,18 +65,6 @@ } #cp-sidebarlayout-container { - #cp-sidebarlayout-leftside { - .cp-sidebarlayout-category { - white-space: nowrap; - svg { - flex: 0 0 auto; - } - .cp-sidebarlayout-category-name { - overflow: hidden; - text-overflow: ellipsis; - } - } - } #cp-sidebarlayout-rightside { input, button, span[tabindex="0"] { &:focus-visible { diff --git a/www/support/inner.js b/www/support/inner.js index e07c9c139..89ebef464 100644 --- a/www/support/inner.js +++ b/www/support/inner.js @@ -329,7 +329,7 @@ define([ showCategories(categories[key]); }); - $category.append(Messages['support_cat_'+key] || key); + $category.append(h('span.cp-sidebarlayout-category-name', Messages['support_cat_'+key] || key)); }); showCategories(categories[active]); };