feat: grey unicode icons without UI freezes

This commit is contained in:
Lauri Ojansivu 2025-12-22 23:26:30 +02:00
commit 4408eae158
9 changed files with 198 additions and 1 deletions

View file

@ -13,6 +13,13 @@ template(name="headerUserBar")
template(name="memberMenuPopup")
ul.pop-over-list
with currentUser
li
a.js-toggle-grey-icons(href="#")
| 🎨
| {{_ 'grey-icons'}}
if currentUser.profile
if currentUser.profile.GreyIcons
span(key="grey-icons-checkmark") ✅
li
a.js-my-cards(href="{{pathFor 'my-cards'}}")
| 📋
@ -27,7 +34,6 @@ template(name="memberMenuPopup")
| {{_ 'globalSearch-title'}}
li
a(href="{{pathFor 'home'}}")
| 🏠
| 🏠
| {{_ 'all-boards'}}
li

View file

@ -94,6 +94,15 @@ Template.memberMenuPopup.events({
'click .js-notifications-drawer-toggle'() {
Session.set('showNotificationsDrawer', !Session.get('showNotificationsDrawer'));
},
'click .js-toggle-grey-icons'(event) {
event.preventDefault();
const currentUser = ReactiveCache.getCurrentUser();
if (!currentUser || !Meteor.userId()) return;
const current = (currentUser.profile && currentUser.profile.GreyIcons) || false;
Meteor.call('toggleGreyIcons', (err) => {
if (err && process.env.DEBUG === 'true') console.error('toggleGreyIcons error', err);
});
},
'click .js-logout'(event) {
event.preventDefault();