优化假期显示

master
yutent 2022-01-05 15:01:50 +08:00
parent 80d3bbe584
commit d7ff4db1d3
3 changed files with 7 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -1,7 +1,7 @@
{
"name": "bash-calendar",
"description": "终端版万年历",
"version": "1.2.0",
"version": "1.2.1",
"author": "yutent <yutent.io@gmail.com>",
"bin": {
"calendar": "index.js",

View File

@ -164,7 +164,11 @@ function drawTbody(year, month) {
case 1:
let right = ' '
if (tmp.custom) {
right = chalk.blue(tmp.custom)
if (tmp.custom === '班') {
right = chalk.red(tmp.custom)
} else {
right = chalk.green.dim(tmp.custom)
}
}
if (tmp.picked) {
tr += ' ' + chalk.bgBlue.whiteBright.bold(' ' + tmp.day + ' ') + right + VLINE