Skip to content

Commit

Permalink
Fix ocard desync bug, fix trim fix
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Feb 4, 2024
1 parent 92b0d10 commit 6031f12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/views/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ export default function Login() {
let password;

const loginClick = auth => {
if (rx.opts.username) {
store.setOpt('username', rx.opts.username);
const data = { x: 'login', u: rx.opts.username };
const username = rx.opts.username && rx.opts.username.trim();
if (username) {
store.setOpt('username', username);
const data = { x: 'login', u: username };
if (auth) data.a = auth;
else data.p = password.value;
emit(data);
Expand Down Expand Up @@ -64,7 +65,7 @@ export default function Login() {
tabIndex="1"
onKeyDown={maybeLogin}
value={rx.opts.username ?? ''}
onInput={e => store.setOpt('username', e.target.value.trim())}
onInput={e => store.setOpt('username', e.target.value)}
style="position:absolute;left:270px;top:350px"
/>
<input
Expand Down
1 change: 1 addition & 0 deletions src/views/MainMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default function MainMenu(props) {
oracle: data.day,
ostreakday: 0,
ostreakday2: data.day,
ocard: data.c,
};
if (data.bound) {
update.accountbound = addcard(rx.user.accountbound, data.c);
Expand Down

0 comments on commit 6031f12

Please sign in to comment.