diff --git a/packages/hydrooj/package.json b/packages/hydrooj/package.json index 4cc64ebed..5f106213d 100644 --- a/packages/hydrooj/package.json +++ b/packages/hydrooj/package.json @@ -1,6 +1,6 @@ { "name": "hydrooj", - "version": "3.13.8", + "version": "3.13.9", "bin": "bin/hydrooj.js", "main": "src/loader", "module": "src/loader", diff --git a/packages/hydrooj/src/interface.ts b/packages/hydrooj/src/interface.ts index 34a7d902a..4f5730db1 100644 --- a/packages/hydrooj/src/interface.ts +++ b/packages/hydrooj/src/interface.ts @@ -307,7 +307,7 @@ export interface RecordDoc { } export interface ScoreboardNode { - type: 'string' | 'rank' | 'user' | 'record' | 'records' | 'problem' | 'solved' | 'time' | 'total_score'; + type: 'string' | 'rank' | 'user' | 'email' | 'record' | 'records' | 'problem' | 'solved' | 'time' | 'total_score'; value: string; raw?: any; score?: number; diff --git a/packages/hydrooj/src/model/contest.ts b/packages/hydrooj/src/model/contest.ts index 3703e8b96..85f11c137 100644 --- a/packages/hydrooj/src/model/contest.ts +++ b/packages/hydrooj/src/model/contest.ts @@ -88,7 +88,7 @@ const acm = buildContestRule({ { type: 'rank', value: '#' }, { type: 'user', value: _('User') }, ]; - if (isExport) columns.push({ type: 'string', value: _('Email') }); + if (isExport) columns.push({ type: 'email', value: _('Email') }); columns.push({ type: 'solved', value: `${_('Solved')}\n${_('Total Time')}` }); for (let i = 1; i <= tdoc.pids.length; i++) { const pid = tdoc.pids[i - 1]; @@ -139,7 +139,7 @@ const acm = buildContestRule({ { type: 'rank', value: rank.toString() }, { type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid }, ]; - if (isExport) row.push({ type: 'string', value: udict[tsdoc.uid].mail }); + if (isExport) row.push({ type: 'email', value: udict[tsdoc.uid].mail }); row.push({ type: 'time', value: `${tsdoc.accept || 0}\n${misc.formatSeconds(tsdoc.time || 0.0, false)}`, @@ -206,7 +206,7 @@ const oi = buildContestRule({ { type: 'rank', value: '#' }, { type: 'user', value: _('User') }, ]; - if (isExport) columns.push({ type: 'string', value: _('Email') }); + if (isExport) columns.push({ type: 'email', value: _('Email') }); columns.push({ type: 'total_score', value: _('Total Score') }); for (let i = 1; i <= tdoc.pids.length; i++) { if (isExport) { @@ -254,7 +254,7 @@ const oi = buildContestRule({ { type: 'string', value: rank.toString() }, { type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid }, ]; - if (isExport) row.push({ type: 'string', value: udict[tsdoc.uid].mail }); + if (isExport) row.push({ type: 'email', value: udict[tsdoc.uid].mail }); row.push({ type: 'total_score', value: tsdoc.score || 0 }); for (const pid of tdoc.pids) { const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;