mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: scoreboard.export: add mail
This commit is contained in:
1 parent
dd2f595e49
commit
8c5bba7b76
2 files changed
+15
-12
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "hydrooj",
|
||||
"version": "3.11.3",
|
||||
"version": "3.11.4",
|
||||
"bin": "bin/hydrooj.js",
|
||||
"main": "src/loader",
|
||||
"module": "src/loader",
|
||||
|
||||
@@ -86,8 +86,9 @@ const acm = buildContestRule({
|
||||
const columns: ScoreboardRow = [
|
||||
{ type: 'rank', value: '#' },
|
||||
{ type: 'user', value: _('User') },
|
||||
{ type: 'solved', value: `${_('Solved')}\n${_('Total Time')}` },
|
||||
];
|
||||
if (isExport) columns.push({ type: 'string', 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];
|
||||
if (isExport) {
|
||||
@@ -136,12 +137,13 @@ const acm = buildContestRule({
|
||||
const row: ScoreboardRow = [
|
||||
{ type: 'rank', value: rank.toString() },
|
||||
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
|
||||
{
|
||||
type: 'time',
|
||||
value: `${tsdoc.accept || 0}\n${misc.formatSeconds(tsdoc.time || 0.0, false)}`,
|
||||
hover: misc.formatSeconds(tsdoc.time || 0.0),
|
||||
},
|
||||
];
|
||||
if (isExport) row.push({ type: 'string', value: udict[tsdoc.uid].mail });
|
||||
row.push({
|
||||
type: 'time',
|
||||
value: `${tsdoc.accept || 0}\n${misc.formatSeconds(tsdoc.time || 0.0, false)}`,
|
||||
hover: misc.formatSeconds(tsdoc.time || 0.0),
|
||||
});
|
||||
for (const pid of tdoc.pids) {
|
||||
const doc = tsddict[pid] || {} as Partial<AcmDetail>;
|
||||
const accept = doc.status === STATUS.STATUS_ACCEPTED;
|
||||
@@ -202,8 +204,9 @@ const oi = buildContestRule({
|
||||
const columns: ScoreboardNode[] = [
|
||||
{ type: 'rank', value: '#' },
|
||||
{ type: 'user', value: _('User') },
|
||||
{ type: 'total_score', value: _('Total Score') },
|
||||
];
|
||||
if (isExport) columns.push({ type: 'string', value: _('Email') });
|
||||
columns.push({ type: 'total_score', value: _('Total Score') });
|
||||
for (let i = 1; i <= tdoc.pids.length; i++) {
|
||||
if (isExport) {
|
||||
columns.push({
|
||||
@@ -246,12 +249,12 @@ const oi = buildContestRule({
|
||||
if (tsdoc.journal) {
|
||||
for (const item of tsdoc.journal) tsddict[item.pid] = item;
|
||||
}
|
||||
const row: ScoreboardNode[] = [];
|
||||
row.push(
|
||||
const row: ScoreboardNode[] = [
|
||||
{ type: 'string', value: rank.toString() },
|
||||
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
|
||||
{ type: 'total_score', value: tsdoc.score || 0 },
|
||||
);
|
||||
];
|
||||
if (isExport) row.push({ type: 'string', 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}`;
|
||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||
|
||||
Reference in new issue
Block a user