Skip to content

Commit 0e7f2ae

Browse files
authored
Merge pull request #107 from codeurjc-students/hotfixes
Hotfixes
2 parents e5f500f + f038ebe commit 0e7f2ae

File tree

33 files changed

+765
-345
lines changed

33 files changed

+765
-345
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
- "./mvnw clean package -B -q"
1616
after_script:
1717
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
18-
- docker build -t vscode4teaching/vscode4teaching:2.0.1 .
18+
- docker build -t vscode4teaching/vscode4teaching:2.0.2 .
1919
- docker build -t vscode4teaching/vscode4teaching:latest .
20-
- docker push vscode4teaching/vscode4teaching:2.0.1
20+
- docker push vscode4teaching/vscode4teaching:2.0.2
2121
- docker push vscode4teaching/vscode4teaching:latest
2222
- language: node_js
2323
os:

vscode4teaching-extension/package-lock.json

Lines changed: 45 additions & 49 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vscode4teaching-extension/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
},
1313
"displayName": "VS Code 4 Teaching",
1414
"description": "Bring the programming exercises directly to the student’s editor.",
15-
"version": "2.0.1",
15+
"version": "2.0.2",
1616
"engines": {
17-
"vscode": "^1.45.1"
17+
"vscode": "^1.61.0"
1818
},
1919
"categories": [
2020
"Other"
@@ -310,6 +310,7 @@
310310
"@types/glob": "^7.1.1",
311311
"@types/jest": "^25.2.3",
312312
"@types/jest-cli": "^24.3.0",
313+
"@types/lodash.escaperegexp": "^4.1.6",
313314
"@types/mkdirp": "^1.0.0",
314315
"@types/node": "^10.15.1",
315316
"@types/rimraf": "^3.0.0",
@@ -332,6 +333,7 @@
332333
"form-data": "^3.0.0",
333334
"ignore": "^5.1.6",
334335
"jszip": "^3.4.0",
336+
"lodash.escaperegexp": "^4.1.2",
335337
"mkdirp": "^1.0.4",
336338
"vsls": "^1.0.3015",
337339
"ws": "^7.4.6"

vscode4teaching-extension/resources/dashboard/dashboard.js

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,42 @@
1818

1919
window.addEventListener('message', event => {
2020
const message = event.data;
21-
for (const key in message) {
22-
document.getElementById(key).textContent = message[key]
21+
switch (message.type) {
22+
case 'updateDate':
23+
for (const key in message.update) {
24+
document.getElementById(key).textContent = message.update[key]
25+
}
26+
break;
27+
case 'openDone':
28+
document.querySelectorAll(".button-col > button").forEach((e) => {
29+
e.disabled = false;
30+
});
31+
break;
2332
}
2433
})
2534

2635
document.querySelectorAll(".workspace-link").forEach((row) => {
2736
row.addEventListener("click", () => {
37+
document.querySelectorAll(".button-col > button").forEach((e) => {
38+
e.disabled = true;
39+
});
2840
const username = Array.from(row.parentElement.parentElement.children).find(e => e.classList.contains('username')).innerHTML;
2941
vscode.postMessage({
3042
type: "goToWorkspace",
3143
username: username,
32-
lastMod:row.attributes.getNamedItem("data-lastMod").value,
3344
});
3445
});
3546
});
3647

3748
document.querySelectorAll(".workspace-link-diff").forEach((row) => {
3849
row.addEventListener("click", () => {
50+
Array.from(row.parentElement.children).forEach((e) => {
51+
e.disabled = true;
52+
});
3953
const username = Array.from(row.parentElement.parentElement.children).find(e => e.classList.contains('username')).innerHTML;
4054
vscode.postMessage({
4155
type: "diff",
4256
username: username,
43-
lastMod:row.attributes.getNamedItem("data-lastMod-diff").value,
4457
});
4558
});
4659
});

0 commit comments

Comments
 (0)