Skip to content

Commit

Permalink
desktop notification icon support for judged
Browse files Browse the repository at this point in the history
  • Loading branch information
ZsgsDesign committed Mar 28, 2022
1 parent 072641f commit f8db0df
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions public/static/img/notify/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
!.gitignore
!cancel.png
!checked.png
!pending.png
!njupt.png
!contest_alert.png
!noj.png
Binary file added public/static/img/notify/pending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/views/problem/editor.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ function adjustAppearance(){
$("#verdict_info").addClass(ret.data.color);
if(ret.data.verdict!="Pending" && ret.data.verdict!="Waiting" && ret.data.verdict!="Judging") {
clearInterval(tempInterval);
notify(ret.data.verdict, 'Your submission to problem {{$problem->title}} has been proceed.',(ret.data.verdict=="Partially Accepted"||ret.data.verdict=="Accepted")?"/static/img/notify/checked.png":"/static/img/notify/cancel.png",'{{$problem->pid}}');
notify(ret.data.verdict, 'Your submission to problem {{$problem->title}} has been proceed.',(ret.data.verdict=="Partially Accepted"||ret.data.verdict=="Accepted")?"/static/img/notify/checked.png":((ret.data.verdict=="Judged")?"/static/img/notify/pending.png":"/static/img/notify/cancel.png"),'{{$problem->pid}}');
@if(!$contest_mode)
if (ret.data.verdict=="Accepted"){
localStorage.setItem('{{$problem->pcode}}','```\n' + editor.getValue() + '\n```')
Expand Down

0 comments on commit f8db0df

Please sign in to comment.