Skip to content

Commit d2bef8e

Browse files
committed
fix ballon color
1 parent 9f04cd8 commit d2bef8e

5 files changed

Lines changed: 8 additions & 4 deletions

File tree

packages/server/client/balloon.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ async function printBalloon(doc, lang) {
9898
doc.balloonid,
9999
doc.location ? doc.location : 'N/A',
100100
doc.problem,
101-
getBalloonName(doc.contestproblem.rgb, lang),
101+
doc.contestproblem.color || getBalloonName(doc.contestproblem.rgb, lang),
102102
doc.awards ? doc.awards : 'N/A',
103103
doc.team,
104104
status,

packages/server/handler/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class ClientPrintDoneHandler extends Handler {
8484
await this.ctx.fetcher.setPrintDone(code.id!);
8585
await this.ctx.parallel('print/doneTask', client._id, `${client._id}#${params.printer || 'unknown'}`);
8686
this.response.body = { code: 1 };
87-
logger.info(`Client ${client.name} connected, print task ${code.tid}#${code._id} completed.`);
87+
logger.info(`Client ${client.name} connected, print task ${code.tid}#${code._id} (${code.id} at remote) completed.`);
8888
}
8989
}
9090

packages/server/service/fetcher.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ class DOMjudgeFetcher extends BasicFetcher {
152152
balloonid: balloon.balloonid.toString(),
153153
time: (balloon.time * 1000).toFixed(0),
154154
problem: balloon.problem,
155-
contestproblem: balloon.contestproblem,
155+
contestproblem: {
156+
...balloon.contestproblem,
157+
color: null,
158+
},
156159
team: balloon.team,
157160
teamid: balloon.teamid,
158161
location: balloon.location,

packages/server/service/server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export async function apply(pluginContext: Context) {
1313
host: '0.0.0.0',
1414
port: config.port,
1515
keys: [randomstring(16)],
16+
upload: '128m',
1617
} as any);
1718
pluginContext.inject(['server'], ({ server }) => {
1819
server.addServerLayer('stream', async (ctx, next) => {

packages/server/utils/color.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export const CHINESE_NAME = {
272272
tan: '茶色',
273273
teal: '水鸭色',
274274
thistle: '蓟色',
275-
tomato: '番茄红',
275+
tomato: '番茄',
276276
turquoise: '宝石绿',
277277
violet: '紫罗兰',
278278
wheat: '小麦色',

0 commit comments

Comments
 (0)