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",
|
"name": "hydrooj",
|
||||||
"version": "3.11.3",
|
"version": "3.11.4",
|
||||||
"bin": "bin/hydrooj.js",
|
"bin": "bin/hydrooj.js",
|
||||||
"main": "src/loader",
|
"main": "src/loader",
|
||||||
"module": "src/loader",
|
"module": "src/loader",
|
||||||
|
|||||||
@@ -86,8 +86,9 @@ const acm = buildContestRule({
|
|||||||
const columns: ScoreboardRow = [
|
const columns: ScoreboardRow = [
|
||||||
{ type: 'rank', value: '#' },
|
{ type: 'rank', value: '#' },
|
||||||
{ type: 'user', value: _('User') },
|
{ 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++) {
|
for (let i = 1; i <= tdoc.pids.length; i++) {
|
||||||
const pid = tdoc.pids[i - 1];
|
const pid = tdoc.pids[i - 1];
|
||||||
if (isExport) {
|
if (isExport) {
|
||||||
@@ -136,12 +137,13 @@ const acm = buildContestRule({
|
|||||||
const row: ScoreboardRow = [
|
const row: ScoreboardRow = [
|
||||||
{ type: 'rank', value: rank.toString() },
|
{ type: 'rank', value: rank.toString() },
|
||||||
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
|
{ 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) {
|
for (const pid of tdoc.pids) {
|
||||||
const doc = tsddict[pid] || {} as Partial<AcmDetail>;
|
const doc = tsddict[pid] || {} as Partial<AcmDetail>;
|
||||||
const accept = doc.status === STATUS.STATUS_ACCEPTED;
|
const accept = doc.status === STATUS.STATUS_ACCEPTED;
|
||||||
@@ -202,8 +204,9 @@ const oi = buildContestRule({
|
|||||||
const columns: ScoreboardNode[] = [
|
const columns: ScoreboardNode[] = [
|
||||||
{ type: 'rank', value: '#' },
|
{ type: 'rank', value: '#' },
|
||||||
{ type: 'user', value: _('User') },
|
{ 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++) {
|
for (let i = 1; i <= tdoc.pids.length; i++) {
|
||||||
if (isExport) {
|
if (isExport) {
|
||||||
columns.push({
|
columns.push({
|
||||||
@@ -246,12 +249,12 @@ const oi = buildContestRule({
|
|||||||
if (tsdoc.journal) {
|
if (tsdoc.journal) {
|
||||||
for (const item of tsdoc.journal) tsddict[item.pid] = item;
|
for (const item of tsdoc.journal) tsddict[item.pid] = item;
|
||||||
}
|
}
|
||||||
const row: ScoreboardNode[] = [];
|
const row: ScoreboardNode[] = [
|
||||||
row.push(
|
|
||||||
{ type: 'string', value: rank.toString() },
|
{ type: 'string', value: rank.toString() },
|
||||||
{ type: 'user', value: udict[tsdoc.uid].uname, raw: tsdoc.uid },
|
{ 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) {
|
for (const pid of tdoc.pids) {
|
||||||
const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
const index = `${tsdoc.uid}/${tdoc.domainId}/${pid}`;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
||||||
|
|||||||
Reference in new issue
Block a user