Skip to content

Commit

Permalink
Small tweak to Bazaar ui based on cobalt's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Sep 16, 2024
1 parent f013d55 commit c37c676
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"url": "https://github.com/serprex/openEtG"
},
"devDependencies": {
"@babel/plugin-syntax-import-attributes": "^7.24.7",
"@babel/plugin-syntax-import-attributes": "^7.25.6",
"@pencil.js/spritesheet": "^1.5.1",
"babel-loader": "^9.1.3",
"babel-preset-solid": "^1.8.19",
"babel-loader": "^9.2.1",
"babel-preset-solid": "^1.8.22",
"copy-webpack-plugin": "^12.0.2",
"html-webpack-plugin": "^5.6.0",
"prettier": "^3.3.3",
"solid-js": "^1.8.19",
"webpack": "^5.93.0",
"solid-js": "^1.8.22",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/rs/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fxhash = "0.2"
getrandom = "0.2"
http-body-util = "0.1.0"
hyper = { version = "1", features = ["http1", "server"] }
hyper-tungstenite = "0.14"
hyper-tungstenite = "0.15"
hyper-util = { version = "0.1", default-features = false }
tokio-rustls = { version = "0.26", default-features = false, features = ["ring"] }
postgres-types = { version = "0.2", features = ["derive"] }
Expand Down
26 changes: 14 additions & 12 deletions src/views/Bazaar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function Order(p) {
return (
<div onClick={_e => p.onClick(Math.abs(p.order.p), p.order.q)}>
{p.order.q} @ {Math.abs(p.order.p)}
<span class="ico gold" />
</div>
);
}
Expand All @@ -37,6 +38,7 @@ function CardOrders(p) {
{order => (
<div style={order.p > 0 ? 'color:#4f8' : 'color:#f84'}>
{order.q} @ {Math.abs(order.p)}
<span class="ico gold" />
</div>
)}
</For>
Expand Down Expand Up @@ -263,16 +265,16 @@ export default function Bazaar() {
}}
style="position:absolute;left:100px;top:8px"
/>
<input
placeholder="Sell Price"
value={sell() || ''}
onInput={e => setSell(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:200px;top:8px"
/>
<input
placeholder="Sell Quantity"
value={sellq() || ''}
onInput={e => setSellq(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:200px;top:8px"
/>
<input
placeholder="Sell Price"
value={sell() || ''}
onInput={e => setSell(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:360px;top:8px"
/>
{buy() > sellValue(bcard()) && (
Expand All @@ -289,16 +291,16 @@ export default function Bazaar() {
style="position:absolute;left:100px;top:40px"
/>
)}
<input
placeholder="Buy Price"
value={buy() || ''}
onInput={e => setBuy(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:200px;top:40px"
/>
<input
placeholder="Buy Quantity"
value={buyq() || ''}
onInput={e => setBuyq(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:200px;top:40px"
/>
<input
placeholder="Buy Price"
value={buy() || ''}
onInput={e => setBuy(Math.min(e.target.value | 0, 999))}
style="position:absolute;left:360px;top:40px"
/>
<div
Expand Down

0 comments on commit c37c676

Please sign in to comment.