From c1607ac5c55577caf25c440d23996a012b1dd871 Mon Sep 17 00:00:00 2001 From: Ethan O'Brien Date: Fri, 31 May 2024 14:42:48 -0500 Subject: [PATCH] Add migration code to webui --- webui/src/home/Home.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/webui/src/home/Home.jsx b/webui/src/home/Home.jsx index 633fee7..da3153d 100644 --- a/webui/src/home/Home.jsx +++ b/webui/src/home/Home.jsx @@ -3,6 +3,21 @@ import './Home.css' import Request from '../Request.jsx' let bonusItems = []; +function getMigrationID(uid) { + return uid.toString() + .replaceAll('1', "A") + .replaceAll('2', "G") + .replaceAll('3', "W") + .replaceAll('4', "Q") + .replaceAll('5', "Y") + .replaceAll('6', "6") + .replaceAll('7', "I") + .replaceAll('8', "P") + .replaceAll('9', "U") + .replaceAll('0', "M") + + "7"; +} + function Bonus() { const [inputValue, setInputValue] = useState(''); const error = useState(""); @@ -144,6 +159,7 @@ function Home() { userdata(

User id: { user.user.id }

+

Migration id: { getMigrationID(user.user.id) }

Rank: { user.user.rank } ({ user.user.exp } exp)

Last Login: { (new Date(user.user.last_login_time * 1000)).toString() }