Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions static/js/scoutingsdk.js
Original file line number Diff line number Diff line change
Expand Up @@ -4876,6 +4876,34 @@ ${_this.escape(teamNumber)} (Blue ${i + 1})
}
};

document.addEventListener("keydown", async (e) => {
if (e.code === "Space") {
if (
row
.closest(".preset")
?.classList.contains("none")
) {
return;
}

if (opt.value !== "fsa") {
return;
}

e.stopPropagation();
let cur = parseInt(ecount.innerText) || 0;
if (opt.max !== undefined && cur >= opt.max) {
return;
}
values.push(opt.value);
locations.push(location);
dcounter++;
ecount.innerText = cur + 1;
tally();
await hub();
}
});

plus.addEventListener("click", async (e) => {
e.stopPropagation();
let cur = parseInt(ecount.innerText) || 0;
Expand Down
9 changes: 7 additions & 2 deletions views/scouting/partials/scoutingHeader.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@
document.querySelector(".navbar a[data-page='home']").onclick =
async (e) => {
e.preventDefault();
if(!["#/scan-data", "#/teams", "#/view-data", "#/analysis", "#/predict", "#/leaderboard", "#/shop", "#/admin"].includes(window.location.hash)) {
try {
if(!["#/scan-data", "#/teams", "#/view-data", "#/analysis", "#/predict", "#/leaderboard", "#/shop", "#/admin", "#/bazaar"].includes(window.location.hash)) {
try {
updatePage();
} catch(err) {

Expand Down Expand Up @@ -234,6 +234,11 @@
document.querySelector(".navbar a[data-page='bazaar']").onclick =
async (e) => {
e.preventDefault();
if(window.location.hash == "#/bazaar") {
try {
updatePage();
} catch(err) {}
}
window.location.hash = "#/bazaar";
};
document.querySelector(".navbar a[data-page='log-out']").onclick =
Expand Down
Loading