Skip to content

Commit

Permalink
Merge pull request #83 from CodeforcesContestHelper/dev
Browse files Browse the repository at this point in the history
Tiny changes
  • Loading branch information
tiger2005 committed Feb 12, 2023
2 parents 0d12e46 + 727544b commit 52c520f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
9 changes: 7 additions & 2 deletions js/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
for (var i = 0; i < sz; i++)
indexToId[pb[i].index] = i;
var jq = [],
len = [];
len = [],
wa_on_1_mark = [];
for (var i = 0; i < sz; i++) {
var typ = "";
if (prob[i].points != 0) typ = "green";
Expand All @@ -593,6 +594,7 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
$(".singleProblemlistDisplayList").append(q);
jq.push(q);
len.push(0);
wa_on_1_mark.push(0);
}
var l = contestEndTime.getTime() - contestStartTime.getTime();
for (var i = 0; i < sub.length; i++) {
Expand All @@ -605,9 +607,11 @@ function flushsingleProblemlistDisplayList(sub, prob, pb) {
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemStatus").prepend(t);
else
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemStatus").append(t);
if (!len[indexToId[q.problem.index]])
if (!wa_on_1_mark[indexToId[q.problem.index]])
jq[indexToId[q.problem.index]].children(".singleProblemlistDisplayListItemInfo").children(".singleProblemlistDisplayListItemInfoTimeAttempt").html(`<div subId="${q.id}" subContestId="${q.contestId}" subLink="true" class="singleProblemlistVerdictBlock ${judgeToClass(q.verdict)}">${toSmallInfo(q.verdict)}</div>`);
++len[indexToId[q.problem.index]];
if (q.verdict === "OK" || q.passedTestCount !== 0)
++wa_on_1_mark[indexToId[q.problem.index]];
if (settings.problemEventDirection == "Ascending")
$(".singleProblemlistDisplayEvent").prepend(`<div class="singleProblemlistDisplayEventItem"><div class="singleProblemlistDisplayEventItemInfoDetailedTime">${getTimeLength2(qT)}</div><div class="singleProblemlistDisplayEventItemInfoIndex">${q.problem.index}</div><div class="singleProblemlistDisplayEventItemInfoVerdictBlock"><div subId="${q.id}" subLink="true" subContestId="${q.contestId}" class="singleProblemlistVerdictBlock ${judgeToClass(q.verdict)}">${toSmallInfo(q.verdict)} ${toSmallInfo(q.verdict)=="AC"?("("+q.passedTestCount+")"):("on "+(q.passedTestCount+1))}</div></div><div class="singleProblemlistDisplayEventItemInfoTestType">${toSmallTestset(q.testset)}</div></div>`)
else
Expand Down Expand Up @@ -937,6 +941,7 @@ function flushProblemStatusBar() {
$(this).append(`<span class="successColor" style="width:${g / (g + r + m) * 100}%"></span>`);
$(this).append(`<span class="dangerColor" style="width:${r / (g + r + m) * 100}%"></span>`);
$(this).append(`<span style="width:${m / (g + r + m) * 100}%"></span>`);
$(this).attr("title", `AC ${g} / UAC ${r} / NONE ${m}`);
})
}

Expand Down
4 changes: 2 additions & 2 deletions js/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ var lang_en = {
listButton: "List",
eventButton: "Event",
loadingAcCount: "Loading AC Count",
problemWelcome: "Add a problem / contest to start!",
problemWelcome: "Add a problem / contest to start coding!",
add: "Add...",
addIntoProblems: "Add Problem / Contest",
add_problem: "<i class='fas fa-question-circle'></i> Add Problem",
Expand Down Expand Up @@ -473,7 +473,7 @@ var lang_zh = {
listButton: "列表",
eventButton: "事件",
loadingAcCount: "加载通过数中",
problemWelcome: "添加题目或者比赛以开始!",
problemWelcome: "添加题目或比赛题组即可开始写题!",
add: "添加...",
addIntoProblems: "添加题目或比赛",
add_problem: "<i class='fas fa-question-circle'></i> 添加题目",
Expand Down
2 changes: 1 addition & 1 deletion js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ var currentDefaultSettings = {
openRankPredict: 2,
openStandings: 1,
mainURL: "https://codeforces.com",
predictorURL: "https://cf-predictor-frontend.codeforces.ml/GetNextRatingServlet",
predictorURL: "https://cf-predictor.wasylf.xyz/GetNextRatingServlet",
problemSubmissionDirection: "Descending",
problemEventDirection: "Ascending",
fontFamily: "",
Expand Down

0 comments on commit 52c520f

Please sign in to comment.