From 7ae424b60ba02c6ede9d6830ce5cda1085587332 Mon Sep 17 00:00:00 2001 From: Index Date: Tue, 1 Oct 2024 18:44:31 -0500 Subject: [PATCH] minor: disable search filters for retro items avatar sandbox --- js/account/avatar-sandbox.js | 13 +++++++++++++ resources/avatar-sandbox.html | 8 ++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/js/account/avatar-sandbox.js b/js/account/avatar-sandbox.js index bb1d4b9..a4db605 100644 --- a/js/account/avatar-sandbox.js +++ b/js/account/avatar-sandbox.js @@ -581,6 +581,19 @@ async function LoadUser(id) { async function LoadItems() { document.getElementById('inventory').innerHTML = '' + const SearchFilters = document.getElementsByClassName('retro-items-disable') + if (TabSelected != 'retro') { + for (let filter of SearchFilters) { + filter.disabled = false + filter.classList.remove('disabled') + } + } else { + for (let filter of SearchFilters) { + filter.disabled = true + filter.classList.add('disabled') + } + } + let Items; if (['retro', 'outfit'].indexOf(TabSelected) === -1) { Items = (await (await fetch('https://api.polytoria.com/v1/store?limit=12&order=' + Order + '&sort=' + Sort + '&showOffsale=' + ShowOffsale + '&types[]='+ TabSelected +'&search=' + Search + '&page=' + Page)).json()) diff --git a/resources/avatar-sandbox.html b/resources/avatar-sandbox.html index 220550d..7f71501 100755 --- a/resources/avatar-sandbox.html +++ b/resources/avatar-sandbox.html @@ -332,13 +332,13 @@
- - @@ -346,8 +346,8 @@
- - + +