File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 42
42
break ;
43
43
default :
44
44
{
45
+ var pageDisplay = Page + 1 ;
45
46
< p > Found @TotalReplays replays in @stopWatch .ElapsedMilliseconds ms < / p >
46
- < p > Page @Page of @TotalPages < / p >
47
+ < p > Page @pageDisplay of @TotalPages < / p >
47
48
< div class = " replay-list" >
48
49
@foreach (var replay in Replays )
49
50
{
52
53
< / div >
53
54
< br / >
54
55
< div class = " pagination" >
55
- @if (Page > 1 )
56
+ @if (Page > 0 )
56
57
{
57
58
< button class = " btn btn-primary" onclick = " pageDown()" > Previous page < / button >
58
59
} else
59
60
{
60
61
< button class = " btn btn-primary" disabled > Previous page < / button >
61
62
}
62
- @if (Page < TotalPages )
63
+ @if (Page < TotalPages - 1 )
63
64
{
64
65
< button class = " btn btn-primary" onclick = " pageUp()" > Next page < / button >
65
66
} else
75
76
const currentPage = @Page ;
76
77
const totalPages = @TotalPages ;
77
78
function pageUp () {
78
- if (currentPage == totalPages ) return ;
79
+ if (currentPage == ( totalPages - 1 ) ) return ;
79
80
search (currentPage + 1 );
80
81
}
81
82
function pageDown () {
82
- if (currentPage == 1 ) return ;
83
+ if (currentPage == 0 ) return ;
83
84
search (currentPage - 1 );
84
85
}
85
86
< / script >
Original file line number Diff line number Diff line change 41
41
42
42
document .querySelector (' .search-bar input' ).addEventListener (' keydown' , (e ) => {
43
43
if (e .key === ' Enter' ) {
44
- search (1 );
44
+ search (0 );
45
45
}
46
46
});
47
47
You can’t perform that action at this time.
0 commit comments