robosats/frontend
João Leal 8a04474934
Add switch Amount Exact/Range (#577)
Created new state var amountRangeEnabled to control the new switch when advanced options is enabled.

Created memo var makerHasAmountRange to control boolean state of amount exact/range switch using maker.advancedOptions and amountRangeEnabled.

Used makerHasAmountRange instead of maker.advancedOptions when testing if maker is  using amount range or exact amount (changeds places: handleCreateOrder, disableSubmit, amountToString in SummaryText, and in the Amount fields).

Change the default value of amountRageEnabled

Changed the default value of state var "amountRageEnabled" to true, and removed unnecessary use of the method "setAmountRangeEnabled" when chaging between advanced and default options.

Fix style of switch Exact/Range Amount

Fixing the style of the div of the "Exact/Range Amount" Switch removing the unecessary "width" and "height" props and adding a negative marginTop to reduce the gap between buy/sell buttons and the amount input commented in the PR, and added a padding bottom to the label of the amount (exact) to not hide the switch.

Inverting the position of the icon to match the style of the "Advanced Options" Switch.

Fixing the title from tooltip of the switch (the order of the titles was inversed and the text of the Exact Amount was wrong).

Define style of Exact/Range Amount Switch

Last change in the style of the new Exact/Range Amount Switch, following the review recommendations.
2023-05-18 11:38:23 +00:00
..
src Add switch Amount Exact/Range (#577) 2023-05-18 11:38:23 +00:00
static Fix lnproxy support and add lnproxy relays workflow (#586) 2023-05-18 11:14:11 +00:00
templates/frontend Fix all files with pre-commit 2022-10-25 11:04:12 -07:00
__init__.py Add frontend app 2022-01-01 15:05:55 -08:00
.eslintrc.json Add version mismatch detection, refactor GH workflows, draft release.yml, increase prettier scope (#250) 2022-09-21 07:03:38 -07:00
.prettierignore Add pgp signature to sensitive client - coordinator messages (#592) 2023-05-17 13:06:04 +00:00
.prettierrc Add linter and formatter 2022-08-28 00:20:45 +02:00
admin.py Conform to pep8 rules (#295) 2022-10-20 20:53:51 +00:00
apps.py Re-format all python code 2022-02-17 11:50:10 -08:00
babel.config.json Add version mismatch detection, refactor GH workflows, draft release.yml, increase prettier scope (#250) 2022-09-21 07:03:38 -07:00
Dockerfile Minor fixes on dev setup start up 2023-05-17 04:16:26 -07:00
entrypoint.sh Migrate to react-dom-router v6 (#422) 2023-04-16 18:10:48 +00:00
package-lock.json Small style fixes and new payment method 2023-05-12 03:01:17 -07:00
package.json Small style fixes and new payment method 2023-05-12 03:01:17 -07:00
tests.py Conform to pep8 rules (#295) 2022-10-20 20:53:51 +00:00
tsconfig.json Add version mismatch detection, refactor GH workflows, draft release.yml, increase prettier scope (#250) 2022-09-21 07:03:38 -07:00
urls.py Add RobotTokenSHA256 middleware, /api/robot and frontend entropy calc (#512) 2023-05-05 10:12:38 +00:00
views.py Add pre-commit-config (#298) 2022-10-24 14:34:21 +00:00
webpack.config.ts New Robot page (#357) 2023-02-21 17:22:48 +00:00