We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b7d55f commit 74f9973Copy full SHA for 74f9973
.env.json
@@ -0,0 +1,8 @@
1
+{
2
+ "commit": {
3
+ "full": "8b7d55f9b53dac0bf1f26f04ba6b6fdb073d6aae",
4
+ "short": "8b7d55f"
5
+ },
6
+ "node": "v8.1.4",
7
+ "npm": "5.3.0"
8
+}
lib/commands/list.js
@@ -127,7 +127,7 @@ cmd.handler = function(argv) {
127
h.prettyState(problem.state),
128
problem.id,
129
problem.name,
130
- problem.level,
+ h.prettyLevel(problem.level),
131
problem.percent);
132
});
133
lib/commands/show.js
@@ -81,7 +81,7 @@ cmd.handler = function(argv) {
81
82
log.info();
83
log.printf('* %s', problem.category);
84
- log.printf('* %s (%.2f%%)', problem.level, problem.percent);
+ log.printf('* %s (%.2f%%)', h.prettyLevel(problem.level), problem.percent);
85
86
if (filename)
87
log.printf('* Source Code: %s', chalk.yellow.underline(filename));
lib/commands/stat.js
@@ -6,6 +6,7 @@ var chalk = require('../chalk');
var log = require('../log');
var core = require('../core');
var session = require('../session');
9
+var h = require('../helper');
10
11
var cmd = {
12
command: 'stat',
@@ -39,8 +40,8 @@ function printLine(key, done, all) {
39
40
var n = 30;
41
var percent = (all > 0) ? done / all : 0;
42
var x = Math.ceil(n * percent);
- log.printf(' %-8s %3d/%-3d (%.2f%%)\t%s%s',
43
- key, done, all, 100 * percent,
+ log.printf(' %s\t%3d/%-3d (%.2f%%)%s%s',
44
+ h.prettyLevel(key), done, all, 100 * percent,
45
chalk.green(bar('█', x)),
46
chalk.red(bar('░', n - x)));
47
}
lib/helper.js
@@ -86,6 +86,16 @@ h.prettyTime = function(n) {
return res[0].toFixed(0) + ' ' + res[1].name;
};
88
89
+h.prettyLevel = function(level) {
90
+ var chalk = require('./chalk');
91
+ switch (level) {
92
+ case 'Easy': return chalk.green('Easy');
93
+ case 'Medium': return chalk.yellow('Medium');
94
+ case 'Hard': return chalk.red('Hard');
95
+ default: return ' ';
96
+ }
97
98
+
99
h.levelToName = function(level) {
100
switch (level) {
101
case 1: return 'Easy';
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments