From d022243e5a6f5cf2788b8127f777785863f90ede Mon Sep 17 00:00:00 2001 From: Ada Werefox Date: Sun, 10 Mar 2024 01:36:19 -0600 Subject: [PATCH] Reworking the user interface. --- tunictracker/tracker/forms.py | 4 +- .../tracker/static/tracker/assets/refresh.js | 24 ++--- .../static/tracker/data/holy_cross_codes.json | 10 +- .../templates/tracker/address/index.html | 4 +- .../templates/tracker/breakdown/block.html | 26 +++--- .../templates/tracker/codes/block.html | 20 +--- .../templates/tracker/codes/index.html | 10 +- .../tracker/templates/tracker/index.html | 92 ++++++++++--------- .../templates/tracker/settings/index.html | 4 +- .../templates/tracker/status/index.html | 2 +- .../templates/tracker/summary/block.html | 2 +- .../templates/tracker/summary/list.html | 2 +- tunictracker/tracker/views.py | 5 +- 13 files changed, 98 insertions(+), 107 deletions(-) diff --git a/tunictracker/tracker/forms.py b/tunictracker/tracker/forms.py index 87f5cc8..b2870f4 100644 --- a/tunictracker/tracker/forms.py +++ b/tunictracker/tracker/forms.py @@ -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-md border-2 border-bluelight-dark bg-[#242424]/10" + server_address_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" class BackendFilepathForm(forms.Form): backend_filepath_form = forms.CharField() - backend_filepath_form.widget.attrs["class"] = "w-full text-sm rounded-md border-2 border-bluelight-dark bg-[#242424]/10" + backend_filepath_form.widget.attrs["class"] = "w-full text-sm rounded-xl border-2 border-bluelight-dark bg-[#242424]/10" diff --git a/tunictracker/tracker/static/tracker/assets/refresh.js b/tunictracker/tracker/static/tracker/assets/refresh.js index f46b7bc..21b9c8b 100644 --- a/tunictracker/tracker/static/tracker/assets/refresh.js +++ b/tunictracker/tracker/static/tracker/assets/refresh.js @@ -269,10 +269,10 @@ async function refresh_elements(cross_codes) { cross_codes_block_list_item.querySelector( ".codes-list-item-code" ).textContent = default_cross_codes[code] - .replace(/U/g, "⬆️ ") - .replace(/R/g, "➡️ ") - .replace(/D/g, "⬇️ ") - .replace(/L/g, "⬅️ "); + .replace(/U/g, "⬆️") + .replace(/R/g, "➡️") + .replace(/D/g, "⬇️") + .replace(/L/g, "⬅️"); new_cross_codes_block_list.appendChild( cross_codes_block_list_item.cloneNode(true) ); @@ -284,10 +284,10 @@ async function refresh_elements(cross_codes) { cross_codes_block_list_item.querySelector( ".codes-list-item-code" ).textContent = global_cross_codes[code] - .replace(/U/g, "⬆️ ") - .replace(/R/g, "➡️ ") - .replace(/D/g, "⬇️ ") - .replace(/L/g, "⬅️ "); + .replace(/U/g, "⬆️") + .replace(/R/g, "➡️") + .replace(/D/g, "⬇️") + .replace(/L/g, "⬅️"); if (cross_codes_entered.Global[code]) { cross_codes_block_list_item.classList.add("hidden"); } else { @@ -305,10 +305,10 @@ async function refresh_elements(cross_codes) { cross_codes_block_list_item.querySelector( ".codes-list-item-code" ).textContent = cross_codes[scene][code] - .replace(/U/g, "⬆️ ") - .replace(/R/g, "➡️ ") - .replace(/D/g, "⬇️ ") - .replace(/L/g, "⬅️ "); + .replace(/U/g, "⬆️") + .replace(/R/g, "➡️") + .replace(/D/g, "⬇️") + .replace(/L/g, "⬅️"); if (cross_codes_entered[scene][code]) { cross_codes_block_list_item.classList.add("hidden"); } else { diff --git a/tunictracker/tracker/static/tracker/data/holy_cross_codes.json b/tunictracker/tracker/static/tracker/data/holy_cross_codes.json index 7b8c64c..99b6fcb 100644 --- a/tunictracker/tracker/static/tracker/data/holy_cross_codes.json +++ b/tunictracker/tracker/static/tracker/data/holy_cross_codes.json @@ -1,7 +1,7 @@ { "Default": { "Speedrunner Code": "RULDDRULU", - "Seeking Spell": "ULURDL", + "Seeking Spell": "ULURDR", "Healing Spell": "DRDLURU" }, "Cathedral": { @@ -46,10 +46,10 @@ "Back To Work Treasure": "RDLULLDRRDD", "Compass Fairy": "LRDUUDRLURDLUDRL", "Fire Wand Obelisk Page": "URDLDRUL", - "Fountain Cross Door": "URDLDLU", + "Fountain Cross Door": "DRULUR", "Fountain Fairy": "DLLDURD", - "Lower Flower Fairy": "URDLDLDLU", - "Moss Fairy": "URULDRURULDLDRULURDRD", + "Lower Flower Fairy": "URDLDLDLDLU", + "Moss Fairy": "URULDLULURDRDRULURDRD", "Power Up Treasure": "UDRUDLUDLRDLRU", "Sacred Geometry Treasure": "DLLUURRLDRUD", "Southeast Cross Door": "DRULUR", @@ -73,7 +73,7 @@ }, "West Garden": { "Sword Door": "DRULUR", - "Tiles Fairy": "URULURULURDRULRLURULURULU", + "Tiles Fairy": "URULURULURDRULDLURULURULU", "Tree Fairy": "LDRLUD" } } diff --git a/tunictracker/tracker/templates/tracker/address/index.html b/tunictracker/tracker/templates/tracker/address/index.html index 3295702..f5382e7 100644 --- a/tunictracker/tracker/templates/tracker/address/index.html +++ b/tunictracker/tracker/templates/tracker/address/index.html @@ -1,7 +1,7 @@
- {% csrf_token %}