summaryrefslogtreecommitdiff
path: root/includes/components
diff options
context:
space:
mode:
authorRaindropsSys <raindrops@equestria.dev>2024-01-13 16:12:11 +0100
committerRaindropsSys <raindrops@equestria.dev>2024-01-13 16:12:11 +0100
commit2b192b3840ac344c456b98304ea400f0af90da15 (patch)
tree081ba8cbc0add17f08c9b94fb4a830834d87c259 /includes/components
parent2bfdb0ab2e366007269d1b77446f1581801e05dc (diff)
downloadpluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.tar.gz
pluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.tar.bz2
pluralconnect-2b192b3840ac344c456b98304ea400f0af90da15.zip
Updated 46 files and deleted 19 files (automated)
Diffstat (limited to 'includes/components')
-rw-r--r--includes/components/2023ui.inc18
-rw-r--r--includes/components/emergency.inc8
-rw-r--r--includes/components/fullbanner.inc14
-rw-r--r--includes/components/header.inc8
-rw-r--r--includes/components/pleasure.inc10
-rw-r--r--includes/components/sysbanner.inc15
-rw-r--r--includes/components/timeline.inc2
7 files changed, 18 insertions, 57 deletions
diff --git a/includes/components/2023ui.inc b/includes/components/2023ui.inc
index 40c2d00..7b74395 100644
--- a/includes/components/2023ui.inc
+++ b/includes/components/2023ui.inc
@@ -152,9 +152,9 @@
<div style="height: 52px; display: flex; align-items: center;">
<?php global $isLowerLoggedIn; global $isLoggedIn; global $_PROFILE; if ($isLoggedIn || $isLowerLoggedIn): ?>
<a href="https://account.equestria.dev/hub/users/<?= $_PROFILE["id"] ?>" target="_blank" style="color: inherit; text-decoration: inherit;">
- <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?>
+ <?php $fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")) . "/fronters.json"), true); if (isset($fronters["members"][0])): ?>
<span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"] ?></span>
- <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : ($_PROFILE["login"] === "Moonwind" ? "hrbom" : "other"))), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
+ <img src="<?= getAsset(($_PROFILE["login"] === "raindrops" ? "gdapd" : ($_PROFILE["login"] === "Moonglow" ? "hrbom" : "other")), $fronters["members"][0]["id"]) ?>" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
<?php else: ?>
<span class="mobile-hide" style="margin-right: 5px; vertical-align: middle; margin-top: -2px;"><?= $_PROFILE["name"] ?></span>
<img class="antialias" src="https://account.equestria.dev/hub/api/rest/avatar/<?= $_PROFILE["id"] ?>?dpr=2&size=32" style="width: 32px; height: 32px; border-radius: 999px; background-color: var(--palette-2);">
@@ -188,10 +188,7 @@
<div id="side-bar" style="position: fixed; top: 62px; bottom: 20px; left: 0; width: 64px; display: flex; justify-content: center;">
<div>
<div id="side-bar-systems" style="background-color: var(--palette-4); height: max-content; border-radius: 999px;">
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Cloudburst System" class="ui2023-side-bar-system" href="/cloudburst" style="padding: 8px; height: 48px; width: 48px; display: block; border-top-left-radius: 999px; border-top-right-radius: 999px;">
- <img class="antialias" src="<?= getAsset("ynmuc") ?>" style="max-width: 32px; max-height: 32px;">
- </a>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Raindrops System" class="ui2023-side-bar-system" href="/raindrops" style="padding: 8px; height: 48px; width: 48px; display: block;">
+ <a data-bs-toggle="tooltip" data-bs-placement="right" title="Raindrops System" class="ui2023-side-bar-system" href="/raindrops" style="padding: 8px; height: 48px; width: 48px; display: block; border-top-left-radius: 999px; border-top-right-radius: 999px;">
<img class="antialias" class="antialias" src="<?= getAsset("gdapd") ?>" style="max-width: 32px; max-height: 32px;">
</a>
<?php global $app; if ($isLoggedIn || $isLowerLoggedIn): ?>
@@ -208,15 +205,6 @@
<a data-bs-toggle="tooltip" data-bs-placement="right" title="Relations" class="ui2023-side-bar-item" href="/-/relations" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
<img src="<?= icon("relations") ?>" style="max-width: 28px; max-height: 28px;">
</a>
-
- <?php if ($isLoggedIn): ?>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="Money tracker" class="ui2023-side-bar-item" href="/-/money" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
- <img src="<?= icon("money") ?>" style="max-width: 28px; max-height: 28px;">
- </a>
- <a data-bs-toggle="tooltip" data-bs-placement="right" title="System travelling" class="ui2023-side-bar-item" href="/-/travelling" style="padding: 10px; height: 48px; width: 48px; display: block; border-radius: 999px;">
- <img src="<?= icon("travelling") ?>" style="max-width: 28px; max-height: 28px;">
- </a>
- <?php endif; ?>
</div>
</div>
</div> \ No newline at end of file
diff --git a/includes/components/emergency.inc b/includes/components/emergency.inc
index 03d468c..8ebd65e 100644
--- a/includes/components/emergency.inc
+++ b/includes/components/emergency.inc
@@ -7,7 +7,7 @@
<span data-bs-toggle="modal" data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
<span data-bs-toggle="modal" onclick="disableAlert();" id="btn-off" style="display:none;background: #007f0b;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>OFF</b></span>
-<p style="text-align:center;margin-top:10px;">Sending next notification <b><span id="next-notification">never</span></b></p>
+<p style="text-align:center;margin-top:10px;">Sending the next notification <b><span id="next-notification">never</span></b></p>
<hr>
@@ -24,6 +24,9 @@
<label style="display: block; margin-left: 10px;">
<input type="checkbox" id="enable-moonglow"> Moonglow
</label>
+<!--<label style="display: block; margin-left: 10px;">
+ <input type="checkbox" id="enable-hailstorm"> Hailstorm
+</label>-->
<style>
<?php global $use2023UI; if (!$use2023UI): ?>
@@ -82,6 +85,7 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").checked ? "<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>" : null,
document.getElementById("enable-raindrops").checked ? "raindrops" : null,
document.getElementById("enable-moonglow").checked ? "moonglow" : null,
+ document.getElementById("enable-hailstorm").checked ? "hailstorm" : null,
].filter(i => i);
return "?" + targets.join("&");
}
@@ -123,6 +127,7 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = true;
document.getElementById("enable-raindrops").disabled = true;
document.getElementById("enable-moonglow").disabled = true;
+ document.getElementById("enable-hailstorm").disabled = true;
window.alertInterval = setInterval(() => {
window.alertIntervalCounter--;
@@ -146,5 +151,6 @@
document.getElementById("enable-<?= $GLOBALS["ColdHazeApp"]["other"]["slug"] ?>").disabled = false;
document.getElementById("enable-raindrops").disabled = false;
document.getElementById("enable-moonglow").disabled = false;
+ document.getElementById("enable-hailstorm").disabled = false;
}
</script> \ No newline at end of file
diff --git a/includes/components/fullbanner.inc b/includes/components/fullbanner.inc
index 960ae0a..07dfa59 100644
--- a/includes/components/fullbanner.inc
+++ b/includes/components/fullbanner.inc
@@ -4,16 +4,4 @@
</script>
<div id="member-banner"></div>
-<script src="/assets/logo/banner.js?_=<?= sha1_file($_SERVER['DOCUMENT_ROOT'] . "/assets/logo/banner.js") ?>"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script>
-
-<?php if (isset($travelling[$memberID]) && $travelling[$memberID]['travelling'] && !$travelling[$memberID]['equestria']): ?>
- <br>
- <div class="alert alert-primary" style="margin-bottom: 0 !important;">
- <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> <?= $lang["fullbanner"]["visit"][0] ?> <?= $systemID === "ynmuc" ? "Raindrops System" : "Cloudburst System" ?><?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", $lang["fullbanner"]["visit"][1])) ?><?= $systemCommonName ?>.
- </div>
-<?php elseif (isset($travelling[$memberID]) && $travelling[$memberID]['travelling'] && $travelling[$memberID]['equestria']): ?>
- <br>
- <div class="alert alert-primary" style="margin-bottom: 0 !important;">
- <?= getMiniName($memberData["display_name"] ?? $memberData["name"]) ?> is on a trip to <?= $metadata["fictive"] ? "Equestria" : "Celeste" ?>. <?= str_replace("%1", getMemberPronouns($memberData["pronouns"])["subjective"], str_replace("%2", getMemberPronouns($memberData["pronouns"])["third"] ? "is" : "are", "Therefore %1 %2 currently not in the ")) ?><?= $systemCommonName ?>.
- </div>
-<?php endif; ?> \ No newline at end of file
+<script src="/assets/logo/banner.js?_=<?= sha1_file($_SERVER['DOCUMENT_ROOT'] . "/assets/logo/banner.js") ?>"></script><script>refreshBanner(false, <?= $lang["_french"] ? "true" : "false" ?>)</script> \ No newline at end of file
diff --git a/includes/components/header.inc b/includes/components/header.inc
index 9409917..bd85761 100644
--- a/includes/components/header.inc
+++ b/includes/components/header.inc
@@ -72,9 +72,9 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
echo("Color: #" . $member["color"] . "\n\n");
}
- $sr = hexdec(substr($member["color"], 0, 2));
- $sg = hexdec(substr($member["color"], 2, 2));
- $sb = hexdec(substr($member["color"], 4, 2));
+ $sr = hexdec(substr($color, 0, 2));
+ $sg = hexdec(substr($color, 2, 2));
+ $sb = hexdec(substr($color, 4, 2));
$differencesAll = [];
@@ -432,7 +432,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/rainbow.inc";
opacity: 1 !important;
}
- .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, #hpd-cloudburst img, .ck img, #system-info img, #member-card img {
+ .antialias, #new-homepage img, #hpd-other img, #hpd-raindrops img, .ck img, #system-info img, #member-card img {
image-rendering: auto !important;
}
diff --git a/includes/components/pleasure.inc b/includes/components/pleasure.inc
index 9d2825c..6d5f4b1 100644
--- a/includes/components/pleasure.inc
+++ b/includes/components/pleasure.inc
@@ -7,12 +7,6 @@
</details>
</h2>
-<?php if ($_PROFILE["login"] === "cloudburst"): ?>
-<div class="alert alert-danger">
- <b>Notice:</b> Only <?= $app["other"]["name"] ?> can use the pleasure alert. If you wish to wake somepony up, use the <a href="/-/wakeup" style="filter: invert(1) hue-rotate(180deg);">wake-up alert</a> instead.
-</div>
-<?php endif; ?>
-
<?php if (isset($front[0])): ?>
<?php if (!parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other"] && !parseMetadata(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/metadata/" . $front[0]["id"] . ".json"), true))["other2"]): ?>
<div class="alert alert-warning">
@@ -45,9 +39,9 @@
<?php endif; ?>
<?php endif; ?>
-<span data-bs-toggle="modal" <?php if ($_PROFILE["login"] === "cloudburst"): ?>class="disabled"<?php endif; ?> data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
+<span data-bs-toggle="modal" data-bs-target="#turn-on" id="btn-on" style="background: #7f0000;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;display: block;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>ON</b></span>
<span onclick="disableAlert()" id="btn-off" style="display:none;background: #007f0b;font-size: 48px;padding: 10px 50px;border-radius: 10px;width: max-content;margin-left: auto;margin-right: auto;cursor: pointer;">Turn <b>OFF</b></span>
-<p style="text-align:center;margin-top:10px;">Sending next notification <b><span id="next-notification">never</span></b> · Local time for Raindrops: <span id="raindrops-time">--:--</span></p>
+<p style="text-align:center;margin-top:10px;">Sending the next notification <b><span id="next-notification">never</span></b> · Local time for Raindrops: <span id="raindrops-time">--:--</span></p>
<hr>
diff --git a/includes/components/sysbanner.inc b/includes/components/sysbanner.inc
index a97169a..6a66ab4 100644
--- a/includes/components/sysbanner.inc
+++ b/includes/components/sysbanner.inc
@@ -20,23 +20,8 @@ $pages = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/pa
<h3 style="height:max-content;"><?= $systemCommonName ?></h3>
<div style="height:max-content;" id="member-card">
<span>
- <?php
-
- if ($systemID === $app["other"]["id"]) {
- $travellers = [];
- } else {
- $travellers = array_filter(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($systemID === "gdapd" ? "ynmuc" : "gdapd") . "/members.json"), true), function ($i) use ($travelling) {
- return $travelling[$i['id']]['travelling'] && !$travelling[$i['id']]['equestria'];
- });
- }
-
- ?>
<?= count(scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/$systemID/members.json"), true), $systemID)) ?> members<?php
- if (count($travellers) > 0) {
- echo(" (+ " . count($travellers) . " " . (count($travellers) > 1 ? $lang["system"]["travellers"] : $lang["system"]["traveller"]) . ")");
- }
-
?><br><?php $leaders = array_filter(scoreOrderGlobal(), function ($i) use ($systemID) {
return $i["_system"] === $systemID && isset($i["_metadata"]["leader2"]) && $i["_metadata"]["leader2"];
}); if (count($leaders) > 0): ?><span style="vertical-align: middle; height: 24px;">Leader<?= count($leaders) > 1 ? "s" : "" ?>: </span><?php foreach ($leaders as $index => $leader): ?><a href="/<?= $leader["name"] ?>" class="member-link"><img src="<?= getAsset($leader["_system"], $leader["id"], "heads") ?>"><span style="vertical-align: middle;"> <?= $leader["display_name"] ?? $leader["name"] ?></span></a><?= $index <= count($leaders) - 1 ? ", " : "" ?><?php endforeach; ?><?php endif; ?>
diff --git a/includes/components/timeline.inc b/includes/components/timeline.inc
index 95b413b..21e82a2 100644
--- a/includes/components/timeline.inc
+++ b/includes/components/timeline.inc
@@ -29,7 +29,7 @@ function displayTimeline($systems) { global $app; $showIcons = count($systems) >
<?php foreach ($systems as $system): ?>
<tr style="height: <?= count($systems) === 1 ? 50 : 30 ?>px;">
<?php if ($showIcons): ?><td colspan="20">
- <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "ynmuc" ? "cloudburst" : ($system === "hrbom" ? "moonglow" : $app["other"]["slug"])) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;">
+ <a href="/<?= $system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $app["other"]["slug"]) ?>" style="width: 100%; height: 30px; display: flex; align-items: center; justify-content: center;">
<img alt="" style="border-radius: 5px; height: 24px; text-align: center;" src="<?= getAsset($system) ?>">
</a>
</td><?php endif; ?>