summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-06-21 09:20:44 +0200
committerRaindropsSys <contact@minteck.org>2023-06-21 09:20:44 +0200
commit898a3d5af7d8bc4578786f1099d6fe092573d112 (patch)
tree98a5d54fe3fbccd98f9391c77e115be40c0c61f8
parent00572f011866cfdf7bb62e8ad0065d621b8d3f0b (diff)
downloadpluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.tar.gz
pluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.tar.bz2
pluralconnect-898a3d5af7d8bc4578786f1099d6fe092573d112.zip
Updated 2 files (automated)
-rw-r--r--includes/components/details.inc38
-rw-r--r--includes/external/matrix/index.js16
2 files changed, 54 insertions, 0 deletions
diff --git a/includes/components/details.inc b/includes/components/details.inc
index 6b8ea64..288f540 100644
--- a/includes/components/details.inc
+++ b/includes/components/details.inc
@@ -1,4 +1,42 @@
<?php global $isLoggedIn; global $metadata; global $memberData; global $isLowerLoggedIn; global $systemID; global $app; global $lang; global $pages; $pronouns = getMemberPronouns($memberData['pronouns']); ?>
+<?php if ($isLoggedIn && $memberData['id'] === "alily"): ?>
+<div id="member-details-hazy" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "44" : "transparent" ?>; margin-left: -20px; margin-right: -20px; padding: 10px 20px;">
+ <div style="display: grid; grid-template-columns: 128px 1fr;">
+ <img id="member-icon2" src="data:image/png;base64,<?= base64_encode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/assets/uploads/hazy.png")) ?>" alt="" style="background-color:rgba(255, 255, 255, .125);width:128px;height:128px;border-radius:5px;">
+ <div id="member-details-hazy2" style="display: flex; align-items: center; justify-content: center; text-align: center;">
+ <div>
+ <h3 style="margin: 0;">Hazel Stardawn</h3>
+ <div style="margin-bottom:0.5rem;"></div>
+ <p style="margin: 0 10px;">This pony takes a human appearance when she is around <u><a href="/leah" class="member-link">Leah</a></u> or other humans in Cloudburst System. However, her pony appearance remains her preferred one and she will use it with other creatures and pony members of Cloudburst System.</p>
+ </div>
+ </div>
+ </div>
+</div>
+
+<style>
+ @media (max-width: 700px) {
+ #member-details-hazy > div {
+ grid-template-columns: 46px 1fr !important;
+ }
+
+ #member-details-hazy2 {
+ text-align: left !important;
+ justify-content: left !important;
+ }
+
+ #member-icon2 {
+ width: 36px !important;
+ height: 36px !important;
+ border-radius: 999px !important;
+ }
+
+ #member-details-hazy2 > div > p {
+ margin: 0 !important;
+ }
+ }
+</style>
+
+<?php endif; ?>
<div id="member-details" class="<?= (($isLoggedIn || $isLowerLoggedIn) && $systemID !== $app["other"]["id"]) ? 'member-details-loggedIn' : 'member-details-loggedIn2' ?>" style="<?php if (!$isLoggedIn && !$isLowerLoggedIn): ?>grid-template-columns: repeat(3, 1fr);<?php endif; ?> background-color: <?= isset($memberData["color"]) ? '#' . $memberData["color"] . "33" : "transparent" ?>; margin-left: -20px; margin-right: -20px;">
<div>
<b><?= $lang["details"]["food"] ?></b><span class="member-small-separator"><br></span>
diff --git a/includes/external/matrix/index.js b/includes/external/matrix/index.js
index e699d0d..8e6f0b8 100644
--- a/includes/external/matrix/index.js
+++ b/includes/external/matrix/index.js
@@ -108,6 +108,22 @@ client.once("sync", async function (state, prevState, res) {
}
});
+ if (user === "raindrops" && name === "Hazy Stardawn") {
+ child_process.execSync("convert " + avatar1 + " -set colorspace Gray -separate -average /tmp/chm-" + user + ".webp");
+
+ let res2 = await client.uploadContent(fs.readFileSync("../../../assets/uploads/hazy.png"));
+
+ await axios.put("https://chat.equestria.dev/_matrix/client/r0/rooms/" + encodeURIComponent(require('../../app.json')['matrix']['room']) + "/state/m.room.member/%40raindrops%3Aequestria.dev", {
+ avatar_url: res2.content_uri,
+ displayname: "Hazel Stardawn",
+ membership: "join"
+ }, {
+ headers: {
+ Authorization: "Bearer " + token
+ }
+ });
+ }
+
process.exit(0);
} else {
console.log(state);