Use new colors constants

This commit is contained in:
John R. Supplee 2021-04-03 18:52:47 +02:00
parent 302ba75729
commit ed6c6e5a25
3 changed files with 8 additions and 54 deletions

View file

@ -4,7 +4,7 @@ import {
TYPE_BOARD,
TYPE_TEMPLATE_BOARD,
TYPE_TEMPLATE_CONTAINER,
} from '../config/const';
} from '/config/const';
const escapeForRegex = require('escape-string-regexp');
Boards = new Mongo.Collection('boards');
@ -1324,7 +1324,7 @@ Boards.colorMap = () => {
};
Boards.labelColors = () => {
return _.clone(Boards.simpleSchema()._schema['labels.$.color'].allowedValues);
return ALLOWED_COLORS;
};
if (Meteor.isServer) {

View file

@ -1,3 +1,5 @@
import { ALLOWED_COLORS } from '/config/const';
Lists = new Mongo.Collection('lists');
/**
@ -144,32 +146,7 @@ Lists.attachSchema(
type: String,
optional: true,
// silver is the default, so it is left out
allowedValues: [
'white',
'green',
'yellow',
'orange',
'red',
'purple',
'blue',
'sky',
'lime',
'pink',
'black',
'peachpuff',
'crimson',
'plum',
'darkgreen',
'slateblue',
'magenta',
'gold',
'navy',
'gray',
'saddlebrown',
'paleturquoise',
'mistyrose',
'indigo',
],
allowedValues: ALLOWED_COLORS,
},
type: {
/**

View file

@ -1,3 +1,5 @@
import { ALLOWED_COLORS } from '/config/const';
Swimlanes = new Mongo.Collection('swimlanes');
/**
@ -68,32 +70,7 @@ Swimlanes.attachSchema(
type: String,
optional: true,
// silver is the default, so it is left out
allowedValues: [
'white',
'green',
'yellow',
'orange',
'red',
'purple',
'blue',
'sky',
'lime',
'pink',
'black',
'peachpuff',
'crimson',
'plum',
'darkgreen',
'slateblue',
'magenta',
'gold',
'navy',
'gray',
'saddlebrown',
'paleturquoise',
'mistyrose',
'indigo',
],
allowedValues: ALLOWED_COLORS,
},
updatedAt: {
/**