From ae961b97cb55e9151e48c83179b7af0b4e6e0eb2 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 28 Dec 2017 15:57:57 +0100 Subject: [PATCH] replace gif status indicators with unicode symbols --- CMakeLists.txt | 2 +- src/resources.cpp | 4 ---- src/resources/cross.gif | Bin 178 -> 0 bytes src/resources/index.html | 18 +++++++++++++++++- src/resources/js/app.js | 10 +++++++++- src/resources/spin.gif | Bin 3475 -> 0 bytes src/resources/tick.gif | Bin 114 -> 0 bytes 7 files changed, 27 insertions(+), 7 deletions(-) delete mode 100644 src/resources/cross.gif delete mode 100644 src/resources/spin.gif delete mode 100644 src/resources/tick.gif diff --git a/CMakeLists.txt b/CMakeLists.txt index edc5ed6..04e7374 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,7 @@ add_custom_command(OUTPUT laminar.capnp.c++ laminar.capnp.h # Zip and compile statically served resources generate_compressed_bins(${CMAKE_SOURCE_DIR}/src/resources index.html js/app.js - favicon.ico favicon-152.png icon.png tick.gif cross.gif spin.gif) + favicon.ico favicon-152.png icon.png) # Download 3rd-party frontend JS libs... file(DOWNLOAD https://cdnjs.cloudflare.com/ajax/libs/vue/2.3.4/vue.min.js diff --git a/src/resources.cpp b/src/resources.cpp index 380b83e..325995b 100644 --- a/src/resources.cpp +++ b/src/resources.cpp @@ -27,7 +27,6 @@ #define CONTENT_TYPE_HTML "text/html; charset=utf-8" #define CONTENT_TYPE_ICO "image/x-icon" #define CONTENT_TYPE_PNG "image/png" -#define CONTENT_TYPE_GIF "image/gif" #define CONTENT_TYPE_JS "application/javascript; charset=utf-8" #define CONTENT_TYPE_CSS "text/css; charset=utf-8" @@ -37,9 +36,6 @@ Resources::Resources() INIT_RESOURCE("/favicon.ico", favicon_ico, CONTENT_TYPE_ICO); INIT_RESOURCE("/favicon-152.png", favicon_152_png, CONTENT_TYPE_PNG); INIT_RESOURCE("/icon.png", icon_png, CONTENT_TYPE_PNG); - INIT_RESOURCE("/tick.gif", tick_gif, CONTENT_TYPE_GIF); - INIT_RESOURCE("/cross.gif", cross_gif, CONTENT_TYPE_GIF); - INIT_RESOURCE("/spin.gif", spin_gif, CONTENT_TYPE_GIF); INIT_RESOURCE("/js/app.js", js_app_js, CONTENT_TYPE_JS); INIT_RESOURCE("/js/Chart.HorizontalBar.js", js_Chart_HorizontalBar_js, CONTENT_TYPE_JS); INIT_RESOURCE("/js/ansi_up.js", js_ansi_up_js, CONTENT_TYPE_JS); diff --git a/src/resources/cross.gif b/src/resources/cross.gif deleted file mode 100644 index 5edbccb6d36b45954ee1aaf4c792c0f79fad2ad8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 178 zcmZ?wbh9u|1`3=>J98!tD3S)$MI_K+00NL*46Nn~3Vq5>N}a}H?FL#0mBbva`5YZCnB9EB m*xb!>;3 @@ -229,7 +245,7 @@ 🔔 - + diff --git a/src/resources/js/app.js b/src/resources/js/app.js index 76620fa..7a94df7 100644 --- a/src/resources/js/app.js +++ b/src/resources/js/app.js @@ -75,7 +75,15 @@ const WebsocketHandler = function() { const Utils = { methods: { runIcon(result) { - return result === "success" ? '' : result === "failed" || result === "aborted" ? '' : ''; + var marker = '⚙'; + var classname = result; + if (result === 'success') + marker = '✔'; + else if (result === 'failed' || result === 'aborted') + marker = '✘'; + else + classname = 'spin'; + return '' + marker + '︎'; }, formatDate: function(unix) { // TODO: reimplement when toLocaleDateString() accepts formatting options on most browsers diff --git a/src/resources/spin.gif b/src/resources/spin.gif deleted file mode 100644 index 40fa944d70fe9bc54723cf0e0efd2194f123699e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3475 zcmcJReN5AL9>;%uq`y8up9=*_AAT)3nd>^7sKkRG1=jMc-3hK5DwP4_&Z3~Q;BH{c zlMe{urlaGAI2~qLfO$)%#zRD-JGKyx><_OYC)co>=^00USvJ$0_bFf2YbG(59FjB; z{^|Gq`n=!o&nM54o4(P($M~2V!!q8RJ^xK$c7dw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S<@kOnubg6 zPQLFgzBT&gQIZkQmRR$30*tSh(DBBSHf{_-N5+OnXoCCTZ$X(sF0MiYqK=%^tdxCd%#XuC&PwY3{GveDZ2J@9nb_ zu9URj86+Y;TNwWaxn0H~ctX9BAmlPl-0KP5LUm$dY*OcTJ(s0XIiHO!;sO9~g?kwl zZYY`&%uqo?SRsz6qa&ADc>Ti>gqGQJEVPR8tu+lUW7;`)$(eV{)Y9DZ6LEsy^t1EQ z#iG7G&#fz|_1F7v4Nl1lxrwH$+O6;U_Y``l>5+UKx(g!|dvwuKrj8fGQ0jIHXi`#g zg3DvXa|G>nb`2wm4$wB2tu1mjzS8L0R-SjL#=O_L-m-UXUE{|3w;US^T-EjUWv@9+ ijR#*n;K;7p*R=noG^-`|_ivUv%#N4J^KF%RHU9zSv$?bY diff --git a/src/resources/tick.gif b/src/resources/tick.gif deleted file mode 100644 index d862b8e2f9e889fb7784bc0721f35a6d0e636017..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 114 zcmZ?wbh9u|