mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Hide minicard label text: per user checkbox setting at sidebar.
Thanks to xet7 ! Closes #1466, closes #2561
This commit is contained in:
parent
9e60b41438
commit
f7e0b837d3
56 changed files with 36308 additions and 36205 deletions
|
|
@ -8,9 +8,12 @@ template(name="minicard")
|
||||||
if labels
|
if labels
|
||||||
.minicard-labels
|
.minicard-labels
|
||||||
each labels
|
each labels
|
||||||
span.card-label(class="card-label-{{color}}" title=name)
|
unless hiddenMinicardLabelText
|
||||||
+viewer
|
span.card-label(class="card-label-{{color}}" title=name)
|
||||||
= name
|
+viewer
|
||||||
|
= name
|
||||||
|
if hiddenMinicardLabelText
|
||||||
|
.minicard-label(class="card-label-{{color}}" title="{{name}}")
|
||||||
.minicard-title
|
.minicard-title
|
||||||
.handle
|
.handle
|
||||||
.fa.fa-arrows
|
.fa.fa-arrows
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,17 @@ BlazeComponent.extendComponent({
|
||||||
Utils.goBoardId(this.data().linkedId);
|
Utils.goBoardId(this.data().linkedId);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
'click .js-toggle-minicard-label-text'() {
|
||||||
|
Meteor.call('toggleMinicardLabelText');
|
||||||
|
},
|
||||||
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
}).register('minicard');
|
}).register('minicard');
|
||||||
|
|
||||||
|
Template.minicard.helpers({
|
||||||
|
hiddenMinicardLabelText() {
|
||||||
|
return Meteor.user().hasHiddenMinicardLabelText();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,11 @@ template(name='homeSidebar')
|
||||||
+membersWidget
|
+membersWidget
|
||||||
hr
|
hr
|
||||||
+labelsWidget
|
+labelsWidget
|
||||||
|
ul#cards.label-text-hidden
|
||||||
|
a.flex.js-toggle-minicard-label-text
|
||||||
|
span {{_ 'hide-minicard-label-text'}}
|
||||||
|
b
|
||||||
|
.materialCheckBox(class="{{#if hiddenMinicardLabelText}}is-checked{{/if}}")
|
||||||
hr
|
hr
|
||||||
unless currentUser.isNoComments
|
unless currentUser.isNoComments
|
||||||
h3
|
h3
|
||||||
|
|
|
||||||
|
|
@ -101,6 +101,9 @@ BlazeComponent.extendComponent({
|
||||||
'click .js-hide-sidebar': this.hide,
|
'click .js-hide-sidebar': this.hide,
|
||||||
'click .js-toggle-sidebar': this.toggle,
|
'click .js-toggle-sidebar': this.toggle,
|
||||||
'click .js-back-home': this.setView,
|
'click .js-back-home': this.setView,
|
||||||
|
'click .js-toggle-minicard-label-text'() {
|
||||||
|
Meteor.call('toggleMinicardLabelText');
|
||||||
|
},
|
||||||
'click .js-shortcuts'() {
|
'click .js-shortcuts'() {
|
||||||
FlowRouter.go('shortcuts');
|
FlowRouter.go('shortcuts');
|
||||||
},
|
},
|
||||||
|
|
@ -111,6 +114,12 @@ BlazeComponent.extendComponent({
|
||||||
|
|
||||||
Blaze.registerHelper('Sidebar', () => Sidebar);
|
Blaze.registerHelper('Sidebar', () => Sidebar);
|
||||||
|
|
||||||
|
Template.homeSidebar.helpers({
|
||||||
|
hiddenMinicardLabelText() {
|
||||||
|
return Meteor.user().hasHiddenMinicardLabelText();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
EscapeActions.register(
|
EscapeActions.register(
|
||||||
'sidebarView',
|
'sidebarView',
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
1449
i18n/ar.i18n.json
1449
i18n/ar.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/bg.i18n.json
1449
i18n/bg.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/br.i18n.json
1449
i18n/br.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ca.i18n.json
1449
i18n/ca.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/cs.i18n.json
1449
i18n/cs.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/da.i18n.json
1449
i18n/da.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/de.i18n.json
1449
i18n/de.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/el.i18n.json
1449
i18n/el.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/en-GB.i18n.json
1449
i18n/en-GB.i18n.json
File diff suppressed because it is too large
Load diff
|
|
@ -724,5 +724,6 @@
|
||||||
"act-duenow": "was reminding the current due (__timeValue__) of __card__ is now",
|
"act-duenow": "was reminding the current due (__timeValue__) of __card__ is now",
|
||||||
"act-atUserComment": "You were mentioned in [__board__] __card__",
|
"act-atUserComment": "You were mentioned in [__board__] __card__",
|
||||||
"delete-user-confirm-popup": "Are you sure you want to delete this account? There is no undo.",
|
"delete-user-confirm-popup": "Are you sure you want to delete this account? There is no undo.",
|
||||||
"accounts-allowUserDelete": "Allow users to self delete their account"
|
"accounts-allowUserDelete": "Allow users to self delete their account",
|
||||||
|
"hide-minicard-label-text": "Hide minicard label text"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1449
i18n/eo.i18n.json
1449
i18n/eo.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/es-AR.i18n.json
1449
i18n/es-AR.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/es.i18n.json
1449
i18n/es.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/eu.i18n.json
1449
i18n/eu.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/fa.i18n.json
1449
i18n/fa.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/fi.i18n.json
1449
i18n/fi.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/fr.i18n.json
1449
i18n/fr.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/gl.i18n.json
1449
i18n/gl.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/he.i18n.json
1449
i18n/he.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/hi.i18n.json
1449
i18n/hi.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/hu.i18n.json
1449
i18n/hu.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/hy.i18n.json
1449
i18n/hy.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/id.i18n.json
1449
i18n/id.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ig.i18n.json
1449
i18n/ig.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/it.i18n.json
1449
i18n/it.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ja.i18n.json
1449
i18n/ja.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ka.i18n.json
1449
i18n/ka.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/km.i18n.json
1449
i18n/km.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ko.i18n.json
1449
i18n/ko.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/lv.i18n.json
1449
i18n/lv.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/mk.i18n.json
1449
i18n/mk.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/mn.i18n.json
1449
i18n/mn.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/nb.i18n.json
1449
i18n/nb.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/nl.i18n.json
1449
i18n/nl.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/oc.i18n.json
1449
i18n/oc.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/pl.i18n.json
1449
i18n/pl.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/pt-BR.i18n.json
1449
i18n/pt-BR.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/pt.i18n.json
1449
i18n/pt.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ro.i18n.json
1449
i18n/ro.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ru.i18n.json
1449
i18n/ru.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/sr.i18n.json
1449
i18n/sr.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/sv.i18n.json
1449
i18n/sv.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/sw.i18n.json
1449
i18n/sw.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/ta.i18n.json
1449
i18n/ta.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/th.i18n.json
1449
i18n/th.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/tr.i18n.json
1449
i18n/tr.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/uk.i18n.json
1449
i18n/uk.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/vi.i18n.json
1449
i18n/vi.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/zh-CN.i18n.json
1449
i18n/zh-CN.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/zh-HK.i18n.json
1449
i18n/zh-HK.i18n.json
File diff suppressed because it is too large
Load diff
1449
i18n/zh-TW.i18n.json
1449
i18n/zh-TW.i18n.json
File diff suppressed because it is too large
Load diff
|
|
@ -109,7 +109,14 @@ Users.attachSchema(
|
||||||
},
|
},
|
||||||
'profile.hiddenSystemMessages': {
|
'profile.hiddenSystemMessages': {
|
||||||
/**
|
/**
|
||||||
* does the user wants to hide system messages?
|
* does the user want to hide system messages?
|
||||||
|
*/
|
||||||
|
type: Boolean,
|
||||||
|
optional: true,
|
||||||
|
},
|
||||||
|
'profile.hiddenMinicardLabelText': {
|
||||||
|
/**
|
||||||
|
* does the user want to hide minicard label texts?
|
||||||
*/
|
*/
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
optional: true,
|
optional: true,
|
||||||
|
|
@ -359,6 +366,11 @@ Users.helpers({
|
||||||
return profile.hiddenSystemMessages || false;
|
return profile.hiddenSystemMessages || false;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hasHiddenMinicardLabelText() {
|
||||||
|
const profile = this.profile || {};
|
||||||
|
return profile.hiddenMinicardLabelText || false;
|
||||||
|
},
|
||||||
|
|
||||||
getEmailBuffer() {
|
getEmailBuffer() {
|
||||||
const { emailBuffer = [] } = this.profile || {};
|
const { emailBuffer = [] } = this.profile || {};
|
||||||
return emailBuffer;
|
return emailBuffer;
|
||||||
|
|
@ -462,6 +474,14 @@ Users.mutations({
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
toggleLabelText(value = false) {
|
||||||
|
return {
|
||||||
|
$set: {
|
||||||
|
'profile.hiddenMinicardLabelText': !value,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
addNotification(activityId) {
|
addNotification(activityId) {
|
||||||
return {
|
return {
|
||||||
$addToSet: {
|
$addToSet: {
|
||||||
|
|
@ -525,6 +545,10 @@ Meteor.methods({
|
||||||
const user = Meteor.user();
|
const user = Meteor.user();
|
||||||
user.toggleSystem(user.hasHiddenSystemMessages());
|
user.toggleSystem(user.hasHiddenSystemMessages());
|
||||||
},
|
},
|
||||||
|
toggleMinicardLabelText() {
|
||||||
|
const user = Meteor.user();
|
||||||
|
user.toggleLabelText(user.hasHiddenMinicardLabelText());
|
||||||
|
},
|
||||||
changeLimitToShowCardsCount(limit) {
|
changeLimitToShowCardsCount(limit) {
|
||||||
check(limit, Number);
|
check(limit, Number);
|
||||||
Meteor.user().setShowCardsCountAt(limit);
|
Meteor.user().setShowCardsCountAt(limit);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue