So far our `IconButton` hasn't been a proper button control which comes
with many downsides, such as:
- Some default button behaviours need to be simulated (e.g. `onClicked`)
- Any support built-in features for all controls in QML like `ToolTip` aren't can't be used
- There are probably accessibility aspects to it as well
We use the `IconButton` in many different places. Sometimes it doesn't
even act as a button, but just as an icon. I suggest we introduce a separate
`StatusIcon` component for that in future changes.
This commit turns the `IconButton` into a proper `RoundButton`, restoring
the control behaviour and features we get from QML.
This also required to expose the `icon` property as a `iconImg`,
because a `RoundButton` already comes with an `icon`.
On the other hand, we could remove the `onClick` simulation and can now
take advantage of components like `ToolTip`.
This commit fine-tunes the layout of the advanced modal input controls.
It also adds validation so that only numeric values are accepted as
gas price and gas limit values
Add receive modal in the wallet to show a QR code and address selector
Improve Input component to be able to show a Copy button that copies to clipboard
Improve AccountSelector modal to be able to not show details and fix eliding
When tokens are added/removed, the asset list in the AssetAndAmountInput is updated.
The selected asset can be specified by the parent component which is needed for things like sticker market where we need to set SNT as the fixed token.
Improved the validation for the component:
- validate() can be called externally
- validation display is handled internally and messages can be customised
- validation error messages are handled by the Input component and validation UX is consistent with other tx components
Remove all `walletModel` references from the `AccountSelector` component, as the component should not be aware of the API's existence.
Pass currency to `AccountSelector` component.
Fixes#670.
Component spec based on https://www.notion.so/emizzle/Wallet-transaction-components-2003b78a8d0d41c4ab3d21eb2496fb20.
Changes the current Select shared component to a model databound component. This means we can bind directly to `QAbstractListModel`'s coming from Nim instead of needing manipulating the data in to javascript objects. The changes to the Select component will be used for the upcoming Asset selector shared component.
Adds settings API for getting current network details.
Uses the current network details to display the correct etherscan link in QML (etherscan URL is a setting in the current network settings).