Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions lib/render.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';
const chalk = require('chalk');
const hasUnicode = require('has-unicode');
const signale = require('signale');
const config = require('./config');

Expand All @@ -10,6 +11,8 @@ const {blue, green, grey, magenta, red, underline, yellow} = chalk;

const priorities = {2: 'yellow', 3: 'red'};

const chStar = hasUnicode() ? '★' : '*';

class Render {
get _configuration() {
return config.get();
Expand Down Expand Up @@ -52,7 +55,7 @@ class Render {
}

_getStar(item) {
return item.isStarred ? yellow('★') : '';
return item.isStarred ? yellow(chStar) : '';
}

_buildTitle(key, items) {
Expand Down Expand Up @@ -177,11 +180,11 @@ class Render {
];

if (complete !== 0 && pending === 0 && notes === 0) {
log({prefix: '\n ', message: 'All done!', suffix: yellow('★')});
log({prefix: '\n ', message: 'All done!', suffix: hasUnicode() ? yellow(chStar) : yellow('^_^')});
}

if (pending + complete + notes === 0) {
log({prefix: '\n ', message: 'Type `tb --help` to get started!', suffix: yellow('★')});
log({prefix: '\n ', message: 'Type `tb --help` to get started!', suffix: yellow(chStar)});
}

log({prefix: '\n ', message: grey(`${percent} of all tasks complete.`)});
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "taskbook",
"productName": "Taskbook",
"version": "0.1.1",
"description": "📓 Tasks, boards & notes for the command-line habitat",
"description": "Tasks, boards & notes for the command-line habitat",
"repository": "klauscfhq/taskbook",
"license": "MIT",
"author": {
Expand Down Expand Up @@ -45,6 +45,7 @@
},
"dependencies": {
"chalk": "^2.4.1",
"has-unicode": "^2.0.1",
"meow": "^5.0.0",
"signale": "^1.2.1",
"update-notifier": "^2.5.0"
Expand Down