1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2026-03-02 03:40:21 +00:00

replace gif status indicators with unicode symbols

This commit is contained in:
David Kalnischkies
2017-12-28 15:57:57 +01:00
committed by Oliver Giles
parent 6e4c89bd73
commit ae961b97cb
7 changed files with 27 additions and 7 deletions

View File

@@ -75,7 +75,15 @@ const WebsocketHandler = function() {
const Utils = {
methods: {
runIcon(result) {
return result === "success" ? '<img src="/tick.gif">' : result === "failed" || result === "aborted" ? '<img src="/cross.gif">' : '<img src="/spin.gif">';
var marker = '⚙';
var classname = result;
if (result === 'success')
marker = '✔';
else if (result === 'failed' || result === 'aborted')
marker = '✘';
else
classname = 'spin';
return '<span title="' + result + '" class="status ' + classname + '">' + marker + '&#xfe0e;</span>';
},
formatDate: function(unix) {
// TODO: reimplement when toLocaleDateString() accepts formatting options on most browsers