Change away usernames to be colorblind-friendly

'#888' still is light enough to work in dark mode, and apparently
the darker grey improves the contrast.
This commit is contained in:
Kirk Scheibelhut
2019-09-03 16:53:48 -07:00
parent 6a3b62cdc9
commit 3e1e76ac4d
2 changed files with 4 additions and 4 deletions

View File

@@ -36,7 +36,7 @@
this.$chatAdd.html('<form><button name="login">Join chat</button></form>');
this.$chatbox = null;
} else {
var color = app.user.get('away') ? 'color:#AAA;' : BattleLog.hashColor(app.user.get('userid'));
var color = app.user.get('away') ? 'color:#888;' : BattleLog.hashColor(app.user.get('userid'));
this.$chatAdd.html('<form class="chatbox"><label style="' + color + '">' + BattleLog.escapeHTML(name) + ':</label> <textarea class="textbox" type="text" size="70" autocomplete="off"></textarea></form>');
this.$chatbox = this.$chatAdd.find('textarea');
this.$chatbox.autoResize({
@@ -1727,7 +1727,7 @@
text += (user.away ? ' data-away=true' : '') + (user.status ? ' data-status="' + BattleLog.escapeHTML(user.status) + '"' : '') + '>';
var group = user.group;
var details = Config.groups[group] || {type: 'user'};
var color = user.away ? 'color:#AAA;' : BattleLog.hashColor(userid);
var color = user.away ? 'color:#888;' : BattleLog.hashColor(userid);
text += '<em class="group' + (details.group === 2 ? ' staffgroup' : '') + '">' + BattleLog.escapeHTML(group) + '</em>';
if (details.type === 'leadership') {
text += '<strong><em style="' + color + '">' + BattleLog.escapeHTML(user.name) + '</em></strong>';

View File

@@ -32,11 +32,11 @@
var name = ' ' + app.user.get('name');
var away = app.user.get('away');
var status = app.user.get('status');
var color = away ? 'color:#AAA;' : BattleLog.hashColor(app.user.get('userid'));
var color = away ? 'color:#888;' : BattleLog.hashColor(app.user.get('userid'));
if (!app.user.loaded) {
buf = '<button disabled>Loading...</button>';
} else if (app.user.get('named')) {
buf = '<span class="username" data-name="' + BattleLog.escapeHTML(name) + '"' + (away ? ' data-away="true"' : '') + (status ? 'data-status="' + BattleLog.escapeHTML(status) + '"' : '') + ' style="' + color + '"><i class="fa fa-user" style="color:' + (away ? '#AAA;' : '#779EC5') + '"></i> ' + BattleLog.escapeHTML(name) + '</span>';
buf = '<span class="username" data-name="' + BattleLog.escapeHTML(name) + '"' + (away ? ' data-away="true"' : '') + (status ? 'data-status="' + BattleLog.escapeHTML(status) + '"' : '') + ' style="' + color + '"><i class="fa fa-user" style="color:' + (away ? '#888;' : '#779EC5') + '"></i> ' + BattleLog.escapeHTML(name) + '</span>';
} else {
buf = '<button name="login">Choose name</button>';
}