Commit Graph

258 Commits

Author SHA1 Message Date
Jaco Greeff
cf8f2064f8
Cleanup address default saving (#242) 2018-08-21 12:01:12 +02:00
Jaco Greeff
bf4b3b4ed9
Keyring observable subject around available options (#240)
* Start of keyring observable

* All update operations through observables

* Cleanup create

* onChange -> rxChange for observables

* Options is observable

* Fix swap bug with same params

* Missing onChange -> rxChange

* Cleanups

* Remove extra comment
2018-08-20 17:44:32 +02:00
Jaco Greeff
b5b66e5990
Store addresses via actual address (when PK pasted) (#239)
* Store addresses via actual address (when PK pasted)

* Reformat pk addresses (wrong) as encoded

* Remove debug log
2018-08-20 10:56:30 +02:00
Jaco Greeff
4ff1392459
DRY Card display (CardBar component, consistency) (#235)
* DRY Card display (CardBar component, consistency)

* Use SummaryCard on staking

* Simplify summaries (no duplication from explorer)

* Display lateness percentage value
2018-08-20 10:49:52 +02:00
Jaco Greeff
99c9062272
Cleanup JSON recursive formatting (#236) 2018-08-17 15:07:47 +02:00
Jaco Greeff
a6715a974e
Fix encoding to allow both poc-1 & poc-2 blocks (#234) 2018-08-17 10:40:35 +02:00
Jaco Greeff
682331e793
Display justifications for block click-through (#230)
* Display justifications for block click-through

* >25/25 display
2018-08-16 22:52:01 +02:00
Jaco Greeff
39fb78afd4
Retrieve block information (#229)
* Retrieve block information

* Render unknown addresses

* Don't render extrinsics count (getBlock) if not needed

* Fix dep versions
2018-08-16 17:35:32 +02:00
Jaco Greeff
a817db5fe2
Pull in new subscription API (tracking subs per method) (#227)
* Pull in new subscription API (tracking subs per method)

* Add apiMethods (support checks)

* Quick (not dirty) extrinsic count
2018-08-15 18:16:57 +02:00
Jaco Greeff
907dc875c5
Adjust header styling (font-weight) (#225) 2018-08-15 12:02:27 +02:00
Jaco Greeff
4484883afc
Basic democracy (Referendum) overview (#216)
* Basic democacry (Referendum) overview

* Summary in-place

* Fix package name

* Proposals & Referendums are showing up

* Some basic Extrinsic formatting. (WIP)

* Basic referendum/proposal summary in place

* Referendum outcome chart

* Voting in place. It works.

* Remove extra console.log/error

* Only show balances as label
2018-08-15 10:35:53 +02:00
Jaco Greeff
46a48539b7
Additional block production overview on explorer (#212)
* Cleanup Card layouts

* Additional block production overview on explorer

* Adjust Card padding for accounts

* Observable calculations into ApiObservable

* DRY-er combineLatest + .pipe(map(...))

* .pipe(map(...))

* Progress takes value + total, auto-colors

* CardSummary with Progress

* Small style updates

* Cleanup withApiObservable (optional value name)

* Cleanup progress props

* Cleanup rpc method use

* Auto-set the prop from withStorage

* Cleanups in observable use

* Cleanups to layout

* Initial bestNumber

* Poll for changes in ApiObservable

* WIP (debug)

* Initial conversion (untested) or subscribeStorage

* s/apiObservable/observable/

* Starting to show stuff (after storage subscriptions). WIP.

* Staking UI works, still WIP on rest.

* Readability

* Storage withObservableDiv, Closes https://github.com/polkadot-js/apps/issues/215

* Add encoding FIXMEs

* 'nominee' on set click

* Align withObservable with others (single line)

* Retrieve ss58 encoded AccountId from storage

* Update with latest api (null/undefined storage distinction)
2018-08-13 12:05:11 +02:00
Jaco Greeff
9b35e1ec79
Introduce Page & Navigation components (consistency) (#211)
* Introduce Page & Navigation components (consistency)

* Staking account border update
2018-08-08 17:18:57 +02:00
Jaco Greeff
4d984d9f72
Introduce higher-level ApiObservables, use stakingBalance displays (#210)
* Move observables to ui-react-rx

* Move observables into ApiObservable

* Allow AddressSummary to render passed-in balance(s)

* Render Balance consistently in summaries

* Style Mini balance

* Use ApiObservable via HOC

* Nominee balances expanded

* Render nominators for account

* Add full balance when intending
2018-08-08 14:57:09 +02:00
Jaco Greeff
ec1a110cb2
Add AddressRow component (#208) 2018-08-08 11:15:33 +02:00
Jaco Greeff
278ca13812
Update util-keyring, pair.hasSecretKey -> pair.isLocked (#200)
* Update util-keyring, pair.hasSecretKey -> pair.isLocked

* Fix decrementing versions manually

* Update deps
2018-08-06 21:48:05 +02:00
Jaco Greeff
c80956b7f2
Common AddressSummary component, update staking layout (#194)
* Move AddressSummary component into ui-app

* Add children rendering to summary

* User AddressSummary in staking

* Mini summary component

* Show nominating in modal

* Check nomination against intentions (not validators)

* Update input description
2018-08-06 15:40:14 +02:00
Jaco Greeff
9f9c937a41
Format storage entries in a div (#197)
* Format storage entries in div (with icons)

* Update queries to have same alignment
2018-08-06 15:33:21 +02:00
Jaco Greeff
bf5f75d491
(un)Nominate functionality (#183)
* (un)Nominate functionality

* Small cleanups
2018-08-03 18:55:44 +02:00
Luke Schoen
0748a27426 fix: Fixes #94 by adding missing filter for extrinsics timestamp (#165)
* refactor: Rename InputStorage key to method to be consistent with InputExtrinsic

* fix: Add filter to both section and method that considers isHidden prop

* refactor: Move into meaningful private functions

* fix: Fix linting errors

* test: Add Unit Tests to check shouldDisplaySection function

* fix: Remove unnecessary import

* restore file naming

* refactor: Move shouldDisplaySection into utils folder

* refactor: Move more common functionality into util

* remove unused isObject

* restore by removing unnecessary types. propose private type for storage

* fix: Remove explicit passing through the type for storage since its default

* feat: Use shared logic for showing section and methods in InputRpc

* refactor: Move shared types into util folder with section visibility type

* fix: type is public or private

* WIP: methods[name] TypeScript error

Element implicitly has an 'any' type because type '{}' has no index signature

* fix: Fix TSLint errors using jacos solution
2018-08-03 13:46:17 +02:00
Luke Schoen
df91405d1b fix: Fixes #163 Concat index before value for queries with array response (#172)
Applies to queries to storage @polkadot/storage/ such as staking.ts and session.ts having type ['AccountId'].
2018-08-02 10:13:45 +02:00
Jaco Greeff
9e8557bcb1
Add length prefix to Bytes type (#159)
* Add length prefix to bytes

* Update types
2018-07-24 17:26:17 +02:00
Jaco Greeff
2dccb5959f
Update deps, fix formatting, parachain priv methods (#156)
* Update deps for empty params

* Bump deps

* Render ParachainId
2018-07-22 14:05:38 +02:00
Jaco Greeff
67691af8c3
Update Referendum text display (#145) 2018-07-13 11:26:56 +02:00
YJ
57800cdb83 Fixes #103: Convert functional components to pure (#135)
* ui-signer pureComponentify

* ui-react pureCompify

* Status queue prop

* ui-app Button

* ui-app InputExtrinsic

* apps, app-rpc, ui-app, ui-react

* app-extrinsics, app-explorer, apps

* fixes for tslint

* more linter fixes

* Update index.tsx

* Update index.tsx

* Update Nonce.tsx

* Update index.tsx

* Update Results.tsx

* Update index.tsx

* Update Queries.tsx

* Update NodeInfo.tsx

* Update index.tsx

* Update Item.tsx

* style fixes

* TSLINTs
2018-07-13 07:40:31 +02:00
Jaco Greeff
5dc348304c
Encode consensus.setStorage(KeyValueStorage[]) (#131)
* Start of override KeyValueStorage

* All Upload of KV storage data

* Update dependencies

* KV parse & submission

* Cleanup display of storage queries

* Bump dependencies (incl. KV decoding fix)
2018-07-11 17:19:56 +02:00
YJ
aaf7286042 stricter types (#134) 2018-07-11 08:49:35 +02:00
Jaco Greeff
3fb85094a6
Example & tutorial (#127)
* Add tutorial step 001

* Update LICENSE header

* Query storage via HOC

* Tut 003, read proposals

* Tut 004 replacing HOC

* Pull Intentions & Proposals together

* Add final image

* Cleanup unused methods

* Source links

* Remove unused var
2018-07-09 13:38:31 +02:00
Jaco Greeff
f561d6c4fa
Fix storage select (#123) 2018-07-03 16:55:56 +02:00
Jaco Greeff
349c35cf41
Fix extrinsic submissions (#111)
* Update parent when values have changed

* Fix linting

* Cast for correct signature

* Cater for correct "Bytes" for submitExtrinsic
2018-06-28 17:19:18 +02:00
Jaco Greeff
f523383216
Add TSLint (#106) 2018-06-27 12:43:07 +02:00
Jaco Greeff
f2d234b591
Fix parameter updates (#105) 2018-06-26 12:10:41 +02:00
Jaco Greeff
078e2e431a
Support enumerable accounts (#102)
Covert to TypeScript
2018-06-25 18:02:47 +02:00
Jaco Greeff
9c89026e6e
Copyright project authors (#95)
* Copyright project authors

* Add contributors
2018-06-13 22:32:49 +02:00
Luke Schoen
5296c4fee1 fix: Fixes #88 buttonbar style cornering on Accounts and Addresses pages (#90)
* fix: Fixes #88 buttonbar style cornering on Accounts and Addresses pages

- Add right corners to Forget
- Add left corners to Reset

* refactor: Move overrides for buttonbar corner styles into shared resource

* fix: Add newline to end of file

* refactor: Refactor using PostCSS variables, nesting, and import

* refactor: Move variables into partials subfolder. Apply CSS when preceding sibling is spacer

* fix: Remove unnecessary comma to pass CI linting

* fix: Add initial divider with no padding to apply corners conditionally

There is no CSS selector combinator that allows conditional styling of an element conditional upon "subsequent" sibling elements existing. This is a work-around whereby a dummy divider with no padding is added to the start of the button group such that the custom corner overrides only apply to button groups that contain a 1st and 3rd element that are dividers. Only options for conditional styling dependent on "preceding" sibling elements currently exist that are compatible across browsers (i.e. 'Adjacent sibling combinator' by use of `+` and 'General sibling combinator' by use of `~`, see below reference for details).

Another alternative solution that was considered by not deemed generic enough was to conditionally apply the custom cornering only to button groups that are contained within a classname that contains the text "--Editor", on the assumption that the Forget, Reset, Save button group would only be used within a nesting containing such a wildcard value (as is currently the case)
```
div [class*="--Editor"] {
  .ui--Button-Group {
    .ui.buttons {
      .button:nth-child(1) {
        border-top-right-radius: $small-corner;
        border-bottom-right-radius: $small-corner;
      }
      .ui.button.compact.mini.basic + .button:nth-child(3) {
        border-top-left-radius: $small-corner;
        border-bottom-left-radius: $small-corner;
      }
    }
  }
}
```

Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors

* fix: Resolve linting CI errors

* fix: Add missing dependencies to package.json to pass CI

* refactor: Move widthless divider into base Group component

* refactor: Move button group custom cornering styles
2018-06-13 16:42:03 +02:00
Luke Schoen
934d2b912a feat: Fixes #75. Add edit icon from semantic-ui to account name input field (#83)
* feat: Fixes #75. Add edit icon from semantic-ui to account name input field

Adding an edit icon that is embedded in the account name input field makes it more obvious to the user that the input field isn't read-only, and that there is a way to "click before doing" (i.e. editing the input field that is identified as being editable before the ability to save changes is granted). Some users may click the edit icon itself thinking it toggles the ability to edit the input field, whilst others may just recognise that the edit icon means the input field is editable. In either case just having the edit icon should suffice as being the initial "call to action" for a user wishing to edit the input field, and since the Reset and Save buttons illuminate when the account name is modified, they'll recognise that a further step is required to save their changes.

* resolve introduced ESLint and Flow errors

* fix: Move attributes up so they are in alphabetical order

* fix: Remove unnecessary classenames. Edit icon stays within input field
2018-06-13 09:08:13 +02:00
Jaco Greeff
e77363ba1b
Upgrade dependencies (#87)
* Upgrade dependencies

* Update getting started

* Attemp test-case for https://github.com/polkadot-js/apps/issues/81

* Fix small typos
2018-06-11 18:05:23 +02:00
Jaco Greeff
e55f10e8d8
Fix array type display (#69) 2018-05-31 13:59:00 +02:00
Jaco Greeff
d45642e3f6
Fix address defaultValue/value, hide testing accounts (#66)
* Fix address defaultValue/value

* @flow cleanups

* Remove debug info

* Properly hide dev chain addresses (default)

* Close https://github.com/polkadot-js/apps/issues/68

* Don't allow pre-existing accounts and addr

* Failsafe on conversion check

* Don't try to encode arrays

* Display decoded Proposals as text
2018-05-30 12:07:45 +02:00
Jaco Greeff
a4531a50d6
Update for latest @polkadot/params (#64)
* Update for latest @polkadot/params

* Allow passing in of WS_URL environment

* Cleanup block display

* Update dependencies
2018-05-29 14:34:23 +02:00
Jaco Greeff
69d0985410
Cleanup type definitions (#59)
* Cleanup type definitions

* Update dependencies

* Update depnedencies
2018-05-27 18:54:24 +02:00
Jaco Greeff
004824dbec
Be explicit in State returns (#58)
* Be explicit in State returns

* Cleanup Param properties

* Cleanup casting

* Cleanup type manipulations

* Don't allow null for InputAddress defaultValue
2018-05-25 17:57:51 +02:00
Jaco Greeff
07f2a1ae07
Use componentDidUpdate for change triggers (#57)
* Use componentDidUpdate for change triggers

* Update dependencies
2018-05-25 16:05:01 +02:00
Jaco Greeff
c99a119878
Move Balance -> u128, Index -> u32 (#56)
* u128 balances operational

* Allow app build (from src)
2018-05-25 14:26:56 +02:00
Jaco Greeff
99b188bf5d
Update dependencies, cleanup app-rpc results (#55)
* Align with upstream types

* Fix app-rpc outputs
2018-05-24 18:04:49 +02:00
Jaco Greeff
397dd0c983
Update jsonrpc dependency tree (#54)
* Use tyopeToString from @polkadot/params

* Upgrades... before checks

* Cleanups... WIP.

* more WIP.

* Expand defaultValue & handlers

* Cleanups

* CodeClimate cleanups

* Additional CodeClimate cleanups

* Base for app-rpc

* Initial split into ui-signer

* Signer operational (extrinsics)

* Decode extrinsic method

* RPC progress...

* RPC class works again

* @flow cleanups
2018-05-23 18:01:42 +02:00
Jaco Greeff
6753dc0ad2
Use @babel 7 (#52)
* Use @babel 7

* Use @babel 7

* Use custom webpack config

* Minify input css

* Remove @flow header form webpack.config

* Webpack config re-usable

* Split with vendor/main bundles

* Use hash for main entry, specify chunkHash

* Import base postcss config

* Hashing uses blake2

* Align number formats

* Use contenthash fro extracted css

* Format number directly

* Split runtime (better caching)
2018-05-17 14:51:41 +02:00
Jaco Greeff
5f884c4b65
Add utility/toolbox app (#51)
* Upgrades

* Add & use Output component

* Render app in content

* Use update @polkadot/dev-react

* Add app-toolbox

* DRY className concat

* Hashing in place

* Verify signature operational

* Entry updates

* Verification operational

* Final cleanups before PR

* Bump version
2018-05-15 16:58:32 +02:00
Jaco Greeff
a940292287
Convert to @polkadot/param formatters (#49)
* Convert to @polkadot/param formatters

* WIP

* Renderinbg operational

* Update with checks

* Show 'empty' with no array values

* Pass-through label properly

* Pass through isDisabled property
2018-05-14 17:43:22 +02:00
Jaco Greeff
62279af6b9
Pass through Button.Or className (#48) 2018-05-12 20:38:19 +02:00
Jaco Greeff
ea50c4f1fe
Pull in ui-app components only (#46)
* Pull in ui-app components only

* Undefined check

* Small overall layout updates (buttons)

* Password hide/unhide icons

* Automatically assign name to inputs
2018-05-12 15:05:41 +02:00
Jaco Greeff
8c349a0420
Dropdown label type update (#43) 2018-05-12 12:57:03 +02:00
Jaco Greeff
b20a131b15
Be explicit in supported input types (#42)
* Be explicit in supported input types

* label as React$Node
2018-05-12 10:42:13 +02:00
Jaco Greeff
1489a1c4e6
Add defaultLabel for Labelled (#40)
* Add defaultLabel

* Typing for defaultLabel

* Add null for label prop

* Try to fix (in the dark)

* Allow anything for label
2018-05-12 10:29:54 +02:00
Jaco Greeff
9eb671cd17
Expose CopyButton properties (#41) 2018-05-12 10:12:59 +02:00
Jaco Greeff
af452ba222
Remove unneeded key prop 2018-05-12 09:55:37 +02:00
Jaco Greeff
ccd656fb75
Remove wayward debug log 2018-05-12 08:30:06 +02:00
Jaco Greeff
b11a6981a2
Optimise components (#39)
* ui-react-app -> ui-app

* CopyButton, Input & Password components

* Convert all to use ui-app/{Input, Label}

* Change to PureComponent where we have onChange listeners

* Cleanup layouts

* Swap dropdown components, remove uselexx constructors

* Allow address/account forget

* Bump

* Searching with headers operational

* flex grow/shrink for icon + account add

* Fix balance & transaction display (account/address management)

* Adjust balance layout

* Equalise padding
2018-05-11 18:08:10 +02:00