Commit Graph

43 Commits

Author SHA1 Message Date
Sinclair Chen
546b0231e7
Die Daisy (#1042)
* un-daisy labels

* un-daisy inputs

* un-daisy input groups

* fixup input

* un-daisy selects

* un-daisy slider

* Uninstall daisy. Migrate colors

* un-daisy tables

* fix input error styling

* lint
2022-10-13 11:23:42 -07:00
Sinclair Chen
d9f57b7daa
Remove all daisy buttons (#1036)
* Tweak limit order UI and fix button

* Style all follow/unfollow buttons blue

also get rid of highlight-blue button

* remove all other uses of 'btn'

* Style group follow button like user follow

* lint and format
2022-10-12 12:27:17 -07:00
Sinclair Chen
8d06e4b4d2
refactor text input into one component (#1016)
* Add responsive text input component

* Add styled expanding textarea component
2022-10-09 19:37:24 -07:00
Sinclair Chen
59b128dbe7
Redo add funds modal without daisy and actually use it (#963) 2022-10-03 10:15:58 -07:00
Sinclair Chen
0ffd6c129a
Make small embeds into cards (#976)
* Fix embed style (adjust input, strikethrough)

* Turn small embeds into contract cards

* Use media query instead of conditional render

* Open embed card clicks in new tab
2022-10-02 11:55:47 -07:00
James Grugett
759685258a Turn off autofocus for amount input. (Fixes FR answer bug; IMO better UX) 2022-10-01 13:48:13 -05:00
Marshall Polaris
dc0b6dc6a6
Don't render stuff whenever window size changes (#978) 2022-09-30 18:01:48 -07:00
Sinclair Chen
4cc985634a Put slider z-index under bottom menu 2022-09-29 07:04:11 -07:00
ingawei
e17a59ae23
Inga/mobilebetting (#911)
* mobile binary betting
2022-09-26 19:28:54 -05:00
Marshall Polaris
be2c60d3f3
Fix some rendering issues on contract page (#933)
* Memoize calculating sale amount on your bets list

* Don't re-render more than necessary with `useIsMobile` hook

* Use `useIsMobile` hook in `AmountInput`
2022-09-25 16:43:53 -07:00
mantikoros
eac56b1f4f slider: smarter step increments; disable clicking on track 2022-09-09 00:02:14 -05:00
mantikoros
c59de1be2e bet slider: decrease step size 2022-09-06 11:53:09 -05:00
mantikoros
8952b100ad add answer panel mobile formatting, slider 2022-09-05 17:59:19 -05:00
mantikoros
2d724bf2c8 make slider black 2022-09-05 17:44:21 -05:00
mantikoros
374c25ffb3 Auto-prettification 2022-09-05 22:40:48 +00:00
mantikoros
96cf1a5f7f mobile slider styling 2022-09-05 17:39:59 -05:00
mantikoros
ae40999700 mobile bet slider 2022-09-05 17:11:32 -05:00
Ian Philips
b6e636cbc0 Small ux tweaks for signed out market page 2022-08-24 16:41:46 -06:00
Sinclair Chen
4f3202f90b
Simple bet interface in embeds (#775)
* rename BetRow -> BetButton

* Replace bet modal in embed with inline betting

- Also simplifies graph height calculation

* Move bet row above graph, in "mini modal"

* Show signup button if not signed up

* Show probability change

* Show error after modal

- Show balance if insufficient funds
- Clear error from amount input if amount deleted entirely

* Fix error state conditions

- Reset amount input on success
- Reset success state on user input

* Make input smaller (80px)
2022-08-19 10:07:48 -07:00
James Grugett
3b953a7c21
Range limit orders (#655)
* Prototype range limit order UI

* Conditionally show YES or NO max payout

* Range bet executes both bets immediately.

* Validate lowLimitProb < highLimitProb

* Show error if low limit is higher than high limit

* Update range order UI

* Revert "Validate lowLimitProb < highLimitProb"

This reverts commit c261fc2743.

* Revert "Range bet executes both bets immediately."

This reverts commit 30b95d75d9.

* Buy panel only non-limit orders

* Bet choice => outcome

* More iterating on range UI

* betChoice => outcome

* Lighten placeholder text
2022-07-22 00:57:56 -05:00
Marshall Polaris
420ea9e90e
Add more linting to web package (#343)
* Import React a lot

* Fix misc. linting concerns

* Turn on many recommended lints for `web` package
2022-05-26 14:41:24 -07:00
Austin Chen
a3c1cd2cc1 Unhardcode M$ in more locations 2022-05-17 08:17:22 -04:00
Marshall Polaris
aafd2a226f
Clean up some stuff with SellPanel and AmountInput (#232)
* Hoist SellAmountInput logic into SellPanel

* Ditch now-unnecessary SellAmountInput

* Clean up sale proceeds markup

* Clean unused imports

* BuyPanel doesn't need userBets
2022-05-16 20:27:37 -07:00
Marshall Polaris
acc9c84e2e
More absolute imports (#156)
* Configure functions module to allow absolute imports

* Convert common imports in functions to be absolute

* Convert common imports in web to be absolute

* Convert lib imports in web to be absolute

* Convert hooks imports in web to be absolute

* Convert components imports in web to be absolute
2022-05-09 09:04:36 -04:00
mantikoros
95b67c05e2 another sell shares rounding bug 2022-05-04 11:47:45 -04:00
Sinclair Chen
100821e34c
Ask user to buy more mana when insufficient funds (#124) 2022-05-03 13:36:54 -07:00
James Grugett
6232284e92 Larger font on amount input 2022-05-02 12:15:00 -04:00
James Grugett
75b39cbf6f Remove loans: no new loans 2022-04-13 12:52:12 -05:00
mantikoros
20052b61ec AmountInput: filter non-numeric, show numeric keyboard on ios 2022-04-06 22:48:06 -05:00
James Grugett
3eb0bb1711 Throw error if sell conditions don't hold 2022-03-29 21:30:04 -05:00
James Grugett
ed5f69db7a
Sell shares panel (#69)
* Split BuyAmountInput out of AmountInput

* Buy and sell tabs. Compute some sell info

* In progress

* BuyPanel & SellPanel with banner above that shows current shares and toggle button

* Remove "Remaining balance"

* Bring back 'Place a trade'. Tweaks

* Sell shares cloud function.

* Sell all shares by default. Switch back to buy if sell all your shares.

* Cache your shares in local storage so sell banner doesn't flicker.

* Compute sale value of shares with binary search to keep k constant.

* Update bets table to show BUY or SELL

* Fixes from Stephen's review

* Don't allow selling more than max shares in cloud function

* Use modal for sell shares on desktop.

* Handle floating point precision in max shares you can sell.
2022-03-29 14:56:56 -05:00
James Grugett
405604adef Fix insufficient balance error to use bet amount net loan 2022-03-02 14:02:44 -08:00
James Grugett
6abf235505 Show correct remaning balance for ante input when creating market 2022-03-02 13:50:19 -08:00
James Grugett
985cdd2537
🏦 Per-market loans! (#57)
* Loan backend: Add loanAmount field to Bet, manage loans up to max loan amount per market -- buy, sell, and resolve.

* Loan frontend: show your loan amount in bet panel, answer bet panel

* Resolve emails include full payout not subtracting loan

* Exclude sold bets from current loan amount

* Handle bets table for loans. Sell dialog explains how you will repay your loan.

* Floor remaining balance

* Fix layout of create answer bet info

* Clean up Sell popup UI

* Fix bug where listen query was not updating data.

* Reword loan copy

* Adjust bet panel width

* Fix loan calc on front end

* Add comment for includeMetadataChanges.

Co-authored-by: Austin Chen <akrolsmir@gmail.com>
2022-03-01 21:31:48 -06:00
Austin Chen
87a33933e4 Revert "Stop flooring inputs into formatMoney"
This reverts commit 2f7ab18429.
2022-02-16 19:14:12 -08:00
Austin Chen
2f7ab18429 Stop flooring inputs into formatMoney 2022-02-16 18:48:59 -08:00
Austin Chen
7338bdd47a
Automatically sort Tailwind classes with Prettier (#45)
* Add Prettier Tailwind plugin

* Autoformat Tailwind classes with Prettier
2022-02-11 10:40:22 -08:00
Austin Chen
6234b12f89 Bring up numeric keyboards on mobile 2022-01-31 17:05:01 -08:00
mantikoros
f06ca8305c
Resolve prob (#41)
* rename MKT to PROB; show resolved probability; move format utilities to common

* ProbabilitySelector

* resolve to PROB

* prob and mkt labels
2022-01-30 15:51:30 -06:00
Austin Chen
e4377ee3a3
Allow betting directly from the activity feed (#36)
* Show a popup for betting on the Activity feed

* Replace the popup with a YES/NO selector

* Autofocus the bet amount

* Hide BetRow when not appropriate

* Make bet modal larger on desktop

* Default to YES if no bet choice has been made yet
2022-01-26 14:08:03 -06:00
mantikoros
3fa2926559 create page design; require minimum ante; lower phantom ante amount; createContract checks 2022-01-14 17:39:17 -06:00
jahooma
ca38640b89 Tweak positioning of add funds button, no green initial probability 2022-01-11 23:29:50 -06:00
jahooma
7fbecbc102 Extract bet amount input to component. 2022-01-10 21:41:42 -06:00