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 5edbccb..0000000 Binary files a/src/resources/cross.gif and /dev/null differ diff --git a/src/resources/index.html b/src/resources/index.html index b8e5e71..ad3134e 100644 --- a/src/resources/index.html +++ b/src/resources/index.html @@ -48,6 +48,22 @@ right: 10px; padding: 20px; } + span.status { + display: inline-block; + width: 1em; + text-align: center; + font-family: sans-serif; + } + span.success { color: forestgreen; } + span.failed { color: firebrick; } + span.aborted { color: indigo; } + span.spin { + color: steelblue; + animation: 2s linear infinite spin; + } + @keyframes spin { + to { transform: rotate(360deg); } + } @@ -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 40fa944..0000000 Binary files a/src/resources/spin.gif and /dev/null differ diff --git a/src/resources/tick.gif b/src/resources/tick.gif deleted file mode 100644 index d862b8e..0000000 Binary files a/src/resources/tick.gif and /dev/null differ