[new] blink when running

This commit is contained in:
2021-01-08 16:28:24 +00:00
parent d3558653d4
commit f223fa8c9a
5 changed files with 32 additions and 7 deletions

View File

@@ -167,6 +167,14 @@ body::after {
background-color: #f5f5f5;
}
.blink_me {
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% { opacity: 0; }
}
/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {

View File

@@ -257,12 +257,24 @@ function doAjax() {
console.log('Emit build request')
socket.emit('build', {});
$("#uploadfile").fileinput('clear');
$("#ulysses16_your").text("-");
$("#att48_your").text("-");
$("#st70_your").text("-");
$("#a280_your").text("-");
$("#pcb442_your").text("-");
$("#dsj1000_your").text("-");
$("#ulysses16_your").text("Running");
$("#ulysses16_your").addClass('blink_me');
$("#att48_your").text("Running");
$("#att48_your").addClass('blink_me');
$("#st70_your").text("Running");
$("#st70_your").addClass('blink_me');
$("#a280_your").text("Running");
$("#a280_your").addClass('blink_me');
$("#pcb442_your").text("Running");
$("#pcb442_your").addClass('blink_me');
$("#dsj1000_your").text("Running");
$("#dsj1000_your").addClass('blink_me');
$("#exampleModal").modal('show');
},

View File

@@ -104,6 +104,10 @@ socket.on('info', (msg) => {
});
function update_your_res(tsp_file, fitness) {
// Stop blinking
$("#" + tsp_file + "_your").removeClass('blink_me');
if(fitness > 0) {
$("#" + tsp_file + "_your").text(fitness.toFixed(2));
enable_btn($("#" + tsp_file + "_submit"))