From 5adf2b8517c21845dd0b406dee910514ff78640d Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Sun, 25 Jun 2023 20:10:39 +0200 Subject: Updated 6 files and added 2 files (automated) --- includes/components/timeline.inc | 112 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 includes/components/timeline.inc (limited to 'includes/components/timeline.inc') diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc new file mode 100644 index 0000000..6c85472 --- /dev/null +++ b/includes/components/timeline.inc @@ -0,0 +1,112 @@ + 1; ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + '00000000-0000-0000-0000-000000000000', + 'timestamp' => date('c', time() + 60), + 'members' => [] + ] + ]; + + foreach ($switches as $index => $switch) { + if (strtotime($switch["timestamp"]) >= $time) { + $correct = $switches[$index - 1]; + $v = floor((strtotime($switch["timestamp"]) - $time) / 60); + + echo(''); + + $leftCols -= $v; if ($leftCols < 0) $leftCols = 0; + $time = strtotime($switch["timestamp"]); + } + } + + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ " style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;"> + + + ' . implode(", ", array_map(function ($i) { + return getMemberWithoutSystem($i)["display_name"] ?? getMemberWithoutSystem($i)["name"] ?? $i; + }, $correct["members"])) . '
6 hours ago5 hours ago4 hours ago3 hours ago2 hours ago1 hour agoNow
-6h-5h-4h-3h-2-1Now
+ + +