Skip to content

Commit

Permalink
Update Playground.vue
Browse files Browse the repository at this point in the history
  • Loading branch information
davbrican committed Nov 17, 2021
1 parent 5ca49c4 commit 39255c1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/pages/Playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -393,16 +393,19 @@ export default {
}
this.clearResult();
dbg("method changeExercise - init - Emiting event changeExercise with exercisedCharged: true");
this.$socket.client.emit("changeExercise", {code: localStorage.code, exercisedCharged: true});
},
customAlert(pack) {
var el = document.createElement("div");
el.setAttribute("style","position:absolute;top:50%;left:50%;background-color: rgb(160, 174, 192);");
el.innerHTML = "Nuevo ejercicio";
el.setAttribute("style","position:absolute;top:50%;left:40%;width: 20%;height: 20%;text-align: center;background-color: rgba(140, 203, 249, 0.2);border: 2px dashed #34d037;line-height: 650%;");
el.innerHTML = pack.data.message;
setTimeout(function(){
el.parentNode.removeChild(el);
},2000);
}, 2000);
document.body.appendChild(el);
dbg("method changeExercise - init - Emiting event changeExercise with exercisedCharged: true");
this.$socket.client.emit("changeExercise", {code: localStorage.code, exercisedCharged: true});
dbg("method customAlert - init ");
},
reconnect() {
dbg("EVENT reconnect");
Expand Down

0 comments on commit 39255c1

Please sign in to comment.