diff options
author | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-18 08:59:09 +0200 |
commit | 2c4ae43e688a9873e86211ea0e7aeb9ba770dd77 (patch) | |
tree | 17848d95522dab25d3cdeb9c4a6450e2a234861f /pages | |
parent | 108525534c28013cfe1897c30e4565f9893f3766 (diff) | |
download | pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.gz pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.tar.bz2 pluralconnect-2c4ae43e688a9873e86211ea0e7aeb9ba770dd77.zip |
Update
Diffstat (limited to 'pages')
-rw-r--r-- | pages/actions.inc | 2 | ||||
-rw-r--r-- | pages/dashboard.inc | 30 | ||||
-rw-r--r-- | pages/docs.inc | 30 | ||||
-rw-r--r-- | pages/home.inc | 2 | ||||
-rw-r--r-- | pages/splitting.inc | 2 | ||||
-rw-r--r-- | pages/toys.inc | 2 |
6 files changed, 46 insertions, 22 deletions
diff --git a/pages/actions.inc b/pages/actions.inc index 527b336..eb83f16 100644 --- a/pages/actions.inc +++ b/pages/actions.inc @@ -194,6 +194,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/keywords.inc'; if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/actions/actions.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/actions/actions.json", "[]"); global $_PROFILE; +global $pagename; +$parts = explode("/", $pagename); ?> diff --git a/pages/dashboard.inc b/pages/dashboard.inc index 59396e5..07a75e8 100644 --- a/pages/dashboard.inc +++ b/pages/dashboard.inc @@ -112,15 +112,15 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys'] <?php foreach ($today1 as $index => $id): $member = getMemberWithoutSystem($id[0]); ?> <li> <?php if ($member["name"] === "fusion"): ?> - <img alt="" src="/assets/logo/logo.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> + <img alt="" src="/assets/logo/logo.png" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> <?php else: ?> - <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> + <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> <?php endif; ?> <?php if (isset($id[1])): $member2 = getMemberWithoutSystem($id[1]); ?> - <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> + <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> <?php endif; ?> - <?php if (isset($today2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $today2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($today2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $today2[$index][1]); ?> - and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> + <?php if (isset($today2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $today2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($today2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $today2[$index][1]); ?> + and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> <?php endif; ?></span><?php endif; ?> </li> <?php endforeach; ?> @@ -131,15 +131,15 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys'] <?php foreach ($tomorrow1 as $index => $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id[0]); ?> <li> <?php if ($member["name"] === "fusion"): ?> - <img alt="" src="/assets/logo/logo.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> + <img alt="" src="/assets/logo/logo.png" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> <?php else: ?> - <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> + <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> <?php endif; ?> <?php if (isset($id[1])): $member2 = getMemberWithoutSystem($id[1]); ?> - <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> + <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> <?php endif; ?> - <?php if (isset($tomorrow2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $tomorrow2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($tomorrow2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $tomorrow2[$index][1]); ?> - and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> + <?php if (isset($tomorrow2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $tomorrow2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($tomorrow2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $tomorrow2[$index][1]); ?> + and <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> <?php endif; ?></span><?php endif; ?> </li> <?php endforeach; ?> @@ -150,15 +150,15 @@ $viewingPonyHasSex = in_array($fronter, $poniesHavingSex) || isset($_GET['toys'] <?php foreach ($nextday1 as $index => $id): $member = getSystemMember($_PROFILE["login"] === "raindrops" ? "gdapd" : "ynmuc", $id[0]); ?> <li> <?php if ($member["name"] === "fusion"): ?> - <img alt="" src="/assets/logo/logo.png" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> + <img alt="" src="/assets/logo/logo.png" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;">Merged members</span> <?php else: ?> - <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> + <img alt="" src="<?= getAsset($member['system'], $member["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <b style="vertical-align: middle;"><?= getMiniName($member["display_name"] ?? $member["name"]) ?></b> <?php endif; ?> <?php if (isset($id[1])): $member2 = getMemberWithoutSystem($id[1]); ?> - <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> + <b style="vertical-align: middle;">and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?></b> <?php endif; ?> - <?php if (isset($nextday2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $nextday2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($nextday2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $nextday2[$index][1]); ?> - and <img alt="" src="<?= getAsset($member['system'], $member2["id"], "heads") ?>" style="width:24px; height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> + <?php if (isset($nextday2[$index])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $nextday2[$index][0]); ?><span style="vertical-align: middle;">with</span> <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <span style="vertical-align: middle;"><?= getMiniName($member2["display_name"] ?? $member2["name"]) ?><?php if (isset($nextday2[$index][1])): $member2 = getSystemMember($_PROFILE["login"] === "raindrops" ? "ynmuc" : "gdapd", $nextday2[$index][1]); ?> + and <img alt="" src="<?= getAsset($member2['system'], $member2["id"], "heads") ?>" style="height: 24px; vertical-align: middle;"> <?= getMiniName($member2["display_name"] ?? $member2["name"]) ?> <?php endif; ?></span><?php endif; ?> </li> <?php endforeach; ?> diff --git a/pages/docs.inc b/pages/docs.inc index f893e95..0322f32 100644 --- a/pages/docs.inc +++ b/pages/docs.inc @@ -57,6 +57,12 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; ยท <span id="editor-save-status" class="text-muted">Saved</span> </p> + <?php $timeDiff = round((1800 - (time() - $data["last"]["date"])) / 60); if ($timeDiff >= 0 && $data["last"]["author"] !== $_PROFILE["login"]): ?> + <div class="alert alert-warning"> + <b>This document is currently in use by <?= $data["last"]["author"] === "raindrops" ? "the Raindrops System" : "the Cloudburst System" ?>.</b> It has been open in read-only to prevent conflicts with the changes they make. If they stopped editing the document, it will become editable for you after you refresh the page in <?= $timeDiff ?> minute<?= $timeDiff > 1 ? "s" : "" ?>. + </div> + <?= $data["contents"] ?> + <?php else: ?> <textarea id="editor"><?= $data["contents"] ?></textarea> <script src="/assets/editor/editor.js"></script> @@ -112,6 +118,10 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; .ck-editor__editable { border-color: transparent !important; } + + .ck.ck-sticky-panel__content_sticky { + top: 59px !important; + } </style> <script> @@ -189,6 +199,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; }, 100) </script> + <?php endif; ?> </div><?php else: ?> <h2>Documents</h2> <div id="list"> @@ -210,11 +221,12 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; return strip_tags($i["contents"]) !== "/delete"; })); + $categoryFirst = []; $unsorted = []; $categories = []; foreach ($unsorted_pre as $item) { if (isset($item["category"])) { - $existing_categories = array_keys($categories); + $existing_categories = [...array_keys($categories), ...array_keys($categoryFirst)]; $matched_category = null; foreach ($existing_categories as $existing_category) { @@ -224,8 +236,14 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; } $selected_category = $matched_category ?? $item["category"]; - if (!isset($categories[$selected_category])) $categories[$selected_category] = []; - $categories[$selected_category][] = $item; + + if (str_starts_with($item["category"], ".")) { + if (!isset($categoryFirst[$selected_category])) $categoryFirst[$selected_category] = []; + $categoryFirst[$selected_category][] = $item; + } else { + if (!isset($categories[$selected_category])) $categories[$selected_category] = []; + $categories[$selected_category][] = $item; + } } else { $unsorted[] = $item; } @@ -239,10 +257,12 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; return $b["last"]["date"] - $a["last"]["date"]; }); + $fullList = [...$categoryFirst, ...$categories]; + ?> - <?php foreach ($categories as $category => $items): ?> - <h4><?= $category ?></h4><div class="list-group"> + <?php foreach ($fullList as $category => $items): ?> + <h4><?= str_starts_with($category, ".") ? substr($category, 1) : $category ?></h4><div class="list-group"> <?php foreach ($items as $item): ?> <a href="/-/docs/<?= $item["id"] ?>" id="document-<?= $item["id"] ?>" class="list-group-item list-group-item-action document-listing <?php if (strip_tags($item["contents"]) === "/delete"): ?>opacity-75<?php endif; ?>"> <?= $item["name"] ?> diff --git a/pages/home.inc b/pages/home.inc index 4f4b0f6..54426a9 100644 --- a/pages/home.inc +++ b/pages/home.inc @@ -19,7 +19,7 @@ <div style="text-align: center;"> <img alt="" src="/assets/logo/newlogo.png" style="width:128px;"> <p style="z-index:999;position:relative;background:black;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 data-bs-html="true" class="rainbow-item tooltip-nohelp" title="<b><?= $member["display_name"] ?? $member["name"] ?></b><br><?= ($travelling[$member['id']]["travelling"] ? $member["_system"] === "ynmuc" : $member["_system"] === "gdapd") ? "Raindrops System" : "Cloudburst System" ?>" data-bs-toggle="tooltip" style="overflow: hidden;" href="/<?= $member["name"] ?>"><img src="<?= getAsset($member["_system"], $member["id"], "heads") ?>" style="width:32px;height:32px;position:absolute;z-index:99;"></a><?php endforeach; ?> + <?php foreach ($byColor as $member): ?><a data-bs-html="true" class="rainbow-item tooltip-nohelp" title="<b><?= $member["display_name"] ?? $member["name"] ?></b><br><?= ($travelling[$member['id']]["travelling"] ? $member["_system"] === "ynmuc" : $member["_system"] === "gdapd") ? "Raindrops System" : "Cloudburst System" ?>" data-bs-toggle="tooltip" style="overflow: hidden;" href="/<?= $member["name"] ?>"><img 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);"> <?php foreach ($byColor as $member): ?><div> diff --git a/pages/splitting.inc b/pages/splitting.inc index 1ea2d70..81571a6 100644 --- a/pages/splitting.inc +++ b/pages/splitting.inc @@ -14,7 +14,7 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/header.inc'; }); foreach ($members as $member): ?> <div class="relation" style="background-color:rgba(255, 255, 255, .1);margin-bottom:10px;padding:10px;border-radius:10px;display:grid;grid-template-columns: 1fr 2fr max-content;"> <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["system"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> + <img src="<?= getAsset($member["system"], $member["id"], "heads") ?>" style="width:24px;"> <?= $member["display_name"] ?? $member["name"] ?> </a> <div class="relation-item" style="display:flex;align-items:center;margin-left:10px;padding:0 20px;"> diff --git a/pages/toys.inc b/pages/toys.inc index 8e9ba57..9032944 100644 --- a/pages/toys.inc +++ b/pages/toys.inc @@ -188,6 +188,8 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/includes/keywords.inc'; if (!file_exists($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json")) file_put_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/data/toys/toys.json", "[]"); global $_PROFILE; +global $pagename; +$parts = explode("/", $pagename); ?> |