summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/components/navigation.inc14
-rw-r--r--includes/components/planner.inc4
-rw-r--r--includes/external/addressbook/twitter-tag-to-id.js4
-rw-r--r--includes/luna.php2
-rw-r--r--includes/pages.json11
-rw-r--r--includes/util/functions.inc12
6 files changed, 38 insertions, 9 deletions
diff --git a/includes/components/navigation.inc b/includes/components/navigation.inc
index 478420d..4d0cc5e 100644
--- a/includes/components/navigation.inc
+++ b/includes/components/navigation.inc
@@ -118,7 +118,7 @@ $navigation_admin = [
"minimal" => false,
"items" => [
time() >= 1686787200 ? null : [
- "name" => $pages["fronting"]["name"][$lang["_name"]],
+ "name" => "Front planner<span class='badge bg-warning text-black rounded-pill' style='position:relative;top:-1px; margin-left: 5px;'>EOL</span>",
"icon" => "/assets/icons/fronting.svg",
"invert" => true,
"link" => "/-/fronting",
@@ -126,6 +126,14 @@ $navigation_admin = [
"private" => false
],
[
+ "name" => $pages["evening"]["name"][$lang["_name"]] . (time() >= 1686787200 ? "" : "<span class='badge bg-info text-black rounded-pill' style='position:relative;top:-1px; margin-left: 5px;'>Beta</span>"),
+ "icon" => "/assets/icons/evening.svg",
+ "invert" => true,
+ "link" => "/-/evening",
+ "stepped" => null,
+ "private" => false
+ ],
+ [
"name" => $pages["profiles"]["name"][$lang["_name"]],
"icon" => "/assets/icons/profiles.svg",
"invert" => true,
@@ -173,8 +181,8 @@ $navigation_admin = [
"stepped" => null,
"private" => true
],
- [
- "name" => $pages["computers"]["name"][$lang["_name"]] . "<span class='badge bg-warning text-black rounded-pill' style='position:relative;top:-1px; margin-left: 5px;'>EOL</span>",
+ time() >= 1688169600 ? null : [
+ "name" => "Devices<span class='badge bg-warning text-black rounded-pill' style='position:relative;top:-1px; margin-left: 5px;'>EOL</span>",
"icon" => "/assets/icons/computers.svg",
"invert" => true,
"link" => "/-/computers",
diff --git a/includes/components/planner.inc b/includes/components/planner.inc
index b5fc7a5..9385b67 100644
--- a/includes/components/planner.inc
+++ b/includes/components/planner.inc
@@ -577,7 +577,7 @@
if (fronting[system][date][id][0] === "lzlaq" || fronting[system][date][id][0] === "irxyh") {
document.getElementById("edit-fronter-name").innerText = "merged members";
} else {
- document.getElementById("edit-fronter-name").innerText = names[fronting[system][date][id][0]] ?? fronting[system][date][id][0];
+ document.getElementById("edit-fronter-name").innerText = names[fronting[system][date][id][0]] ?? fronting[system][date][id][0] + " [" + fronting[system][date][id][0] + "]";
}
document.getElementById("edit-fronter-date").innerText = display;
@@ -863,7 +863,7 @@
<div id="list">
<div class="list-group">
<?php foreach (array_filter(scoreOrderGlobal(), function ($i) { return $i["system"] === "gdapd" || $i["system"] === "ynmuc"; }) as $member): ?>
- <a id="list-pony-<?= $member['id'] ?>" onclick="confirmFronterAdd(window.addSystem, '<?= $member['id'] ?>');" class="new-fronter-link list-group-item list-group-item-action"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?><peh-schedule-add></peh-schedule-add></a>
+ <a id="list-pony-<?= $member['id'] ?>" onclick="confirmFronterAdd(window.addSystem, '<?= $member['id'] ?>');" class="new-fronter-link list-group-item list-group-item-action"><img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> [<?= $member["id"] ?>]<peh-schedule-add></peh-schedule-add></a>
<?php endforeach; $member = getSystemMember("gdapd", "irxyh") ?>
<a id="list-pony-irxyh" onclick="confirmFronterAdd(window.addSystem, 'irxyh');" class="new-fronter-link list-group-item list-group-item-action"><img src="/assets/logo/newlogo3.png" style="filter:grayscale(1);width:24px;"> <span style="opacity:.75">Multiple merged members</span></a>
<a id="list-pony-zdtsg" onclick="confirmFronterAdd(window.addSystem, 'zdtsg');" class="new-fronter-link list-group-item list-group-item-action"><img src="/assets/logo/newlogo3.png" style="filter:grayscale(1);width:24px;"> <span style="opacity:.75">Other/unknown</span></a>
diff --git a/includes/external/addressbook/twitter-tag-to-id.js b/includes/external/addressbook/twitter-tag-to-id.js
index 663f195..6abccc0 100644
--- a/includes/external/addressbook/twitter-tag-to-id.js
+++ b/includes/external/addressbook/twitter-tag-to-id.js
@@ -29,6 +29,8 @@ function sleep(ms) {
Authorization: `Bearer ${app.twitter.bearer}`
}
})).data.data[0].id);
- } catch (e) {}
+ } catch (e) {
+ console.error(e);
+ }
}
})(); \ No newline at end of file
diff --git a/includes/luna.php b/includes/luna.php
index ceb9266..4033a9e 100644
--- a/includes/luna.php
+++ b/includes/luna.php
@@ -15,6 +15,6 @@ file_get_contents('https://' . $ntfy["server"] . '/' . $ntfy["topic"], false, st
"Title: " . formatPonypush("⚠️ Luna is out of support") . "\r\n" .
"Tags: reminder\r\n" .
"Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]),
- 'content' => formatPonypush("Luna is now out of support on Windows, Linux, macOS, Chrome OS and Android. It is recommended that you uninstall the application before the servers are disabled later this summer.")
+ 'content' => formatPonypush("Luna is now out of support on Windows, Linux, macOS, Chrome OS and Android. It is recommended that you uninstall the application before the servers are disabled on July 1st.")
]
])); \ No newline at end of file
diff --git a/includes/pages.json b/includes/pages.json
index 4753214..9cb2bf5 100644
--- a/includes/pages.json
+++ b/includes/pages.json
@@ -15,7 +15,7 @@
},
"computers": {
"name": {
- "en": "Devices"
+ "en": "Devices [EOL]"
},
"admin": true,
"limited": false
@@ -55,9 +55,16 @@
"admin": true,
"limited": true
},
+ "evening": {
+ "name": {
+ "en": "Evening schedule"
+ },
+ "admin": true,
+ "limited": true
+ },
"fronting": {
"name": {
- "en": "Front planner"
+ "en": "Front planner [EOL]"
},
"admin": true,
"limited": true
diff --git a/includes/util/functions.inc b/includes/util/functions.inc
index e64bc5a..ad54706 100644
--- a/includes/util/functions.inc
+++ b/includes/util/functions.inc
@@ -5,6 +5,18 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/bitset.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/homepage.inc";
require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/random.inc";
+if (!function_exists("getLastFronted")) {
+ function getLastFronted($members, $id) {
+ foreach ($members as $member) {
+ if ($member["id"] === $id) {
+ return $member["_lastFronted"];
+ }
+ }
+
+ return -1;
+ }
+}
+
if (!function_exists("createJob")) {
function createJob($title, $options) {
$job = [