diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/courseware.js | 1 | ||||
-rw-r--r-- | lib/options.js | 10 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/courseware.js b/lib/courseware.js index 0c47210..8aa0d01 100644 --- a/lib/courseware.js +++ b/lib/courseware.js @@ -12,7 +12,6 @@ var fs = require('fs'), ProgressBar = require('progress'), inquirer = require('inquirer'), colors = require('colors'), - util = require('util'), _ = require('lodash'); var isWin = /^win/.test(process.platform), diff --git a/lib/options.js b/lib/options.js index 1b3fb6b..707beb4 100644 --- a/lib/options.js +++ b/lib/options.js @@ -7,7 +7,6 @@ */ var fs = require('fs'), - path = require('path'), _ = require('lodash'), inquirer = require('inquirer'), Table = require('easy-table'), @@ -122,13 +121,12 @@ function promptAsk(data, argv, initRun) { }); } -function showSign(item, rev) { +function showSign(item) { 'use strict'; if (!item) { return ''; } if (typeof item !== 'boolean') { return item; } - if (!rev) { return (item) ? ' x' : ''; } - return (item) ? '' : ' x'; + return (item) ? ' x' : ''; } function checkIfFilled(item, name, target, clear) { @@ -154,7 +152,7 @@ function showPresets(argv, initRun, checkIfLoad) { items.forEach(function each(item) { t.cell('Preset', presets[count]); t.cell('User', item.u); - t.cell('Wiki List', showSign(item.cw, true)); + t.cell('Wiki List', ((!item.cw && item.h) ? showSign(item.cw) : showSign(!item.cw))); t.cell('Courseware', showSign(item.cw)); t.cell('HQ Video', showSign(item.hq)); t.cell('CC', showSign(item.cc)); @@ -192,7 +190,7 @@ function showPresets(argv, initRun, checkIfLoad) { t.columns = _.pick(t.columns, clear); - if (info) { console.log('User: '.bold + users[0] + '\n'); } + if (info) { console.log('User: '.bold + users[0].underline + '\n'); } console.log(t.toString()); |