From 0e78dea5603475c0f5418d8626c665608c4d0561 Mon Sep 17 00:00:00 2001 From: HF Date: Sat, 6 Aug 2022 05:59:33 +0200 Subject: [PATCH] fix minor issues --- src/components/Admintools.jsx | 21 ++- src/components/Alert.jsx | 26 +-- src/components/BanInfo.jsx | 88 +++++++--- src/components/GetIID.jsx | 59 +++++++ src/components/LanguageSelect.jsx | 1 + src/components/ModIIDtools.jsx | 13 +- src/components/ModWatchtools.jsx | 18 ++- src/components/windows/Help.jsx | 9 +- src/core/adminfunctions.js | 58 +++---- src/core/isAllowed.js | 36 ++--- src/core/utils.js | 16 +- src/data/sql/Ban.js | 71 +++++++-- src/data/sql/IPInfo.js | 23 ++- src/routes/api/auth/index.js | 8 - src/routes/api/baninfo.js | 45 ++++++ src/routes/api/getiid.js | 32 ++++ src/routes/api/index.js | 25 ++- src/routes/api/modtools.js | 257 ++++++++++++++++-------------- src/socket/SocketServer.js | 27 ++-- src/store/actions/README.md | 1 - src/store/actions/fetch.js | 6 + src/store/actions/index.js | 10 +- src/store/middleware/audio.js | 5 +- src/ui/placePixel.js | 35 ++-- src/utils/cron.js | 4 +- 25 files changed, 584 insertions(+), 310 deletions(-) create mode 100644 src/components/GetIID.jsx create mode 100644 src/routes/api/baninfo.js create mode 100644 src/routes/api/getiid.js diff --git a/src/components/Admintools.jsx b/src/components/Admintools.jsx index a9cd052..6039cb0 100644 --- a/src/components/Admintools.jsx +++ b/src/components/Admintools.jsx @@ -7,12 +7,12 @@ import { t } from 'ttag'; async function submitIPAction( action, + vallist, callback, ) { const data = new FormData(); - const iplist = document.getElementById('iparea').value; - data.append('ip', iplist); data.append('ipaction', action); + data.append('ip', vallist); const resp = await fetch('./api/modtools', { credentials: 'include', method: 'POST', @@ -72,8 +72,9 @@ async function submitMakeMod( function Admintools() { - const [iPAction, selectIPAction] = useState('ban'); + const [iPAction, selectIPAction] = useState('iidtoip'); const [modName, selectModName] = useState(''); + const [txtval, setTxtval] = useState(''); const [resp, setResp] = useState(null); const [modlist, setModList] = useState([]); const [submitting, setSubmitting] = useState(false); @@ -114,9 +115,10 @@ function Admintools() { selectIPAction(sel.options[sel.selectedIndex].value); }} > - {['iidtoip'] + {['iidtoip', 'iptoiid'] .map((opt) => (