From 442f4ae3f674c6689cb5e2bc5146784dbebc5aa5 Mon Sep 17 00:00:00 2001 From: spencermountain Date: Fri, 21 Apr 2017 10:50:28 -0400 Subject: [PATCH] client-side log --- src/log/client.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/log/client.js b/src/log/client.js index d431d2b95..b44709544 100644 --- a/src/log/client.js +++ b/src/log/client.js @@ -1,4 +1,6 @@ 'use strict'; +const fns = require('../fns'); + const colors = { 'Person': '#6393b9', 'Pronoun': '#81acce', @@ -14,10 +16,18 @@ const colors = { }; const tag = (t, pos, reason) => { - + let title = t.normal || '[' + t.silent_term + ']'; + title = fns.leftPad('\'' + title + '\'', 12); + title += ' -> ' + pos; + title += fns.rightPad((reason || ''), 15); + console.log('%c' + title, ' color: #a2c99c'); }; const untag = (t, pos, reason) => { - + let title = t.normal || '[' + t.silent_term + ']'; + title = fns.leftPad('\'' + title + '\'', 12); + title += ' ~* ' + pos; + title += ' ' + (reason || ''); + console.log('%c' + title, ' color: #b66a6a'); }; module.exports = { tag: tag,