Skip to content

Commit

Permalink
Merge pull request #37 from isa-group/feature/#35-randomExercises
Browse files Browse the repository at this point in the history
Feature/#35 random exercises
  • Loading branch information
davbrican authored Nov 17, 2021
2 parents 9ce8968 + 39255c1 commit 5b48e43
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/pages/Playground.vue
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,17 @@ export default {
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: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);
document.body.appendChild(el);
dbg("method customAlert - init ");
},
reconnect() {
dbg("EVENT reconnect");
this.$socket.client.emit("clientReconnection", localStorage.token);
Expand Down

0 comments on commit 5b48e43

Please sign in to comment.