You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e8dee9c
Browse filesBrowse the repository at this point in the historyBrowse files
},"Add the attendee's invented drink to the house menu and score it. A declared mascot or placement is checked against the name."],
21
+
},"Score the attendee's invented drink and add it to the house menu. With an event leaderboard configured, it is served only once the board admits it: a score another drink holds (score_taken) or an unreachable board (leaderboard_unreachable) keeps the attendee naming. A declared mascot or placement is checked against the name."],
22
22
complete: [empty,"Finish this attendee and clear the station for the next one. The drink stays on the menu and leaderboard."],
23
23
refresh: [empty,"Read the current station state, house menu, and leaderboard."]
Copy file name to clipboardExpand all lines: .github/extensions/commit-and-sip/renderer/booth.js
+44-9Lines changed: 44 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -5,10 +5,9 @@
5
5
constVIEWS=["idle","naming","served"];
6
6
letbusy=false;
7
7
letphase=null;
8
-
// The drink is published in the background, so the served screen keeps
9
-
// checking while the outcome is still open: pending, or failed and due for
10
-
// a retry (the panel retries on its poll). Confirmed and rejected are final.
11
-
letconfirming=false;
8
+
letbackgroundLoading=false;
9
+
letrevision=0;
10
+
letnameErrorCode=null;
12
11
13
12
functionfail(message){
14
13
$("booth-error-message").textContent=message;
@@ -36,7 +35,10 @@
36
35
letdata;
37
36
try{data=awaitresponse.json();}
38
37
catch{thrownewError(`The booth returned an unreadable response (HTTP ${response.status}). Refresh the connection.`);}
39
-
if(!response.ok)thrownewError(data.error?.message||`The booth returned HTTP ${response.status}. Refresh the connection.`);
38
+
if(!response.ok)throwObject.assign(
39
+
newError(data.error?.message||`The booth returned HTTP ${response.status}. Refresh the connection.`),
40
+
{code: data.error?.code}
41
+
);
40
42
returndata;
41
43
}catch(error){
42
44
if(error.name==="AbortError")thrownewError("The booth took too long to respond. Refresh the connection before trying again; your drink may already have been saved.");
0 commit comments