Commit Graph

35 Commits

Author SHA1 Message Date
Stefanie Doll
7dffdb2e7e
Add const example to app-js (#1424)
* Add const example to app-js

* Trigger Travis
2019-07-19 17:40:31 +02:00
Stefanie Doll
7d451c6f88 Add endpoint fallbacks option and handling of consts to ui-api (#1416)
* Add `fallback` option to ui-api to pass more than one endpoint for backwards compatibility

* set correct endpoint

* remove console.logs

* linting issues

* const -> consts typo

* changed query example to blockPeriod

* turn `fallback`: string[] | string into fallbacks array

* turn while loop into map

* less params & removed let

* Adjust withCall typing, don't allow voting in treasury
2019-07-18 15:11:57 +02:00
Jaco Greeff
8bb35dd9ff
Complete eslint swap (#1407) 2019-07-16 11:56:40 +02:00
Jaco Greeff
144c8bbd85
eslint fixes (round 2) (#1401)
* eslint fixes (round 2)

* ui-params converted

* Tiny.

* Classes fix

* Some type cleanups

* Cleanup traling ,

* < 1k

* Small additions

* <750

* Mini updates modifiers

* More ui-app cleanups

* 312 problems (182 errors, 130 warnings)
2019-07-15 23:17:19 +02:00
Jaco Greeff
0e2265ff70
Some initial pre-eslint cleanups (#1383)
* Some initial cleanups

* Make it lint

* Small s/type/interface/ additions

* Small minor s/type/interface/

* More type -> interface

* Add lint:new rule

* Some small updates

* Cleanup dangling tslint  issues

* Small updates

* ui-signer cleanups

* ui-reactive updated

* Make lint:new run

* Mini ui-params cleanups

* Some additions

* Tiny... and done for now.

* 1950 problems (1241 errors, 709 warnings)

* 1829 problems (1181 errors, 648 warnings)

* 1674 problems (1181 errors, 493 warnings) (no any... for now)

* Small additions.

* Array<T> -> T[] (all)
2019-07-14 22:27:12 +02:00
Thibaut Sardan
b2f6d87de1
Use empty props from CardGrid (#1304)
* empty for account, addressbook

* staking empty screen

* use multi only when values changed

* lint

* withCall paramPick transform

* use paramPick and log things

* swap logging

* Display getMethod errors in withCall

* Remove nested try

* Use updateDb to trigger an update

* fix bonding

* Revert ifs

* Update call.tsx

* lint

* stray logs
2019-06-29 10:02:58 +02:00
Chevdor
2f0172a033 Add new snippet for api.query.balances.freeBalance.multi (#1288) 2019-06-10 19:01:04 +02:00
Jaco Greeff
da2cee140f
Fix snippet saving (#1272) 2019-06-04 15:48:00 +02:00
kwingram25
dc943d7cd6
Button/TxButton submit on enter (#1170)
* Button/TxButton submit on enter

* promise linting

* testing ref approach

* Add TxComponent to handle submit on enter

* remove accountNonce

* remove input ref

* remove TxButton constructor

* remove comment

* empty constructor

* linting

* bug with null ref

* linting
2019-05-22 18:08:58 +02:00
Stefanie Doll
41489e7135 Move buttons above the editor (#1128)
* Move buttons above the editor

* Both solutions - one to be deleted

* removed option 1
2019-05-10 19:03:28 +02:00
Stefanie Doll
de414550bd
Fix examples (#1063)
* Fix examples

* blockPeriod -> minimum period
2019-05-01 14:44:06 +02:00
Luke Schoen
1ff70781e0 Refactor nitpicks in app-js (#1052)
* chore: nitpicks

* remove console.logs
2019-04-30 15:22:50 +02:00
Xiliang Chen
7584848185 use pre tag for new line display (#1015) 2019-04-13 10:28:21 +02:00
Jaco Greeff
27689e8816
ss58 & US language updates (substrate 1.0-rc) (#871)
* ss58 & US language updates

* All Finalised -> Finalized

* Remove unused status

* 0.28

* 0.28
2019-03-29 18:26:18 +01:00
Joshy Orndorff
b48b1fd171 Updated addresses for sr25519 (#839) 2019-03-24 21:00:09 +01:00
Jaco Greeff
ecd30e3fee
Expose types on JS console (#832) 2019-03-23 12:42:02 +01:00
Jaco Greeff
96615d5957
Bump UI, HDKD keyring (new substrate crypto) (#813)
* Bump UI, HDKD keyring (new substrate crypto)

* Bump ui/* versions

* Pull in latest util-crypto, bp39 fix

* Bump common

* Small enhancements, cleanups (testing WIP)

* Bump

* Update after merge

* Bumps, fix transfer calculation (value may be non-existent)

* Bumpo dependencies

* Label extrinsic hash

* Signature updates

* Update deps

* Adjust status display

* Close status items on click

* Update withRouter duplication

* API bump, (some) creation fixes

* Move bip39 out of the worker (fast enough now via WASM)

* Update after master merge

* Cleanup deps (re-write yarn.lock)
2019-03-20 17:06:29 +01:00
Jaco Greeff
338bd517a0
Remove /index imports (swap to bare) (#814)
* Remove /index imports (swap to bare)

* Bump deps
2019-03-14 10:45:58 +01:00
Stefanie Doll
4ff77eee26
Move editor from app-js to ui-app component (#795)
* Move editor from app-js to ui-app component

* move export

* Move codeflask in package.json
2019-03-08 12:41:58 +01:00
Stefanie Doll
3f8ef157e4
Compress code with snappyjs (#755)
* Compress Base64 strings with snappy

* Move wrapper fix to different PR

* Added snappy typescript declaration

* type str and ch

* Updated yarn.lock
2019-02-25 14:24:19 +01:00
Stefanie Doll
b56480c9ca
Smaller quick-fixes for app-js (#756)
* Fix wrong copyToClipboard link

* Removed duplicate 'js--App' wrapper

* Fixed overflow in editor for longer code examples
2019-02-24 13:33:44 +01:00
Stefanie Doll
970911536c
Share functionality for app-js api playground (#740)
* First WIP

* Move all action buttons to component

* More WIP

* removed query-string module, share example through location.hash

* Copy over deep clone

* Fixed onload behaviour

* Working example 'read from url' <-> 'write to url'

* Populate location.hash to state

* comment

* Add selected option to dropdown

* Dropdown WIP debugging

* Removed attempted workaround for MUI Dropdown component Bug, added Fixme

* Added copy to clipboard functionality

* Added feedback animation on copy & switched component back to PureComponent

* Tslint fixes & yarn.lock dump

* Added hash router types

* More type fixes

* Attempt to fix strictNullChecks for document.getSelection()

* Fixed wrong conditional

* prettier links

* Tiny styling tweaks

* Added routing to index

* Removed empty devDependencies from package.json

* Fix sharing

* Try `history` without typing

* Yarn.lock dump

* Removed leftover LocalStorage component

* Removed HashRouterProps

* Code formatting changes

* addressing tslint errors

* Added match ro Props

* Added history: any to Props declaration
2019-02-22 13:51:07 +01:00
Stefanie Doll
333b94001e
Bugfix: deep clone imported snippets (#737)
* Yarn.lock update

* Deep clone imported snippets, state.snippet empty on default

* Fixed wrong defailt type for 'selected'

* Fix onMount behaviour
2019-02-20 12:53:48 +01:00
Jaco Greeff
9adfd46cc3
Bump i18next version (with usage changes) (#736)
* Bump i18next version (with usage changes)

* Remove unneeded i18n wrapping (Unlock)

* Bump semantic-ui version
2019-02-20 10:26:27 +01:00
Stefanie Doll
f0198a35d4
Bugfix: Editor doesn't update onLoad if no custom example is selected (#732) 2019-02-19 18:28:16 +01:00
Stefanie Doll
12ff6fe32a
Populate example name to input for custom examples (#731)
* Set snippet name as default value in save input field

* Onlu prefill input for custom examples
2019-02-19 16:18:19 +01:00
Stefanie Doll
a056be741b
Save code snippets to local storage (#718)
* Fine tuning examples

* WIP First proposal to save snippets

* Don't add code wrapping multiple times

* Smaller adjustments

* Fix 'reset selected on load' bug

* Reverted Button size type declaration change, doesn\t belong in this PR

* Wrapper formatting

* Save button style

* removed constructor from editor

* fix metadata example

* Added constants file

* Moved local storage popup to separate component

* Remove functionality WIP

* upgraded yarn lock

* Moved Local storage to separate component, fixed lyfecycle methods, moved props.childre to render in HOC

* Changed simplyfied examples for debugging back to original

* Cleanup leftover comments

* More leftover comments cleanup

* More cleanup

* Moved makeWrapper back to seperate component

* Add code wrapper for default examples in constructor to prevent lifecycle update bugs

* Make onBlur optional

* Updated yarn.lock

* FIXME comment for ui-app Button bug inside <Popup />

* translation and removed empty classname
2019-02-19 10:49:37 +01:00
Jaco Greeff
bc0c9bfe43
Inject keyring only on dev chains (#717)
* Inject keyring only on dev chains

* Remove useless deconstruct
2019-02-14 17:23:55 +01:00
Stefanie Doll
a69548866b
App-js follow up tasks (#703)
* Bump up yarn.lock

* Clean up examples, added jacos example to storage examples

* Fixed Dropdown

* Update package.json

* resize wip

* css resize fix

* Add line-break after code in exec to prevent catch from  being commented out

* Fixed typo in example

* Formatting

* More formatting

* Added missing semicolon

* Update to use UI signer

* Make visible on sidebar

* Combine some info from samples

* blockPeriod.toNumber() (oops, dropped that, reinstate)

* lifecycle bugfix for duplicate comments

* Kicked Intro, moved info to WRAPPER

* removed leftover <Intro /> import
2019-02-13 12:30:41 +01:00
Jaco Greeff
61674a7989
Add Signer interface for API (#683)
* Add Signer interface for API

* Attach signer to API instance

* Integrate signer with updates (untested)

* Update with working signer integration (logging an issue still)

* Restore console hooks, feedback on signed

* Remove unneeded console.log

* Marge install
2019-02-12 22:29:47 +01:00
Jaco Greeff
7b48e4e9d2 Wait for isReady before js exec (#701) 2019-02-12 16:43:01 +01:00
Jaco Greeff
ef82b7f58c
Adjust Editor/Output sizing (#697) 2019-02-12 11:13:25 +01:00
Stefanie Doll
061f346fd6
Sd 668 app console (#684)
* [app-js] fixed copyright

* [app-js] css fixes

* [app-js] Add api to window object

* Make CSS columns resizable (FF & Chrome)

* Window Interface export

* formatting

* Make columns responsive, added Dropdown

* Added code snippets

* Strip down output to functional component

* removed component state, removed onEdit, update on select

* Editor styling

* Added snippets and local storage

* output formatting

* Example dummies

* Cleanup & examples

* Added util & keyring @polkadot modules to window object

* Moved intro to component to make it translatable

* Added more RPC examples

* small fix

* WIP exaples

* Styles for resizer, fixed flex overflow misbehaviour

* remove code from snippets for options,

* Added labels to dropdown

* Examples

* More examples and removed deprecated examples

* Added labels to dropdown -> missing type decl.

* correst link to ui-keyring package

* Make tslint happy

* Pull api clone/disconnect into sd-668 (#686)

* JS playground & console (start something...)

* It runs...

* WIP

* Use codeflask

* Highlights

* Small updates, console v0.1 is ok to play with

* Bump

* Only shadow, no border (article)

* Allow API to be disposed of between runs

* Clone and disconnect API

* Move id generation (no need for constructor)

* Small updates

* Small type adjustments

* smaller fixes after code review

* updated yarn.lock

* move options calculation out of return

* Remove exposure of api to window object

* Expand JS console logging (#691)

* Expand JS console logging

* Log extrinsics directly

* switch to getDerivedStateFromProps()

* roll back ts versions

* react-i18next rollback to 9.0.2

* Lock  react-i18next to 9.0.2
2019-02-11 18:02:34 +01:00
Jaco Greeff
5df31ca256
Unsub from newHead snippet (#669) 2019-02-01 12:06:27 +01:00
Jaco Greeff
fb9cf70a71
Javascript & API console app (#666)
* JS playground & console (start something...)

* It runs...

* WIP

* Use codeflask

* Highlights

* Small updates, console v0.1 is ok to play with

* Bump

* Only shadow, no border (article)
2019-02-01 11:17:32 +01:00