mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-09 12:20:36 +01:00
Use different color for online/offline sessions (#1398)
* Use different color for online/offline sessions * Compatible with night mode
This commit is contained in:
parent
4be9cea58b
commit
36a556ce06
@ -66,7 +66,8 @@ function loadPlayerdeaths(json, error) {
|
||||
}
|
||||
|
||||
function createAccordionTitle(i, session) {
|
||||
return `<tr id="session_h_` + i + `" aria-controls="session_t_` + i + `" aria-expanded="false" class="clickable collapsed bg-teal" data-target="#session_t_` + i + `" data-toggle="collapse"><td>`
|
||||
let style = session.start.includes("Online") ? 'bg-teal' : (window.localStorage.getItem('nightMode') == 'true' ? '' : 'bg-white');
|
||||
return `<tr id="session_h_` + i + `" aria-controls="session_t_` + i + `" aria-expanded="false" class="clickable collapsed ` + style + `" data-target="#session_t_` + i + `" data-toggle="collapse"><td>`
|
||||
+ session.name + (session.first_session ? ` <i title="Registered (First session)" class="far fa-calendar-plus"></i>` : ``) + `</td>`
|
||||
+ `<td>` + session.start + `</td>`
|
||||
+ `<td>` + session.length + `</td>`
|
||||
|
Loading…
Reference in New Issue
Block a user