From 96eb5745754824a2a75698af4b60cc0a84c890ea Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Thu, 29 Feb 2024 20:30:14 +0100 Subject: Updated 9 files (automated) --- auth/callback/index.php | 2 +- auth/init/index.php | 2 +- includes/fragments/dashboard.inc | 6 +++--- includes/jobs/FrontersNotification.php | 6 +++--- includes/jobs/RefreshCache.php | 2 +- includes/util/agewarning.inc | 4 ++-- pages/api/badger.php | 2 +- pages/api/violette.php | 2 +- pages/pair.inc | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/auth/callback/index.php b/auth/callback/index.php index 9697e63..e808dd1 100644 --- a/auth/callback/index.php +++ b/auth/callback/index.php @@ -21,7 +21,7 @@ curl_setopt($crl, CURLOPT_HTTPHEADER, [ "Content-Type: application/x-www-form-urlencoded", "Accept: application/json" ]); -curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode("https://ponycule.equestria.horse/auth/callback") . "&code=" . $_GET['code']); +curl_setopt($crl, CURLOPT_POSTFIELDS, "grant_type=authorization_code&redirect_uri=" . urlencode("https://ponycule.p.equestria.dev/auth/callback") . "&code=" . $_GET['code']); $result = curl_exec($crl); $result = json_decode($result, true); diff --git a/auth/init/index.php b/auth/init/index.php index d2f93ce..3360efc 100644 --- a/auth/init/index.php +++ b/auth/init/index.php @@ -3,5 +3,5 @@ $app = $GLOBALS["ColdHazeApp"] = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/app.json"), true); $server = "account.equestria.dev"; -header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $GLOBALS["ColdHazeApp"]["oauth"]["id"] . "&response_type=code&redirect_uri=https://ponycule.equestria.horse/auth/callback&scope=Hub&request_credentials=default&access_type=offline"); +header("Location: https://$server/hub/api/rest/oauth2/auth?client_id=" . $GLOBALS["ColdHazeApp"]["oauth"]["id"] . "&response_type=code&redirect_uri=https://ponycule.p.equestria.dev/auth/callback&scope=Hub&request_credentials=default&access_type=offline"); die(); diff --git a/includes/fragments/dashboard.inc b/includes/fragments/dashboard.inc index 9d3f546..3cf8d6f 100644 --- a/includes/fragments/dashboard.inc +++ b/includes/fragments/dashboard.inc @@ -227,10 +227,10 @@ global $use2023UI; " style="margin-right: 5px; height: 24px; width: 24px;">
Raindrops schedule
- -
Plex
+
+
Plex
- +
Streaming server
diff --git a/includes/jobs/FrontersNotification.php b/includes/jobs/FrontersNotification.php index 85a3216..888b640 100644 --- a/includes/jobs/FrontersNotification.php +++ b/includes/jobs/FrontersNotification.php @@ -66,7 +66,7 @@ if (count($fronters["members"]) > 1) { "Title: " . formatPonypush("🐴 Switch occurred in $name") . "\r\n" . "Priority: default\r\n" . "Tags: switch\r\n" . - "Actions: view, Open " . $fronters["members"][0]["display_name"] . " on Ponycule, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true;view, Open " . $fronters["members"][1]["display_name"] . " on Cold Haze, https://ponies.equestria.horse/" . $fronters["members"][1]["name"] . "/, clear=true\r\n" . + "Actions: view, Open " . $fronters["members"][0]["display_name"] . " on Ponycule, https://ponycule.p.equestria.dev/" . $fronters["members"][0]["name"] . "/, clear=true;view, Open " . $fronters["members"][1]["display_name"] . " on Cold Haze, https://ponycule.p.equestria.dev/" . $fronters["members"][1]["name"] . "/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => formatPonypush(($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " and " . ($fronters["members"][1]["display_name"] ?? $fronters["members"][1]["name"]) . " switched in just now") ] @@ -81,7 +81,7 @@ if (count($fronters["members"]) > 1) { "Title: " . formatPonypush("🐴 Switch occurred in $name") . "\r\n" . "Priority: default\r\n" . "Tags: switch\r\n" . - "Actions: view, Open on Ponycule, https://ponies.equestria.horse/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . + "Actions: view, Open on Ponycule, https://ponycule.p.equestria.dev/" . $fronters["members"][0]["name"] . "/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => formatPonypush(($fronters["members"][0]["display_name"] ?? $fronters["members"][0]["name"]) . " switched in just now") ] @@ -96,7 +96,7 @@ if (count($fronters["members"]) > 1) { "Title: " . formatPonypush("🐴 Switch occurred in $name") . "\r\n" . "Priority: default\r\n" . "Tags: switch\r\n" . - "Actions: view, Open on Ponycule, https://ponies.equestria.horse/, clear=true\r\n" . + "Actions: view, Open on Ponycule, https://ponycule.p.equestria.dev/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => formatPonypush("The fallback pony switched in just now") ] diff --git a/includes/jobs/RefreshCache.php b/includes/jobs/RefreshCache.php index 35e724a..5b4af13 100644 --- a/includes/jobs/RefreshCache.php +++ b/includes/jobs/RefreshCache.php @@ -22,7 +22,7 @@ $urls = [ foreach ($urls as $url) { echo(" " . $url . "\n"); - exec("nice -n 19 curl -k -H 'Host: ponies.equestria.horse' https://localhost" . $url); + exec("nice -n 19 curl -k -H 'Host: ponycule.p.equestria.dev' https://localhost" . $url); } echo("Refreshed cache\n"); \ No newline at end of file diff --git a/includes/util/agewarning.inc b/includes/util/agewarning.inc index 8f3753c..06a5e4d 100644 --- a/includes/util/agewarning.inc +++ b/includes/util/agewarning.inc @@ -12,7 +12,7 @@ function showWarning($name, $id, $system) { "Title: " . formatPonypush("⚠️ $name does not have an age or birth year set") . "\r\n" . "Priority: max\r\n" . "Tags: switch\r\n" . - "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" . + "Actions: view, Edit on Ponycule, https://ponycule.p.equestria.dev/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => formatPonypush("To make sure they appear on the fronting schedule (and to make sure they can front again), they need to set an age or birth year now.") ] @@ -26,7 +26,7 @@ function showWarning($name, $id, $system) { "Title: " . formatPonypush("⚠️ $name does not have an age or birth year set") . "\r\n" . "Priority: max\r\n" . "Tags: switch\r\n" . - "Actions: view, Edit on Ponycule, https://ponies.equestria.horse/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" . + "Actions: view, Edit on Ponycule, https://ponycule.p.equestria.dev/-/metadata/" . ($system === "gdapd" ? "raindrops" : ($system === "hrbom" ? "moonglow" : $GLOBALS["ColdHazeApp"]["other"]["slug"])) . "/" . $id . "/, clear=true\r\n" . "Authorization: Basic " . base64_encode($ntfy["user"] . ":" . $ntfy["password"]), 'content' => formatPonypush("To make sure they still appear on the fronting schedule after March 1st, they need to set an age or birth year now.") ] diff --git a/pages/api/badger.php b/pages/api/badger.php index ee7bfa7..d54e69f 100644 --- a/pages/api/badger.php +++ b/pages/api/badger.php @@ -47,6 +47,6 @@ die(json_encode(array_map(function ($i) { default => $i["_metadata"]["species"][0] . "_" . $i["_metadata"]["robot"] }, "age" => getAge($i["_metadata"]), - "avatar" => "https://ponies.equestria.horse" . getAsset($i["system"], $i["id"], "heads") + "avatar" => "https://ponycule.p.equestria.dev" . getAsset($i["system"], $i["id"], "heads") ]; }, $list), JSON_PRETTY_PRINT)); \ No newline at end of file diff --git a/pages/api/violette.php b/pages/api/violette.php index c1e3da8..1f6f4f0 100644 --- a/pages/api/violette.php +++ b/pages/api/violette.php @@ -12,7 +12,7 @@ $list = scoreOrder(json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/i $data["count"] = count($list); $data["ponies"] = array_values(array_filter(array_map(function ($i) { return [ - "url" => "https://ponies.equestria.horse" . getAsset("gdapd", $i["id"] ?? "", "heads"), + "url" => "https://ponycule.p.equestria.dev" . getAsset("gdapd", $i["id"] ?? "", "heads"), "label" => $i["display_name"] ?? $i["name"] ]; }, $list), function ($i) { diff --git a/pages/pair.inc b/pages/pair.inc index 42e70ef..3adc14f 100644 --- a/pages/pair.inc +++ b/pages/pair.inc @@ -96,7 +96,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; glob } if (name.startsWith("Cold Haze for Wear OS ") || name.startsWith("Ponycule for Wear OS ")) { - return "https://static.equestria.horse/ch-wear.png"; + return "https://cdn.equestria.dev/ch-wear.png"; } return "/assets/logo/newlogo-ng.png"; @@ -104,7 +104,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/components/header.inc'; glob (async () => { const token = await (await fetch("/api/token")).text(); - let ws = window.ws = new WebSocket("wss://ponies.equestria.horse/_PairingServices-WebSocket-EntryPoint/socket"); + let ws = window.ws = new WebSocket("wss://ponycule.p.equestria.dev/_PairingServices-WebSocket-EntryPoint/socket"); ws.onopen = (event) => { console.log(event); -- cgit