Skip to content

Commit

Permalink
Merge pull request #25 from v3ctor/int-status
Browse files Browse the repository at this point in the history
Add INT status to problem auto-highlighting
  • Loading branch information
m4tx authored Mar 4, 2021
2 parents b3a2725 + 2c950cd commit 97fc91c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ext/js/problems.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,14 @@


// Highlighting solved tasks
const STATUS_ERR = 3;
const STATUS_ERR = 4;
const STATUS_INT = 3;
const STATUS_OK = 2;
const STATUS_QUE = 1;
const STATUS_NONE = 1000;
const STATUS_MAP = {
[STATUS_ERR]: 'err',
[STATUS_INT]: 'int',
[STATUS_OK]: 'ok',
[STATUS_QUE]: 'que',
[STATUS_NONE]: 'none',
Expand Down Expand Up @@ -341,6 +343,8 @@
TEST_NUMBER_REGEX.test(status) ||
ACCURACY_REGEX.test(status)) {
statusInt = STATUS_OK;
} else if (status.search('INT') !== -1) {
statusInt = STATUS_INT;
} else {
statusInt = STATUS_ERR;
}
Expand Down
4 changes: 4 additions & 0 deletions ext/scss/problems.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ table.results {
background-color: #FFF2C8;
}

td.satori-enhancements-status-int {
background-color: #94F7FC;
}

td.satori-enhancements-status-err {
background-color: #F8C3D2;
}
Expand Down

0 comments on commit 97fc91c

Please sign in to comment.