Drag handle toggle at top left: Each touch/non-touch screen can

use different setting, because it's saved to browser localstorage,
not database. For example, when using Firefox Multi-Account Containers AddOn,
different browsers etc, when logged in as same user.

Thanks to hatl and xet7 !

Fixes #4715
This commit is contained in:
Lauri Ojansivu 2022-10-23 15:17:41 +03:00
parent 2d16e35ac4
commit e214bc55dc
5 changed files with 38 additions and 11 deletions

View file

@ -57,6 +57,19 @@ Template.header.events({
Session.set('currentList', this._id);
Session.set('currentCard', null);
},
'click .js-toggle-desktop-drag-handles'() {
//currentUser = Meteor.user();
//if (currentUser) {
// Meteor.call('toggleDesktopDragHandles');
//} else if (window.localStorage.getItem('showDesktopDragHandles')) {
if (window.localStorage.getItem('showDesktopDragHandles')) {
window.localStorage.removeItem('showDesktopDragHandles');
location.reload();
} else {
window.localStorage.setItem('showDesktopDragHandles', 'true');
location.reload();
}
},
});
Template.offlineWarning.events({