Breakdowns can now be selected to be shown, and entrances mapped will now show the breakdown of the scene they're from.
This commit is contained in:
parent
d4660f49d4
commit
6f573685e5
@ -5,9 +5,9 @@ from json import loads
|
||||
class ServerAddressForm(forms.Form):
|
||||
server_address_form = forms.URLField(
|
||||
max_length=1312, initial="http://localhost:8000/", empty_value="http://localhost:8000/", label="")
|
||||
server_address_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
|
||||
server_address_form.widget.attrs["class"] = "w-full rounded-xl border-none shadow-inner shadow-[#242424] bg-white bg-opacity-10"
|
||||
|
||||
|
||||
class BackendFilepathForm(forms.Form):
|
||||
backend_filepath_form = forms.CharField()
|
||||
backend_filepath_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
|
||||
backend_filepath_form.widget.attrs["class"] = "w-full rounded-xl border-none shadow-inner shadow-[#242424] bg-white bg-opacity-10"
|
||||
|
@ -20,6 +20,27 @@ window.onload = () => {
|
||||
);
|
||||
};
|
||||
|
||||
function banana(event) {
|
||||
show_breakdown(event.dataset.scene);
|
||||
}
|
||||
|
||||
function show_breakdown(scene) {
|
||||
console.log(scene);
|
||||
Array.from(document.getElementById("breakdown-list").children).forEach(
|
||||
(breakdown) => {
|
||||
if (breakdown.id == `${scene}-breakdown`) {
|
||||
breakdown.classList.remove("hidden");
|
||||
} else {
|
||||
breakdown.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
function notices_ur_debug() {
|
||||
document.getElementById("debug-block").classList.toggle("hidden");
|
||||
}
|
||||
|
||||
async function get_updated_filepath() {
|
||||
fetch(`${document.URL}get/settings`)
|
||||
.then((response) => response.json())
|
||||
@ -112,16 +133,15 @@ async function refresh_elements(cross_codes) {
|
||||
.getElementById("overview-totals")
|
||||
.querySelector(".overview-entrances");
|
||||
let summary_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".summary-list")
|
||||
.getElementById("summary-list")
|
||||
.firstElementChild.firstElementChild.cloneNode(true);
|
||||
summary_block.id = "";
|
||||
let breakdown_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.firstElementChild.cloneNode(true);
|
||||
breakdown_block.id = "";
|
||||
let cross_codes_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.firstElementChild.querySelector(".codes-block")
|
||||
.cloneNode(true);
|
||||
breakdown_block.classList.remove("hidden");
|
||||
@ -130,16 +150,20 @@ async function refresh_elements(cross_codes) {
|
||||
.firstElementChild.cloneNode(true);
|
||||
debug_item.classList.remove("hidden");
|
||||
let new_breakdown_list = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.cloneNode(true);
|
||||
let new_summary_list = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".summary-list")
|
||||
.getElementById("summary-list")
|
||||
.cloneNode(true);
|
||||
let new_debug_block = document
|
||||
.getElementById("debug-block")
|
||||
.cloneNode(true);
|
||||
let current_open_breakdown = "";
|
||||
Array.from(new_breakdown_list.children).forEach((scene) => {
|
||||
if (!Array.from(scene.classList).includes("hidden")) {
|
||||
current_open_breakdown = scene.id;
|
||||
}
|
||||
});
|
||||
|
||||
// Clear out the current lists.
|
||||
new_breakdown_list.innerHTML = "";
|
||||
@ -154,8 +178,7 @@ async function refresh_elements(cross_codes) {
|
||||
Object.keys(all_scenes).forEach((scene) => {
|
||||
// Create variables for element pointers.
|
||||
summary_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".summary-list")
|
||||
.getElementById("summary-list")
|
||||
.firstElementChild.firstElementChild.cloneNode(true);
|
||||
summary_block.classList.remove("hidden");
|
||||
let summary_title = summary_block.querySelector(".summary-title");
|
||||
@ -164,10 +187,8 @@ async function refresh_elements(cross_codes) {
|
||||
summary_block.querySelector(".summary-entrances");
|
||||
|
||||
breakdown_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.firstElementChild.cloneNode(true);
|
||||
breakdown_block.classList.remove("hidden");
|
||||
let breakdown_block_title = breakdown_block.querySelector(
|
||||
".breakdown-block-title"
|
||||
);
|
||||
@ -197,8 +218,7 @@ async function refresh_elements(cross_codes) {
|
||||
.firstElementChild.cloneNode(true);
|
||||
|
||||
cross_codes_block = document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.firstElementChild.querySelector(".codes-block")
|
||||
.cloneNode(true);
|
||||
let new_cross_codes_block_list = cross_codes_block
|
||||
@ -253,13 +273,19 @@ async function refresh_elements(cross_codes) {
|
||||
}
|
||||
});
|
||||
Object.keys(all_scenes[scene].Entrances).forEach((entrances) => {
|
||||
if (all_scenes[scene].Entrances[entrances] == "") {
|
||||
if (all_scenes[scene].Entrances[entrances].Door == "") {
|
||||
breakdown_block_entrances_list_item.textContent = `❌ ${entrances}`;
|
||||
new_breakdown_block_entrances_list.appendChild(
|
||||
breakdown_block_entrances_list_item.cloneNode(true)
|
||||
);
|
||||
} else {
|
||||
breakdown_block_mapped_list_item.textContent = `✔️ ${entrances} -> ${all_scenes[scene].Entrances[entrances]}`;
|
||||
breakdown_block_mapped_list_item.textContent = `✔️ ${entrances} -> ${all_scenes[scene].Entrances[entrances].Door}`;
|
||||
breakdown_block_mapped_list_item.id = `${entrances}-mapped`;
|
||||
breakdown_block_mapped_list_item.dataset.scene =
|
||||
all_scenes[scene].Entrances[entrances].Scene;
|
||||
// breakdown_block_mapped_list_item.onclick = () => {
|
||||
// show_breakdown(all_scenes[scene].Entrances[entrances].Scene);
|
||||
// };
|
||||
new_breakdown_block_mapped_list.appendChild(
|
||||
breakdown_block_mapped_list_item.cloneNode(true)
|
||||
);
|
||||
@ -325,22 +351,30 @@ async function refresh_elements(cross_codes) {
|
||||
|
||||
// Apply color coding to summary block
|
||||
summary_block.firstElementChild.classList.remove(
|
||||
"bg-highlight-both-translucent",
|
||||
"bg-highlight-checks-translucent",
|
||||
"bg-highlight-entrances-translucent"
|
||||
"from-highlight-both-translucent-light",
|
||||
"from-highlight-checks-translucent-light",
|
||||
"from-highlight-entrances-translucent-light",
|
||||
"to-highlight-both-translucent-dark",
|
||||
"to-highlight-checks-translucent-dark",
|
||||
"to-highlight-entrances-translucent-dark"
|
||||
);
|
||||
if (
|
||||
scene_checks_undiscovered > 0 &&
|
||||
scene_entrances_undiscovered > 0
|
||||
) {
|
||||
summary_block.firstElementChild.classList.add("bg-highlight-both-translucent");
|
||||
summary_block.firstElementChild.classList.add(
|
||||
"from-highlight-both-translucent-light",
|
||||
"to-highlight-both-translucent-dark"
|
||||
);
|
||||
} else if (scene_checks_undiscovered > 0) {
|
||||
summary_block.firstElementChild.classList.add(
|
||||
"bg-highlight-checks-translucent"
|
||||
"from-highlight-checks-translucent-light",
|
||||
"to-highlight-checks-translucent-dark"
|
||||
);
|
||||
} else if (scene_entrances_undiscovered > 0) {
|
||||
summary_block.firstElementChild.classList.add(
|
||||
"bg-highlight-entrances-translucent"
|
||||
"from-highlight-entrances-translucent-light",
|
||||
"to-highlight-entrances-translucent-dark"
|
||||
);
|
||||
}
|
||||
|
||||
@ -359,9 +393,21 @@ async function refresh_elements(cross_codes) {
|
||||
.querySelector(".codes-list")
|
||||
.replaceWith(new_cross_codes_block_list);
|
||||
|
||||
breakdown_block.id = `${
|
||||
breakdown_block.querySelector(".breakdown-block-title").textContent
|
||||
}-breakdown`;
|
||||
summary_block.id = `${
|
||||
summary_block.querySelector(".summary-title").textContent
|
||||
}-summary`;
|
||||
breakdown_block.classList.add("hidden");
|
||||
|
||||
// Append relevant elements to lists.
|
||||
if (current_open_breakdown == breakdown_block.id) {
|
||||
breakdown_block.classList.remove("hidden");
|
||||
}
|
||||
if (scene == current_scene_name) {
|
||||
summary_block.classList.add("hidden");
|
||||
breakdown_block.classList.remove("hidden");
|
||||
breakdown_block
|
||||
.querySelector(".codes-block")
|
||||
.classList.remove("hidden");
|
||||
@ -369,9 +415,12 @@ async function refresh_elements(cross_codes) {
|
||||
.getElementById("breakdown-current")
|
||||
.firstElementChild.replaceWith(breakdown_block.cloneNode(true));
|
||||
breakdown_block.classList.add("hidden");
|
||||
breakdown_block
|
||||
.querySelector(".codes-block")
|
||||
.classList.add("hidden");
|
||||
} else if (
|
||||
scene_checks_undiscovered <= 0 &&
|
||||
scene_entrances_undiscovered <= 0
|
||||
scene_entrances_total <= 0
|
||||
) {
|
||||
summary_block.classList.add("hidden");
|
||||
}
|
||||
@ -387,16 +436,30 @@ async function refresh_elements(cross_codes) {
|
||||
|
||||
// Replace with new data.
|
||||
document
|
||||
.getElementById("overview")
|
||||
.querySelector(".summary-list")
|
||||
.getElementById("summary-list")
|
||||
.replaceWith(new_summary_list.cloneNode(true));
|
||||
document
|
||||
.getElementById("overview")
|
||||
.querySelector(".breakdown-list")
|
||||
.getElementById("breakdown-list")
|
||||
.replaceWith(new_breakdown_list.cloneNode(true));
|
||||
document
|
||||
.getElementById("debug-block")
|
||||
.replaceWith(new_debug_block.cloneNode(true));
|
||||
|
||||
Object.keys(all_scenes).forEach((scene) => {
|
||||
document.getElementById(`${scene}-summary`).onclick = () => {
|
||||
show_breakdown(scene);
|
||||
};
|
||||
// Object.keys(all_scenes[scene].Entrances).forEach((entrance) => {
|
||||
// if (all_scenes[scene].Entrances[entrance].Door != "") {
|
||||
// let test = document.getElementById(`${entrance}-mapped`);
|
||||
// console.log(all_scenes[scene].Entrances[entrance].Scene);
|
||||
// document.getElementById(`${entrance}-mapped`).onclick = () => {
|
||||
// console.log("aaaaa");
|
||||
// // show_breakdown(all_scenes[scene].Entrances[entrance].Scene);
|
||||
// };
|
||||
// }
|
||||
// });
|
||||
});
|
||||
},
|
||||
(error) => {
|
||||
document.getElementById("status-block").classList.remove("hidden");
|
||||
|
@ -13,7 +13,7 @@
|
||||
{% tailwind_css %}
|
||||
<script src="{% static "tracker/assets/refresh.js" %}"></script>
|
||||
</head>
|
||||
<body class="bg-[#242424] font-nerd">
|
||||
<body class="font-nerd min-h-screen bg-gradient-to-br from-bluelight-background-dark to-bluelight-background">
|
||||
{% block content %}
|
||||
{% endblock content %}
|
||||
</body>
|
||||
|
@ -1,14 +1,13 @@
|
||||
<form action="{% url "set_address" %}"
|
||||
method="post"
|
||||
class="flex flex-row space-x-2">
|
||||
<div class="w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
|
||||
<div class="w-full rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
|
||||
hidden></div>
|
||||
{% csrf_token %}
|
||||
<label for="server-address-form"
|
||||
class="m-auto text-md justify-center align-top min-w-fit text-md text-nowrap">Backend</label>
|
||||
class="my-auto justify-center align-top min-w-fit text-md text-nowrap">Backend</label>
|
||||
{% for field in server_address_form %}{{ field }}{% endfor %}
|
||||
<input type="submit"
|
||||
value="Submit"
|
||||
class="p-2 m-auto text-sm rounded-xl border-2 border-bluelight-dark bg-bluelight-translucent"
|
||||
id="server-address-form" />
|
||||
<button type="submit"
|
||||
class="p-2 rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
|
||||
id="server-address-form">Submit</button>
|
||||
</form>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<div class="flex flex-col space-y-2 max-w-full {{ extra_classes }}">
|
||||
<div class="flex flex-col space-y-2 max-w-full {{ extra_classes }}"
|
||||
id="{{ scene }}-breakdown">
|
||||
<div class="px-2">
|
||||
<div class="flex text-xl breakdown-block-title">{{ scene_title }}</div>
|
||||
<div class="flex flex-col md:flex-row justify-center md:space-x-4">
|
||||
@ -32,7 +33,7 @@
|
||||
<ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm hidden">
|
||||
</ul>
|
||||
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
||||
{% if entrance_destination == "" %}
|
||||
{% if entrance_destination.Door == "" %}
|
||||
<ul class="py-0.5 min-w-max bg-bluelight-translucent rounded-md px-1 text-sm">
|
||||
❌ {{ entrance_origin }}
|
||||
</ul>
|
||||
@ -46,18 +47,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="max-h-64 overflow-scroll scrollbar scrollbar-thumb-trans-pride-cyan-translucent scrollbar-track-bluelight-translucent">
|
||||
<div class="flex flex-col space-y-2 mx-auto min-w-max breakdown-block-mapped-list">
|
||||
<ul class="py-0.5 bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm hidden">
|
||||
</ul>
|
||||
<div class="p-1 flex flex-col space-y-2 mx-auto min-w-max breakdown-block-mapped-list">
|
||||
<button type="button"
|
||||
class="py-0.5 text-start bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm hidden"
|
||||
onclick="banana(this)"></button>
|
||||
{% for entrance_origin, entrance_destination in scene_data.Entrances.items %}
|
||||
{% if entrance_destination %}
|
||||
<ul class="py-0.5 bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm">
|
||||
✔️ {{ entrance_origin }} -> {{ entrance_destination }}
|
||||
</ul>
|
||||
<button type="button"
|
||||
class="py-0.5 text-start bg-gradient-to-br from-bluelight-translucent-dark to-trans-pride-cyan-translucent rounded-md px-1 text-sm shadow-sm shadow-[#242424]"
|
||||
id="{{ entrance_origin }}-mapped"
|
||||
onclick="banana(this)"
|
||||
data-scene="{{ entrance_destination.Scene }}">
|
||||
✔️ {{ entrance_origin }} -> {{ entrance_destination.Door }}
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% include "tracker/codes/index.html" %}
|
||||
</div>
|
||||
<hr class="px-2 border-2 border-bluelight-translucent-dark rounded-xl" />
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<details class="py-4 px-2 mt-2 flex flex-col space-y-4 max-w-full text-holy-cross text-base [text-shadow:_1px_1px_4px_rgb(0_0_0_/_100%)] rounded-xl bg-gradient-to-br from-[#ffe28530] to-[#ffffff30] drop-shadow-[0px_0px_4px_rgba(255,255,255,1)] justify-start {% if current_scene.title != scene_title %}hidden{% endif %} codes-block">
|
||||
<details class="py-2 px-2 mt-2 flex flex-col space-y-4 max-w-full text-holy-cross text-base [text-shadow:_1px_1px_4px_rgb(0_0_0_/_100%)] rounded-xl bg-gradient-to-br from-[#ffe28530] to-[#ffffff30] drop-shadow-[0px_0px_4px_rgba(255,255,255,1)] justify-start {% if current_scene.title != scene_title %}hidden{% endif %} codes-block">
|
||||
<summary>Holy Cross Codes</summary>
|
||||
<hr class="border-2 border-holy-cross opacity-30 rounded-xl" />
|
||||
<div class="flex flex-col space-y-2 max-h-96 rounded-xl overflow-y-scroll">
|
||||
|
@ -1,19 +1,19 @@
|
||||
{% extends "index.html" %}
|
||||
{% load static %}
|
||||
{% block content %}
|
||||
<div class="container monospace py-4">
|
||||
<div class="p-2 border-4 rounded-xl text-[#eee] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)] bg-bluelight-translucent-dark border-bluelight-dark">
|
||||
<div class="container monospace py-4 space-y-2 text-[#eee] [text-shadow:_1px_1px_0_rgb(0_0_0_/_50%)]">
|
||||
<div class="p-2 rounded-lg bg-white bg-opacity-10 shadow-lg shadow-bluelight-background-dark">
|
||||
{% if debug != '' %}
|
||||
<div class="space-y-2 px-2">
|
||||
<div class="flex flex-col align-middle max-w-fit">
|
||||
<div class="flex flex-row align-middle max-w-fit h-12 space-x-2">
|
||||
<span class="h-8 max-w-8 my-auto align-middle">
|
||||
<span class="h-8 max-w-8 my-auto align-middle backdrop-blur">
|
||||
<img src="{% static 'tracker/images/neofox_flag_trans_256.png' %}"
|
||||
alt="A trans pride fox emoji."
|
||||
width="32"
|
||||
height="32" />
|
||||
</span>
|
||||
<span class="max-h-12 max-w-64 my-auto align-middle">
|
||||
<span class="max-h-12 max-w-64 my-auto align-middle invert drop-shadow-[1px_2px_2px_rgba(0,0,0,1)] ">
|
||||
<img src="{% static 'tracker/images/trunic_title.png' %}"
|
||||
alt="A trans pride fox emoji."
|
||||
width="365"
|
||||
@ -25,67 +25,68 @@
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<hr class="mt-2 border-2 border-bluelight-dark rounded-xl" />
|
||||
<div class="px-2 flex flex-col md:flex-row md:space-x-4 space-y-2 md:space-y-0 text-lg bg-bluelight-translucent-dark rounded-sm"
|
||||
<div class="px-2 flex flex-col md:flex-row md:space-x-4 space-y-2 md:space-y-0 text-lg bg-gradient-to-r from-bluelight-light to-bluelight-dark rounded-sm"
|
||||
id="overview-totals">
|
||||
<div class="flex basis-1/2 overview-checks">Checks: {{ totals.Checks.Undiscovered }}/{{ totals.Checks.Total }}</div>
|
||||
<div class="flex basis-1/2 overview-entrances">
|
||||
Entrances: {{ totals.Entrances.Undiscovered }}/{{ totals.Entrances.Total }}
|
||||
</div>
|
||||
</div>
|
||||
<details class="group flex flex-col rounded-lg bg-gradient-to-br from-bluelight-background-light to-bluelight-background">
|
||||
<summary class="py-2 px-4 justify-start">Summary</summary>
|
||||
<div class="px-2 rounded-xl">
|
||||
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" />
|
||||
<div class="py-2" id="summary-list">{% include "tracker/summary/list.html" %}</div>
|
||||
</div>
|
||||
</details>
|
||||
<hr class="mb-2 border-2 border-bluelight-dark rounded-xl" />
|
||||
|
||||
</div>
|
||||
<div class="flex flex-col space-y-2">
|
||||
{% include "tracker/status/index.html" %}
|
||||
<div class="p-flex flex-col max-w-full" id="overview">
|
||||
<div class="flex flex-col space-y-2">
|
||||
<div id="breakdown-current">
|
||||
{% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %}
|
||||
</div>
|
||||
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" />
|
||||
<details class="group flex flex-col rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark">
|
||||
<summary class="justify-start p-2 text-lg">Summary</summary>
|
||||
<div class="mb-2 px-2 space-y-2 rounded-xl">
|
||||
<hr class="border-2 border-bluelight-translucent-dark rounded-xl" />
|
||||
<div class="summary-list">{% include "tracker/summary/list.html" %}</div>
|
||||
</div>
|
||||
</details>
|
||||
<details class="group flex flex-col rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark">
|
||||
<summary class="justify-start p-2 text-lg">Breakdown</summary>
|
||||
<div class="px-2 flex flex-col space-y-2 breakdown-list">
|
||||
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
|
||||
{% for scene_title, scene_data in scenes.items %}
|
||||
{% if scene_title == current_scene.title %}
|
||||
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
|
||||
{% else %}
|
||||
{% include "tracker/breakdown/block.html" %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</details>
|
||||
<div class="p-flex flex-col max-w-full space-y-2">
|
||||
<div id="breakdown-list">
|
||||
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
|
||||
{% for scene_title, scene_data in scenes.items %}
|
||||
{% include "tracker/breakdown/block.html" with extra_classes="hidden" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="breakdown-current">
|
||||
{% include "tracker/breakdown/block.html" with scene_title=current_scene.title scene_data=current_scene.data %}
|
||||
</div>
|
||||
</div>
|
||||
<details class="group p-2 flex max-w-full rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark">
|
||||
<details class="py-2 px-4 flex flex-col space-y-2 max-w-full text-md rounded-lg bg-gradient-to-br from-bluelight-background-light to-bluelight-background">
|
||||
<summary class="justify-start">Settings</summary>
|
||||
<div class="p-2 flex flex-col space-y-2">
|
||||
{% include "tracker/settings/index.html" %}
|
||||
{% include "tracker/address/index.html" %}
|
||||
</div>
|
||||
</details>
|
||||
<details class="group p-2 flex max-w-full rounded-xl border-4 bg-bluelight-translucent-light border-bluelight-translucent-dark">
|
||||
<summary class="justify-start">Tracker Debug</summary>
|
||||
<div class="py-2 flex flex-col space-y-2" id="debug-block">
|
||||
<ul class="p-2 rounded-xl bg-bluelight-translucent hidden">
|
||||
</ul>
|
||||
{% for name, value in debug.items %}
|
||||
<ul class="p-2 rounded-xl bg-bluelight-translucent">
|
||||
{{ name }}: {{ value }}
|
||||
</ul>
|
||||
{% endfor %}
|
||||
{% include "tracker/settings/index.html" %}
|
||||
{% include "tracker/address/index.html" %}
|
||||
<div class="p-2 flex">
|
||||
<button onclick="notices_ur_debug()"
|
||||
class="p-2 m-auto rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
|
||||
type="button"
|
||||
id="show-debug">Sh-OwO Debug</button>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="no_data" />{% endif %}</div>
|
||||
<div class="p-2 flex flex-col space-y-2 max-w-full rounded-lg bg-white bg-opacity-10 shadow-lg shadow-bluelight-background-dark hidden"
|
||||
id="debug-block">
|
||||
<div class="px-2 text-lg">Tracker Debug</div>
|
||||
<div class="grid grid-flow-row md:grid-cols-2 xl:grid-cols-3 gap-2 space-y-2 max-w-full break-words"
|
||||
id="debug-block">
|
||||
<div class="max-h-full hidden">
|
||||
<ul class="px-2">
|
||||
</ul>
|
||||
<hr class="mt-2 border-2 border-bluelight-dark rounded-xl" />
|
||||
</div>
|
||||
{% for name, value in debug.items %}
|
||||
<div class="max-h-full align-bottom flex flex-col-reverse">
|
||||
<hr class="mt-1 border-2 border-[#24242480] rounded-xl" />
|
||||
<ul class="px-2">
|
||||
{{ name }}: {{ value }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
@ -1,14 +1,13 @@
|
||||
<form action="{% url "set_settings" %}"
|
||||
method="post"
|
||||
class="flex flex-row space-x-2">
|
||||
<div class="w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10"
|
||||
hidden></div>
|
||||
{% csrf_token %}
|
||||
<label for="backend-filepath-form"
|
||||
class="m-auto text-md justify-center align-top min-w-fit text-md text-nowrap">AppData Path</label>
|
||||
{% for field in backend_filepath_form %}{{ field }}{% endfor %}
|
||||
<input type="submit"
|
||||
value="Submit"
|
||||
class="p-2 m-auto text-sm rounded-xl border-2 border-bluelight-dark bg-bluelight-translucent"
|
||||
id="backend-filepath-form" />
|
||||
<div class="w-full rounded-lg border-none shadow-[inset_0_35px_60px_-15px_rgba(0,0,0,0.3)] bg-white bg-opacity-10"
|
||||
hidden></div>
|
||||
{% csrf_token %}
|
||||
<label for="backend-filepath-form"
|
||||
class="my-auto justify-center align-top min-w-fit text-md text-nowrap">AppData Path</label>
|
||||
{% for field in backend_filepath_form %}{{ field }}{% endfor %}
|
||||
<button type="submit"
|
||||
class="p-2 rounded-md bg-white bg-opacity-10 shadow-sm shadow-[#242424]"
|
||||
id="backend-filepath-form">Submit</button>
|
||||
</form>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<div class="rounded-xl border-4 border-bluelight {{ is_hidden }}">
|
||||
<div class="p-2 min-h-full flex flex-col rounded-lg {{ extra_classes }}">
|
||||
<button type="button"
|
||||
class="rounded-xl {{ is_hidden }}"
|
||||
id="{{ scene }}-summary">
|
||||
<div class="p-2 *:mr-auto *:justify-start *:text-left min-h-full flex flex-col rounded-lg bg-gradient-to-tr shadow-sm shadow-[#242424] {{ extra_classes }}">
|
||||
<div class="summary-title">{{ scene }}:</div>
|
||||
<div class="summary-checks">
|
||||
Checks: {{ scene_data.Totals.Checks.Undiscovered }}/{{ scene_data.Totals.Checks.Total }}
|
||||
@ -8,4 +10,4 @@
|
||||
Entrances: {{ scene_data.Totals.Entrances.Undiscovered }}/{{ scene_data.Totals.Entrances.Total }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
|
@ -1,15 +1,15 @@
|
||||
<div class="grid gap-2 md:grid-cols-3 xl:grid-cols-5 grid-flow-row max-h-96 rounded-xl overflow-y-scroll scrollbar scrollbar-thumb-bluelight-dark scrollbar-track-bluelight">
|
||||
<div class="p-1 grid gap-2 md:grid-cols-3 xl:grid-cols-5 grid-flow-row max-h-96 rounded-xl overflow-y-scroll scrollbar scrollbar-thumb-bluelight-dark scrollbar-track-bluelight">
|
||||
{% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %}
|
||||
{% for scene, scene_data in scenes.items %}
|
||||
{% if scene == current_scene.title %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="" is_hidden="hidden" %}
|
||||
{% elif scene != "Entrances" and scene != "Checks" %}
|
||||
{% if scene_data.Totals.Checks.Undiscovered > 0 and scene_data.Totals.Entrances.Undiscovered > 0 %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-both-translucent" is_hidden="" %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="from-highlight-both-translucent-light to-highlight-both-translucent-dark" is_hidden="" %}
|
||||
{% elif scene_data.Totals.Checks.Undiscovered > 0 %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-checks-translucent" is_hidden="" %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="from-highlight-checks-translucent-light to-highlight-checks-translucent-dark" is_hidden="" %}
|
||||
{% elif scene_data.Totals.Entrances.Undiscovered > 0 %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="bg-highlight-entrances-translucent" is_hidden="" %}
|
||||
{% include "tracker/summary/block.html" with extra_classes="from-highlight-entrances-translucent-light to-highlight-entrances-translucent-dark" is_hidden="" %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
@ -39,7 +39,8 @@ def index(request):
|
||||
|
||||
try:
|
||||
request_data = requests.get(
|
||||
f'{server_address}spoiler', timeout=5, verify=True).text
|
||||
f'{listen_address}spoiler', timeout=5, verify=True).text
|
||||
logger.info(f'{request_data}')
|
||||
except:
|
||||
with open('empty_spoiler.json', 'r') as t:
|
||||
try:
|
||||
|
@ -55,17 +55,19 @@ module.exports = {
|
||||
},
|
||||
colors: {
|
||||
bluelight: {
|
||||
light: "#378ec880",
|
||||
DEFAULT: "#317eb1",
|
||||
dark: "#006bb380",
|
||||
translucent: {
|
||||
light: "#317eb140",
|
||||
DEFAULT: "#317eb180",
|
||||
dark: "#2facff40",
|
||||
},
|
||||
dark: "#2facff80",
|
||||
},
|
||||
greenlight: {
|
||||
DEFAULT: "#339649",
|
||||
translucent: "#33964930",
|
||||
background: {
|
||||
light: "#317eb1",
|
||||
DEFAULT: "#26638c",
|
||||
dark: "#1b4764",
|
||||
},
|
||||
},
|
||||
"trans-pride": {
|
||||
cyan: {
|
||||
@ -81,23 +83,32 @@ module.exports = {
|
||||
translucent: "#ff8cda69",
|
||||
},
|
||||
},
|
||||
"highlight": {
|
||||
highlight: {
|
||||
checks: {
|
||||
DEFAULT: "#A431B1",
|
||||
translucent: "#A431B188",
|
||||
translucent: {
|
||||
light: "#A431B1E8",
|
||||
dark: "#A431B1A0",
|
||||
},
|
||||
},
|
||||
entrances: {
|
||||
DEFAULT: "#B16431",
|
||||
translucent: "#B1643188",
|
||||
translucent: {
|
||||
light: "#B16431E8",
|
||||
dark: "#B16431B0",
|
||||
},
|
||||
},
|
||||
both: {
|
||||
DEFAULT: "#3EB131",
|
||||
translucent: "#3EB13188",
|
||||
translucent: {
|
||||
light: "#3EB131E8",
|
||||
dark: "#3EB13190",
|
||||
},
|
||||
},
|
||||
},
|
||||
"holy-cross": {
|
||||
DEFAULT: "fffae0"
|
||||
}
|
||||
DEFAULT: "fffae0",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -110,6 +121,6 @@ module.exports = {
|
||||
require("@tailwindcss/forms"),
|
||||
require("@tailwindcss/typography"),
|
||||
require("@tailwindcss/aspect-ratio"),
|
||||
require("tailwind-scrollbar")
|
||||
require("tailwind-scrollbar"),
|
||||
],
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user