summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/flags.json1
-rw-r--r--pages/api/menu.php169
-rw-r--r--pages/byfront.inc5
-rw-r--r--pages/computers.inc4
4 files changed, 7 insertions, 172 deletions
diff --git a/includes/flags.json b/includes/flags.json
index 4c789da..9b5c360 100644
--- a/includes/flags.json
+++ b/includes/flags.json
@@ -20,6 +20,7 @@
"less_frequent": "!!Fronts less frequently",
"not_fronting": "!!Doesn't front evenly",
"persecutor": "!!Persecutor",
+ "punished": "Punished",
"private": "Hide from public listings",
"pacifier": "Sleeps with pacifier",
"other": "Having sex with %other%",
diff --git a/pages/api/menu.php b/pages/api/menu.php
deleted file mode 100644
index 56e5b88..0000000
--- a/pages/api/menu.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-
-require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/util/session.inc"; global $isLoggedIn; global $_PROFILE; global $isLowerLoggedIn; global $app;
-if (!$isLoggedIn && !$isLowerLoggedIn) header("Location: /-/login") and die();
-
-$available = json_decode(base64_decode($_GET["available"]), true);
-$isSexual = true;
-
-die(json_encode([
- [
- "title" => "Cold Haze",
- "items" => [
- [
- "title" => "Emergency alert",
- "link" => "coldhaze://-/emergency",
- "show" => $available["coldHaze"],
- "icon" => "icons://emergency"
- ],
- [
- "title" => "Front planner",
- "link" => "coldhaze://-/fronting",
- "show" => $available["coldHaze"],
- "icon" => "icons://planner"
- ],
- [
- "title" => "Profile scores",
- "link" => "coldhaze://-/profiles",
- "show" => $available["coldHaze"],
- "icon" => "icons://scores"
- ],
- [
- "title" => "Money tracker",
- "link" => "coldhaze://-/money",
- "show" => $available["coldHaze"] && $isLoggedIn,
- "icon" => "icons://money"
- ],
- [
- "title" => "Address book",
- "link" => "coldhaze://-/contacts",
- "show" => $available["coldHaze"] && $isLoggedIn,
- "icon" => "icons://contacts"
- ],
- [
- "title" => "Schedules",
- "link" => "coldhaze://-/schedules",
- "show" => $available["coldHaze"],
- "icon" => "icons://schedules"
- ],
- [
- "title" => "Rules",
- "link" => "coldhaze://-/rules",
- "show" => $available["coldHaze"] && $isLoggedIn,
- "icon" => "icons://rules"
- ],
- [
- "title" => "Toys database",
- "link" => "coldhaze://-/toys",
- "show" => $available["coldHaze"] && $isLoggedIn && $isSexual,
- "icon" => "icons://toys"
- ],
- [
- "title" => "Documents",
- "link" => "coldhaze://-/docs",
- "show" => $available["coldHaze"] && $isLoggedIn,
- "icon" => "icons://documents"
- ],
- [
- "title" => "Devices",
- "link" => "coldhaze://-/computers",
- "show" => $available["coldHaze"] && $isLoggedIn,
- "icon" => "icons://computers"
- ],
- [
- "title" => "System travelling",
- "link" => "coldhaze://-/travelling",
- "show" => $available["coldHaze"],
- "icon" => "icons://travelling"
- ]
- ]
- ],
- [
- "title" => "Other apps",
- "items" => [
- [
- "title" => "Ponycon.info",
- "link" => "ponycon://",
- "show" => $available["ponycon"],
- "icon" => "icons://ponycon"
- ],
- [
- "title" => "Delta",
- "link" => "delta://",
- "show" => $available["delta"],
- "icon" => "icons://delta"
- ],
- [
- "title" => "Gitea",
- "link" => "gitea://equestria.dev",
- "show" => $available["gitea"],
- "icon" => "icons://gitea"
- ],
- [
- "title" => "JetBrains Hub",
- "link" => "hub://hub/projects",
- "show" => true,
- "icon" => "icons://hub"
- ],
- [
- "title" => "YouTrack",
- "link" => "youtrack://",
- "show" => $available["youtrack"],
- "icon" => "icons://youtrack"
- ],
- [
- "title" => "Plex",
- "link" => "https://plex.equestria.dev",
- "show" => true,
- "icon" => "icons://plex"
- ],
- [
- "title" => "Proxmox",
- "link" => "https://admin.equestria.dev",
- "show" => true,
- "icon" => "icons://proxmox"
- ]
- ]
- ],
- [
- "title" => "Booru",
- "items" => [
- [
- "title" => "Home",
- "link" => "booru://home/",
- "show" => $available["booru"],
- "icon" => "icons://home"
- ],
- [
- "title" => "Search",
- "link" => "booru://search/",
- "show" => $available["booru"],
- "icon" => "icons://search"
- ],
- [
- "title" => "Followed tags",
- "link" => "booru://followed/",
- "show" => $available["booru"],
- "icon" => "icons://followed"
- ],
- [
- "title" => "Saved images",
- "link" => "booru://saved/",
- "show" => $available["booru"],
- "icon" => "icons://saved"
- ],
- [
- "title" => "Explicit gallery",
- "link" => "booru://nsfw/g/",
- "show" => $available["booru"] && $isSexual,
- "icon" => "icons://nsfw"
- ],
- [
- "title" => "Genitalia",
- "link" => "booru://nsfw/sp2/",
- "show" => $available["booru"] && $isSexual,
- "icon" => "https://booru.equestria.dev/nsfw/icon/"
- ]
- ]
- ]
-])); \ No newline at end of file
diff --git a/pages/byfront.inc b/pages/byfront.inc
index 2ec62bd..78c2319 100644
--- a/pages/byfront.inc
+++ b/pages/byfront.inc
@@ -111,7 +111,7 @@ $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(255, 255, 255, .1)<?php else: ?><?php if ($member["_lastFronted"] > time() - (86400 * 37)): ?>rgba(255, 227, 0, 0.17)rgba(128,54,54,0.17)<?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"]): ?>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="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"]): ?>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; ?>">
<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;">
@@ -124,6 +124,9 @@ $travelling = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includ
<?php if ($member["_metadata"]["persecutor"]): ?>
<span class="badge bg-light text-black rounded-pill">Persecutor</span>
<?php endif; ?>
+ <?php if ($member["_metadata"]["punished"]): ?>
+ <span class="badge 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>
<?php endif; ?>
diff --git a/pages/computers.inc b/pages/computers.inc
index 35f10cc..7b25133 100644
--- a/pages/computers.inc
+++ b/pages/computers.inc
@@ -134,12 +134,12 @@ if (str_ends_with($computer["os"], "unknown")) {
break;
case "server":
- echo("server ");
+ echo("Server ");
break;
default:
break;
- } ?> DSB <?= $computer["dsb"]["version"] ?? 0 ?>)<?php endif; ?></td>
+ } ?> DSB <?= $computer["dsb"]["version"] ?? 0 ?>)<?php else: ?> (legacy)<?php endif; ?></td>
</tr>
<tr>
<td style="padding-right: 10px; text-align: right;"><b>System:</b></td>