summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/components/timeline.inc14
1 files changed, 9 insertions, 5 deletions
diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc
index 0ec8870..1a34550 100644
--- a/includes/components/timeline.inc
+++ b/includes/components/timeline.inc
@@ -52,9 +52,13 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) >
$correct = $switches[$index - 1];
$v = floor((strtotime($switch["timestamp"]) - $time) / 60);
- echo('<td style="max-width: 100%; overflow: hidden; text-align: left; white-space: nowrap; padding: 0 15px; height: ' . 50 / count($systems) . 'px; background-color: #' . (getMemberWithoutSystem($correct["members"][0])["color"] ?? "000000") . '80;" colspan="' . ($v > $leftCols ? $leftCols : $v) . '"><a style="color: white; cursor: pointer; text-decoration: none; width: 100%; display: flex; height: ' . 50 / count($systems) . 'px; align-items: center; justify-content: left;" href="/' . getMemberWithoutSystem($correct["members"][0])["name"] . '">' . implode(", ", array_map(function ($i) {
- return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i;
- }, $correct["members"])) . '</a></td>');
+ if (count($correct["members"]) > 0) {
+ echo('<td style="max-width: 100%; overflow: hidden; text-align: left; white-space: nowrap; padding: 0 15px; height: ' . 50 / count($systems) . 'px; background-color: #' . (getMemberWithoutSystem($correct["members"][0])["color"] ?? "000000") . '80;" colspan="' . ($v > $leftCols ? $leftCols : $v) . '"><a style="color: white; cursor: pointer; text-decoration: none; width: 100%; display: flex; height: ' . 50 / count($systems) . 'px; align-items: center; justify-content: left;" href="/' . getMemberWithoutSystem($correct["members"][0])["name"] . '">' . implode(", ", array_map(function ($i) {
+ return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i;
+ }, $correct["members"])) . '</a></td>');
+ } else {
+ echo('<td style="max-width: 100%; overflow: hidden; text-align: left; white-space: nowrap; padding: 0 15px; height: ' . 50 / count($systems) . 'px; background-color: transparent;" colspan="' . ($v > $leftCols ? $leftCols : $v) . '"></td>');
+ }
$leftCols -= $v; if ($leftCols < 0) $leftCols = 0;
$time = strtotime($switch["timestamp"]);
@@ -80,8 +84,8 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) >
<td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-5h</td>
<td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-4h</td>
<td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-3h</td>
- <td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-2</td>
- <td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-1</td>
+ <td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-2h</td>
+ <td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">-1h</td>
<td colspan="60" style="text-align: right; padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, 0.5);">Now</td>
</tr>
<tr>