mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
added comment section on card details to avoid loading the card comment activities from the server
- and added to show only the activities a card - to display the card comments a connection to the server was needed to get the activities of the card comments, now, it's not necessary - also performance relevant. until now there were a lot of activities loaded, now only of the current card
This commit is contained in:
parent
0196f46094
commit
8a446de3e9
21 changed files with 329 additions and 266 deletions
|
@ -634,6 +634,10 @@ Boards.attachSchema(
|
|||
decimal: true,
|
||||
defaultValue: -1,
|
||||
},
|
||||
showActivities: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -1544,6 +1548,10 @@ Boards.mutations({
|
|||
move(sortIndex) {
|
||||
return { $set: { sort: sortIndex } };
|
||||
},
|
||||
|
||||
toggleShowActivities() {
|
||||
return { $set: { showActivities: !this.showActivities } };
|
||||
},
|
||||
});
|
||||
|
||||
function boardRemover(userId, doc) {
|
||||
|
@ -1751,6 +1759,26 @@ if (Meteor.isServer) {
|
|||
}),
|
||||
).sort();
|
||||
},
|
||||
setAllBoardsHideActivities() {
|
||||
if (ReactiveCache.getCurrentUser()?.isAdmin) {
|
||||
Boards.update(
|
||||
{
|
||||
showActivities: true
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
showActivities: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
multi: true,
|
||||
},
|
||||
);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.methods({
|
||||
|
|
|
@ -473,6 +473,10 @@ Cards.attachSchema(
|
|||
optional: true,
|
||||
defaultValue: 0,
|
||||
},
|
||||
showActivities: {
|
||||
type: Boolean,
|
||||
defaultValue: false,
|
||||
},
|
||||
}),
|
||||
);
|
||||
|
||||
|
@ -2167,6 +2171,14 @@ Cards.mutations({
|
|||
}
|
||||
},
|
||||
|
||||
toggleShowActivities() {
|
||||
return {
|
||||
$set: {
|
||||
showActivities: !this.showActivities,
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
setCustomField(customFieldId, value) {
|
||||
// todo
|
||||
const index = this.customFieldIndex(customFieldId);
|
||||
|
|
|
@ -193,13 +193,6 @@ Users.attachSchema(
|
|||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'profile.hiddenSystemMessages': {
|
||||
/**
|
||||
* does the user want to hide system messages?
|
||||
*/
|
||||
type: Boolean,
|
||||
optional: true,
|
||||
},
|
||||
'profile.hiddenMinicardLabelText': {
|
||||
/**
|
||||
* does the user want to hide minicard label texts?
|
||||
|
@ -865,11 +858,6 @@ Users.helpers({
|
|||
return profile.hideCheckedItems || false;
|
||||
},
|
||||
|
||||
hasHiddenSystemMessages() {
|
||||
const profile = this.profile || {};
|
||||
return profile.hiddenSystemMessages || false;
|
||||
},
|
||||
|
||||
hasCustomFieldsGrid() {
|
||||
const profile = this.profile || {};
|
||||
return profile.customFieldsGrid || false;
|
||||
|
@ -1069,14 +1057,6 @@ Users.mutations({
|
|||
};
|
||||
},
|
||||
|
||||
toggleSystem(value = false) {
|
||||
return {
|
||||
$set: {
|
||||
'profile.hiddenSystemMessages': !value,
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
toggleFieldsGrid(value = false) {
|
||||
return {
|
||||
$set: {
|
||||
|
@ -1216,10 +1196,6 @@ Meteor.methods({
|
|||
const user = ReactiveCache.getCurrentUser();
|
||||
user.toggleHideCheckedItems();
|
||||
},
|
||||
toggleSystemMessages() {
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
user.toggleSystem(user.hasHiddenSystemMessages());
|
||||
},
|
||||
toggleCustomFieldsGrid() {
|
||||
const user = ReactiveCache.getCurrentUser();
|
||||
user.toggleFieldsGrid(user.hasCustomFieldsGrid());
|
||||
|
@ -1262,43 +1238,6 @@ Meteor.methods({
|
|||
|
||||
if (Meteor.isServer) {
|
||||
Meteor.methods({
|
||||
setAllUsersHideSystemMessages() {
|
||||
if (ReactiveCache.getCurrentUser()?.isAdmin) {
|
||||
// If setting is missing, add it
|
||||
Users.update(
|
||||
{
|
||||
'profile.hiddenSystemMessages': {
|
||||
$exists: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
'profile.hiddenSystemMessages': true,
|
||||
},
|
||||
},
|
||||
{
|
||||
multi: true,
|
||||
},
|
||||
);
|
||||
// If setting is false, set it to true
|
||||
Users.update(
|
||||
{
|
||||
'profile.hiddenSystemMessages': false,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
'profile.hiddenSystemMessages': true,
|
||||
},
|
||||
},
|
||||
{
|
||||
multi: true,
|
||||
},
|
||||
);
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
setCreateUser(
|
||||
fullname,
|
||||
username,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue