mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
When logged in, use database for setting, so that changes are
immediate. Only on public board use cookies. Comment out Collapse CSS that is not in use. Thanks to xet7 !
This commit is contained in:
parent
f595120e72
commit
351d4767d7
12 changed files with 318 additions and 131 deletions
|
|
@ -119,7 +119,19 @@ BlazeComponent.extendComponent({
|
|||
const cookies = new Cookies();
|
||||
|
||||
this.autorun(() => {
|
||||
if (!Utils.isMiniScreen() && cookies.has('showDesktopDragHandles')) {
|
||||
let showDesktopDragHandles = false;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
showDesktopDragHandles = (currentUser.profile || {}).showDesktopDragHandles;
|
||||
} else {
|
||||
if (cookies.has('showDesktopDragHandles')) {
|
||||
showDesktopDragHandles = true;
|
||||
} else {
|
||||
showDesktopDragHandles = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Utils.isMiniScreen() && showDesktopDragHandles) {
|
||||
$cards.sortable({
|
||||
handle: '.handle',
|
||||
});
|
||||
|
|
@ -163,12 +175,17 @@ BlazeComponent.extendComponent({
|
|||
|
||||
Template.list.helpers({
|
||||
showDesktopDragHandles() {
|
||||
import { Cookies } from 'meteor/ostrio:cookies';
|
||||
const cookies = new Cookies();
|
||||
if (cookies.has('showDesktopDragHandles')) {
|
||||
return true;
|
||||
currentUser = Meteor.user();
|
||||
if (currentUser) {
|
||||
return (currentUser.profile || {}).showDesktopDragHandles;
|
||||
} else {
|
||||
return false;
|
||||
import { Cookies } from 'meteor/ostrio:cookies';
|
||||
const cookies = new Cookies();
|
||||
if (cookies.has('showDesktopDragHandles')) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue