summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-08-02 14:08:08 +0200
committerRaindropsSys <contact@minteck.org>2023-08-02 14:08:08 +0200
commit5103495a461ed90f23b5ec890dca73935bff0c68 (patch)
treeadc16bfa325372623d6f58c3befa28bb25b72cec /pages
parent0406b656d04a6fffbcc5f6d16ecec9906cc3b609 (diff)
downloadpluralconnect-5103495a461ed90f23b5ec890dca73935bff0c68.tar.gz
pluralconnect-5103495a461ed90f23b5ec890dca73935bff0c68.tar.bz2
pluralconnect-5103495a461ed90f23b5ec890dca73935bff0c68.zip
Updated 19 files and added assets/icons/new/menu.svg (automated)
Diffstat (limited to 'pages')
-rw-r--r--pages/api/docs.php8
-rw-r--r--pages/api/reauthenticate.php8
-rw-r--r--pages/byfront.inc15
-rw-r--r--pages/home.inc2
-rw-r--r--pages/login.inc2
-rw-r--r--pages/money.inc6
-rw-r--r--pages/pair.inc4
-rw-r--r--pages/ponytown.inc16
-rw-r--r--pages/sessions.inc13
9 files changed, 45 insertions, 29 deletions
diff --git a/pages/api/docs.php b/pages/api/docs.php
index a60a6e6..31cd961 100644
--- a/pages/api/docs.php
+++ b/pages/api/docs.php
@@ -20,10 +20,10 @@ if (isset($select)) {
die("Not set");
}
-if ($json_object["content"]) $data["contents"] = $json_object["content"];
-if ($json_object["name"]) $data["name"] = $json_object["name"];
-if ($json_object["explicit"]) $data["nsfw"] = $json_object["explicit"];
-if ($json_object["category"]) $data["category"] = trim($json_object["category"]) !== "" && trim($json_object["category"]) !== "Unsorted" && trim($json_object["category"]) !== "unsorted" && trim($json_object["category"]) !== "/no" && trim($json_object["category"]) !== "Unsort" && trim($json_object["category"]) !== "unsort" ? $json_object["category"] : null;
+if (isset($json_object["content"])) $data["contents"] = $json_object["content"];
+if (isset($json_object["name"])) $data["name"] = $json_object["name"];
+if (isset($json_object["explicit"])) $data["nsfw"] = $json_object["explicit"];
+if (isset($json_object["category"])) $data["category"] = trim($json_object["category"]) !== "" && trim($json_object["category"]) !== "Unsorted" && trim($json_object["category"]) !== "unsorted" && trim($json_object["category"]) !== "/no" && trim($json_object["category"]) !== "Unsort" && trim($json_object["category"]) !== "unsort" ? $json_object["category"] : null;
$data["last"]["date"] = time();
$data["last"]["author"] = $_PROFILE['login'];
diff --git a/pages/api/reauthenticate.php b/pages/api/reauthenticate.php
index 2b5a8ca..b194098 100644
--- a/pages/api/reauthenticate.php
+++ b/pages/api/reauthenticate.php
@@ -26,9 +26,10 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) {
$old["last"] = time();
$old["profile"] = $_PROFILE;
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($old));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/tokens/" . $newToken, json_encode($_PROFILE));
} else if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLowerLoggedIn) {
- $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $_COOKIE['PEH2_SESSION_TOKEN']), true);
+ $old = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $_COOKIE['PEH2_SESSION_TOKEN']), true);
if (!isset($_GET["plain"])) {
$old["name"] = base64_decode($_GET["name"] ?? "LQo=");
@@ -41,7 +42,8 @@ if (isset($_COOKIE['PEH2_SESSION_TOKEN']) && $isLoggedIn) {
$old["last"] = time();
$old["profile"] = $_PROFILE;
- file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($old));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/sessions/" . $newToken, json_encode($old));
+ file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/lowertokens/" . $newToken, json_encode($_PROFILE));
}
die($newToken); \ No newline at end of file
diff --git a/pages/byfront.inc b/pages/byfront.inc
index f845378..a8ff483 100644
--- a/pages/byfront.inc
+++ b/pages/byfront.inc
@@ -111,30 +111,27 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ
}
if ((isset($age) && $age > 0 && time() > 1677628800) || time() <= 1677628800): ?>
- <div class="relation" style="background-color:<?php if ($member["_metadata"]["less_frequent"] || $member["_metadata"]["persecutor"]): ?><?php if ($member["_lastFronted"] > time() - (86400 * 21)): ?>rgba(128, 54, 54, .1)<?php else: ?><?php if ($member["_lastFronted"] > time() - (86400 * 37)): ?>rgba(255, 227, 0, 0.17)<?php else: ?>rgba(255, 255, 255, .1)<?php endif; ?>;<?php endif; ?><?php else: ?><?php if ($member["_lastFronted"] > time() - (86400 * 21)): ?>rgba(255, 255, 255, .1)<?php else: ?><?php if ($member["_lastFronted"] > time() - (86400 * 30)): ?>rgba(255, 227, 0, 0.17)<?php else: ?>rgba(255,55,55,0.17)<?php endif; ?>;<?php endif; ?><?php endif; ?>;margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;<?php if ($travelling[$member['id']]["travelling"] || ($member["_metadata"]["punished"] ?? false)): ?>opacity: 0.75;<?php endif; ?><?php if (isset($member["_metadata"]["not_fronting"]) && $member["_metadata"]["not_fronting"]): ?>background-color:rgba(255, 255, 255, .1) !important;<?php endif; ?>">
+ <div class="relation" style="margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;<?php if ($travelling[$member['id']]["travelling"] || ($member["_metadata"]["punished"] ?? false)): ?>opacity: 0.75;<?php endif; ?>">
<a class="relation-intro" style="background-color:rgba(255, 255, 255, .05);border-right:1px solid rgba(255, 255, 255, .1);margin:-10px;padding:10px;border-top-left-radius:10px;border-bottom-left-radius:10px;color: white;display:flex;align-items:center;text-decoration: none;" href="/<?= $member["name"] ?>">
<img src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px;">&nbsp;<?= $member["display_name"] ?? $member["name"] ?>
<span style="display: inline-block;margin-left: auto;">
<?php if ($member["_metadata"]["not_fronting"]): ?>
- <span class="badge bg-info rounded-pill text-black">No</span>
+ <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-info text-black" ?> rounded-pill">Not fronting</span>
<?php endif; ?>
<?php if ($member["_metadata"]["less_frequent"] && !(isset($member["_metadata"]["not_fronting"]) && $member["_metadata"]["not_fronting"])): ?>
<span class="badge bg-success rounded-pill">Less</span>
<?php endif; ?>
<?php if ($member["_metadata"]["persecutor"]): ?>
- <span class="badge bg-light text-black rounded-pill">Persecutor</span>
+ <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-light text-black" ?> rounded-pill">Persecutor</span>
<?php endif; ?>
<?php if (isset($member["_metadata"]["punished"]) && $member["_metadata"]["punished"]): ?>
- <span class="badge bg-light text-black rounded-pill">Punished</span>
+ <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "bg-light text-black" ?> rounded-pill">Punished</span>
<?php endif; ?>
<?php if ($member["_metadata"]["shared_memory"] !== 2): ?>
- <span class="badge text-black bg-warning rounded-pill">Memory</span>
+ <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "text-black bg-warning" ?> rounded-pill">Memory</span>
<?php endif; ?>
<?php if ($travelling[$member['id']]["travelling"]): ?>
- <span class="badge text-white bg-secondary rounded-pill">Travelling</span>
- <?php endif; ?>
- <?php if ($member["_lastFronted"] < time() - (86400 * 30) && !$member["_metadata"]["not_fronting"]): ?>
- <span class="badge text-white bg-danger rounded-pill">Must front</span>
+ <span class="badge <?= isset($use2023UI) && $use2023UI ? "bg-success" : "text-white bg-secondary" ?> rounded-pill">Travelling</span>
<?php endif; ?>
</span>
</a>
diff --git a/pages/home.inc b/pages/home.inc
index 7485cfd..fcd04ab 100644
--- a/pages/home.inc
+++ b/pages/home.inc
@@ -13,7 +13,7 @@ function banner() { global $isLoggedIn; global $isLowerLoggedIn; $byColor = getM
<img alt="" src="/assets/logo/newlogo<?= $isLoggedIn || $isLowerLoggedIn ? "3" : "" ?>.png" style="width:128px;" class="old-ui">
<img alt="" src="/assets/logo/newlogo-ng.png" style="width:128px;" class="new-ui">
<p style="z-index:999;position:relative;background:transparent;margin: 20px -10px 0 -20px;padding-right:30px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);">
- <?php foreach ($byColor as $member): ?><a class="rainbow-item" style="overflow: hidden;"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="height:32px;position:absolute;z-index:99;"></a><?php endforeach; ?>
+ <?php foreach ($byColor as $member): ?><a class="rainbow-item" style="overflow: hidden;"><img title="<?= $member["display_name"] ?? $member["name"] ?>" data-bs-toggle="tooltip" src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="height:32px;position:absolute;z-index:99;"></a><?php endforeach; ?>
</p>
<div style="margin-top:-33px;margin-bottom:0;margin-left:-20px;margin-right:20px;height:32px;text-align: center;display:grid;grid-template-columns: repeat(<?= count($byColor) ?>, 1fr);position:relative;left:10px;">
<?php foreach ($byColor as $member): ?><div>
diff --git a/pages/login.inc b/pages/login.inc
index 1522ab3..157794f 100644
--- a/pages/login.inc
+++ b/pages/login.inc
@@ -4,7 +4,7 @@ if (isset($_GET["return"])) {
setcookie("PEH2_RETURN_PAGE", $_GET["return"], 0, "/");
}
-if (isset($_GET["immediate"])) {
+if (isset($_GET["immediate"]) || (isset($_COOKIE["new2023UI"]) && !isset($_GET["no2023"]))) {
header("Location: /auth/init");
die();
}
diff --git a/pages/money.inc b/pages/money.inc
index aa2e57e..67a9a56 100644
--- a/pages/money.inc
+++ b/pages/money.inc
@@ -27,6 +27,12 @@ if (isset($parts[2])) {
$systemID = $_PROFILE["login"] === "cloudburst" ? "ynmuc" : "gdapd";
$fronters = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/" . ($_PROFILE["login"] === "cloudburst" ? "ynmuc" : "gdapd") . "/fronters.json"), true)["members"];
+if (!isset($parts[2])) {
+ unset($systemID);
+} else {
+ $systemID = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/money/" . $parts[2] . ".json"), true)["owner"] === "cloudburst" ? "ynmuc" : "gdapd";
+}
+
if (count($fronters) > 0) {
$myId = $fronters[0]["id"];
} else {
diff --git a/pages/pair.inc b/pages/pair.inc
index 2fafc31..8b0bb09 100644
--- a/pages/pair.inc
+++ b/pages/pair.inc
@@ -60,6 +60,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; glob
</div>
<style>
+ <?php global $use2023UI; if (!$use2023UI): ?>
.modal-header {
border-bottom: 1px solid #353738;
}
@@ -76,11 +77,12 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; glob
.alert-dismissible .btn-close {
filter: none !important;
}
+ <?php endif ?>
blockquote {
margin-left: 5px;
padding-left: 10px;
- border-left: 3px solid rgba(255, 255, 255, .25);
+ border-left: 3px solid var(--palette-5, rgba(255, 255, 255, .25));
}
</style>
diff --git a/pages/ponytown.inc b/pages/ponytown.inc
index 08d71ea..08c3f27 100644
--- a/pages/ponytown.inc
+++ b/pages/ponytown.inc
@@ -73,15 +73,15 @@ $member = getMemberWithoutSystem($parts[2]);
<div id="uploader">
<ol>
<li>Open Pony Town [<a href="https://pony.town/" target="_blank">main</a>, <a href="https://event.pony.town/" target="_blank">event</a>, <a href="https://eventblue.pony.town/" target="_blank">eventblue</a>, <a href="https://eventgreen.pony.town/" target="_blank">eventgreen</a>, <a href="https://breezy.pony.town/" target="_blank">breezy</a>, <a href="https://building.pony.town/" target="_blank">building</a>], login if needed, and select the right pony</li>
- <li>Click on <img alt="edit" src="/assets/editor/ponytown/step1.png" style="height: 2rem;"></li>
- <li>Focus on <img alt="Export" src="/assets/editor/ponytown/step2.png" style="height: 2rem;"> and click on <img alt="Image export zoom" src="/assets/editor/ponytown/step2b.png" style="height: 2rem;"></li>
- <li>In the menu, select <img alt="1x" src="/assets/editor/ponytown/step3.png" style="height: 2rem;"></li>
- <li>Click on <img alt="Image export settings" src="/assets/editor/ponytown/step4.png" style="height: 2rem;"> and uncheck everything, like this:<br><img alt="[all settings unchecked]" src="/assets/editor/ponytown/step4b.png" style="width: 25%;"></li>
- <li>Click on <img alt="PNG" src="/assets/editor/ponytown/step5.png" style="height: 2rem;"> and download the file to your device</li>
+ <li>Click on <img class="antialias" alt="edit" src="/assets/editor/ponytown/step1.png" style="height: 2rem;"></li>
+ <li>Focus on <img class="antialias" alt="Export" src="/assets/editor/ponytown/step2.png" style="height: 2rem;"> and click on <img class="antialias" alt="Image export zoom" src="/assets/editor/ponytown/step2b.png" style="height: 2rem;"></li>
+ <li>In the menu, select <img class="antialias" alt="1x" src="/assets/editor/ponytown/step3.png" style="height: 2rem;"></li>
+ <li>Click on <img class="antialias" alt="Image export settings" src="/assets/editor/ponytown/step4.png" style="height: 2rem;"> and uncheck everything, like this:<br><img class="antialias" alt="[all settings unchecked]" src="/assets/editor/ponytown/step4b.png" style="width: 25%;"></li>
+ <li>Click on <img class="antialias" alt="PNG" src="/assets/editor/ponytown/step5.png" style="height: 2rem;"> and download the file to your device</li>
<li>Upload this file here (yes this is a button):<br><input type="file" id="file-uploader"></li>
- <li>Go back to Pony Town, click on <img alt="Image export settings" src="/assets/editor/ponytown/step4.png" style="height: 2rem;"> again</li>
- <li>Check "Head only", and nothing else, like this:<br><img alt="[Head only checked]" src="/assets/editor/ponytown/step9.png" style="width: 25%;"></li>
- <li>Click on <img alt="PNG" src="/assets/editor/ponytown/step5.png" style="height: 2rem;"> once again and download the file to your device</li>
+ <li>Go back to Pony Town, click on <img class="antialias" alt="Image export settings" src="/assets/editor/ponytown/step4.png" style="height: 2rem;"> again</li>
+ <li>Check "Head only", and nothing else, like this:<br><img class="antialias" alt="[Head only checked]" src="/assets/editor/ponytown/step9.png" style="width: 25%;"></li>
+ <li>Click on <img class="antialias" alt="PNG" src="/assets/editor/ponytown/step5.png" style="height: 2rem;"> once again and download the file to your device</li>
<li>Upload this file (the second one) here (yes this is also a button):<br><input type="file" id="file-uploader2"></li>
<li>We will check if you used the correct settings and save it if everything is good.</li>
</ol>
diff --git a/pages/sessions.inc b/pages/sessions.inc
index f324494..0e4e779 100644
--- a/pages/sessions.inc
+++ b/pages/sessions.inc
@@ -157,6 +157,7 @@ $verifiedNames = [
</script>
<style>
+ <?php global $use2023UI; if (!$use2023UI): ?>
.modal-header {
border-bottom: 1px solid #353738;
}
@@ -193,6 +194,14 @@ $verifiedNames = [
color: #bbb;
}
+ <?php else: ?>
+
+ .list-group-item .text-muted {
+ color: var(--palette-9) !important;
+ }
+
+ <?php endif; ?>
+
.member-link, .list-group-item-action {
cursor: pointer !important;
}
@@ -206,13 +215,13 @@ $verifiedNames = [
margin-top: 10px;
margin-left: 5px;
padding-left: 10px;
- border-left: 3px solid rgba(255, 255, 255, .25);
+ border-left: 3px solid var(--palette-5, rgba(255, 255, 255, .25));
}
#device-bq {
margin-left: 5px;
padding-left: 10px;
- border-left: 3px solid rgba(255, 255, 255, .25);
+ border-left: 3px solid var(--palette-5, rgba(255, 255, 255, .25));
}
</style>