Skip to content

Commit

Permalink
UI layout: rewardcode and foename decoupled (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
elysiumplain authored and serprex committed Feb 16, 2024
1 parent de774d4 commit ff94dcd
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/views/MainMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default function MainMenu(props) {
const [ocard, setocard] = createSignal(props.nymph);
const [settings, setSettings] = createSignal(false);
const [changepass, setChangepass] = createSignal(false);
let newpass, newpass2;
let newpass, newpass2, rewardcode;

const [tipNumber, setTipNumber] = createSignal(
(Math.random() * tipjar.length) | 0,
Expand Down Expand Up @@ -126,7 +126,7 @@ export default function MainMenu(props) {
store.doNav(import('./Reward.jsx'), {
type: data.type,
amount: data.num,
code: foename(),
code: rewardcode.value,
});
},
codegold: data => {
Expand Down Expand Up @@ -526,18 +526,14 @@ export default function MainMenu(props) {
</div>
<div style="display:flex;flex-direction:row;flex-wrap:wrap;align-content:center;justify-content:center;align-items:center;padding-bottom:5px">
<div class="maintitle">Reward</div>
<div style="display:flex;flex-direction:row;flex-wrap:wrap;justify-content:center;align-items:center;align-content:center">
<input
placeholder="Code"
value={rx.opts.foename ?? ''}
onInput={e => store.setOptTemp('foename', e.target.value)}
/>
<div style="display:flex;justify-content:space-evenly;width:100%">
<input placeholder="Code" style="width:80px" ref={rewardcode} />
<input
type="button"
value="Redeem"
onClick={() => {
sock.userEmit('codesubmit', {
code: foename(),
code: rewardcode.value,
});
}}
onMouseOver={[setTip, 'Redeem a reward code']}
Expand Down

0 comments on commit ff94dcd

Please sign in to comment.