mirror of
https://github.com/wekan/wekan.git
synced 2026-01-06 17:48:49 +01:00
Hopeful fix for i18n not working in onRendered()
* Remove the i18n initialization code from an `autorun()` block * Add some console statements to help with debugging production. * Add functions to `Boards` for label colors and color mapping
This commit is contained in:
parent
4fc2d7b935
commit
e4f50d4713
4 changed files with 42 additions and 31 deletions
|
|
@ -1318,6 +1318,18 @@ Boards.userBoardIds = (userId, archived = false, selector = {}) => {
|
|||
});
|
||||
};
|
||||
|
||||
Boards.colorMap = () => {
|
||||
const colors = {};
|
||||
for (const color of Boards.labelColors()) {
|
||||
colors[TAPi18n.__(`color-${color}`)] = color;
|
||||
}
|
||||
return colors;
|
||||
};
|
||||
|
||||
Boards.labelColors = () => {
|
||||
return _.clone(Boards.simpleSchema()._schema['labels.$.color'].allowedValues);
|
||||
};
|
||||
|
||||
if (Meteor.isServer) {
|
||||
Boards.allow({
|
||||
insert: Meteor.userId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue