File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ window.CTFd = CTFd;
8
8
9
9
Alpine . data ( "ScoreboardDetail" , ( ) => ( {
10
10
data : { } ,
11
+ show : true ,
11
12
12
13
async init ( ) {
13
14
this . data = await CTFd . pages . scoreboard . getScoreboardDetail ( 10 ) ;
14
15
15
16
let option = getOption ( CTFd . config . userMode , this . data ) ;
16
17
embed ( this . $refs . scoregraph , option ) ;
18
+ this . show = Object . keys ( this . data ) . length > 0 ;
17
19
} ,
18
20
} ) ) ;
19
21
Original file line number Diff line number Diff line change 11
11
< div class ="container ">
12
12
{% include "components/errors.html" %}
13
13
14
- < div id ="score-graph " class ="d-flex align-items-center " x-data ="ScoreboardDetail " x-ref ="scoregraph ">
14
+ < div id ="score-graph " class ="align-items-center " :class =" {'d-flex': show, 'd-none': !show} " x-data ="ScoreboardDetail " x-ref ="scoregraph ">
15
15
< div class ="col-md-12 text-center ">
16
16
< i class ="fas fa-circle-notch fa-spin fa-3x fa-fw spinner "> </ i >
17
17
</ div >
18
18
</ div >
19
19
20
20
< div id ="scoreboard " class ="row " x-data ="ScoreboardList ">
21
- < template x-if ="brackets.length ">
21
+ < template x-if ="brackets.length && standings.length ">
22
22
< div class ="col-md-12 py-3 ">
23
23
< nav class ="nav nav-pills nav-fill ">
24
24
< button :class ="{'nav-link': true, 'active': !activeBracket} " @click ="activeBracket=null "> {% trans %}All{% endtrans %}</ button >
29
29
</ div >
30
30
</ template >
31
31
32
- < div class ="col-md-12 ">
32
+ < div class ="col-md-12 " x-show =" standings.length " >
33
33
< table class ="table table-striped ">
34
34
< thead >
35
35
< tr >
55
55
</ tbody >
56
56
</ table >
57
57
</ div >
58
+
59
+ < div class ="col-md-12 " x-show ="! standings.length ">
60
+ < h3 class ="text-center text-muted "> {% trans %}No challenges solved{% endtrans %}</ h3 >
61
+ </ div >
58
62
</ div >
59
63
</ div >
60
64
{% endblock %}
You can’t perform that action at this time.
0 commit comments