Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,27 @@
"dependencies": {
"@babel/core": "7.1.0",
"@babel/plugin-proposal-class-properties": "^7.4.4",
"@blueprintjs/core": "^3.15.1",
"@blueprintjs/icons": "^3.8.0",
"@blueprintjs/select": "^3.8.0",
"@blueprintjs/table": "^3.5.0",
"@blueprintjs/core": "^3.19.1",
"@blueprintjs/icons": "^3.11.0",
"@blueprintjs/select": "^3.11.1",
"@blueprintjs/table": "^3.8.1",
"@fortawesome/fontawesome-free": "^5.6.3",
"@fortawesome/free-solid-svg-icons": "^5.6.3",
"@rematch/core": "^1.0.6",
"@rematch/loading": "^1.1.2",
"@rematch/persist": "^1.1.5",
"@rematch/select": "^2.0.3",
"@rematch/core": "^1.2.0",
"@rematch/loading": "^1.2.1",
"@rematch/persist": "^1.1.6",
"@rematch/select": "^2.0.5",
"@svgr/webpack": "2.4.1",
"@trx/core": "^0.0.12",
"@types/es6-promise": "^3.3.0",
"@types/lodash": "^4.14.120",
"@types/react": "16.8.2",
"@types/react-dom": "16.8.0",
"@types/react": "16.9.9",
"@types/react-dom": "16.9.2",
"@types/react-redux": "^7.1.5",
"@types/webpack-env": "^1.13.6",
"@uiw/react-monacoeditor": "^1.0.6",
"apollo-link-ws": "^1.0.12",
"apollo-server": "^2.3.1",
"apollo-server-express": "^2.3.1",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "9.0.0",
"babel-eslint": "^10.0.3",
"babel-jest": "23.6.0",
"babel-loader": "8.0.4",
"babel-plugin-named-asset-import": "^0.2.3",
Expand Down Expand Up @@ -76,25 +74,25 @@
"postcss-safe-parser": "4.0.1",
"prop-types": "^15.6.2",
"query-string": "^6.2.0",
"react": "16.8.1",
"react": "16.11.0",
"react-app-polyfill": "^0.1.3",
"react-async-component": "^2.0.0",
"react-dev-utils": "^6.1.1",
"react-dom": "16.8.1",
"react-dom": "16.11.0",
"react-dropzone": "^10.1.4",
"react-intl": "^2.7.2",
"react-monaco-editor": "^0.22.0",
"react-mosaic-component": "^2.0.2",
"react-new-window": "^0.0.10",
"react-redux": "^6.0.0",
"react-redux": "^7.1.1",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
"redux": "^4.0.1",
"redux": "^4.0.4",
"redux-persist": "^5.10.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"resolve": "1.8.1",
"rxjs": "^6.3.3",
"rxjs": "^6.5.3",
"sass-loader": "7.1.0",
"solc": "^0.5.2",
"solhint": "^1.5.0",
Expand All @@ -104,9 +102,10 @@
"terser-webpack-plugin": "1.1.0",
"tronweb": "2.5.3",
"trx-graphql-server": "^0.0.14",
"ts-node": "^7.0.1",
"ts-node-dev": "^1.0.0-pre.32",
"typescript": "^3.2.2",
"ts-node": "^8.4.1",
"ts-node-dev": "^1.0.0-pre.43",
"tslint": "^5.20.0",
"typescript": "^3.6.4",
"url-loader": "1.1.1",
"uuid": "^3.3.2",
"webpack": "4.19.1",
Expand All @@ -123,7 +122,8 @@
"start": "node --max_old_space_size=8192 scripts/start.js",
"build": "PUBLIC_URL=https://arjia.city GENERATE_SOURCEMAP=false node --max_old_space_size=12288 scripts/build.js",
"build:analyze": "ANALYZE=true node scripts/build.js",
"test": "node scripts/test.js"
"test": "node scripts/test.js",
"lint": "tslint -p ./"
},
"browserslist": [
">0.2%",
Expand Down
15 changes: 0 additions & 15 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,5 @@
You need to enable JavaScript to run this app.
</noscript>
<div id="root" class="d-flex flex-column"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->

<!--<script src="https://solc-bin.ethereum.org/bin/soljson-latest.js" type="text/javascript" async></script>-->
<!--<script src="https://solc-bin.ethereum.org/bin/list.js" type="text/javascript" async></script>-->
<!--<script src="https://solc-bin.ethereum.org/bin/soljson-v0.4.25+commit.59dbf8f1.js" type="text/javascript" async></script>-->
<!--<script src="http://code.dappbench.com/browser-solc.min.js" type="text/javascript"></script>-->
</body>
</html>
24 changes: 12 additions & 12 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import './App.css';
import '@blueprintjs/table/lib/css/table.css';
import '@blueprintjs/select/lib/css/blueprint-select.css';
import '@blueprintjs/core/lib/css/blueprint.css';
import '@blueprintjs/icons/lib/css/blueprint-icons.css';
import './styles/index.scss';
import 'react-mosaic-component/react-mosaic-component.css'

import React, {Component} from 'react';
import "./App.css";
import "@blueprintjs/table/lib/css/table.css";
import "@blueprintjs/select/lib/css/blueprint-select.css";
import "@blueprintjs/core/lib/css/blueprint.css";
import "@blueprintjs/icons/lib/css/blueprint-icons.css";
import "./styles/index.scss";
import "react-mosaic-component/react-mosaic-component.css";

import React, {Component} from "react";
import MainWrap from "./mainWrap";
import {IntlProvider} from 'react-intl';
import {IntlProvider} from "react-intl";
import {Provider} from "react-redux";
import {configureStore} from "./store";
import {HashRouter as Router} from "react-router-dom";
Expand All @@ -30,13 +30,13 @@ class App extends Component {
if (window.tronWeb) {
if (previousAddress !== window.tronWeb.defaultAddress.base58) {
previousAddress = window.tronWeb.defaultAddress.base58;
this.store.dispatch({ type: 'refresh '});
this.store.dispatch({ type: "refresh "});
this.forceUpdate();
}

if (previousNode !== window.tronWeb.fullNode.host) {
previousNode = window.tronWeb.fullNode.host;
this.store.dispatch({ type: 'refresh '});
this.store.dispatch({ type: "refresh "});
this.forceUpdate();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/functions/ascii.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function AsciiFunc() {
</div>
</div>
</div>
)
);
}


Expand Down
2 changes: 1 addition & 1 deletion src/components/functions/base58.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function Base58Func() {
</div>
</div>
</div>
)
);
}


Expand Down
3 changes: 1 addition & 2 deletions src/components/functions/funcs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@


export { Base58Func } from "./base58";
export { AsciiFunc } from "./ascii";
export { Utf8Func } from "./utf8"
export { Utf8Func } from "./utf8";
4 changes: 2 additions & 2 deletions src/components/functions/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import {FormGroup, InputGroup, Menu, MenuDivider, MenuItem} from "@blueprintjs/core";
import {Menu, MenuDivider, MenuItem} from "@blueprintjs/core";
import * as Funcs from "./funcs";
import {groupBy} from "lodash";
import {Switch, Route, withRouter} from "react-router";
Expand Down Expand Up @@ -66,7 +66,7 @@ export default class FunctionsWidget extends React.Component<any, any> {
</Switch>
</div>
</div>
)
);
}

}
2 changes: 1 addition & 1 deletion src/components/functions/utf8.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function Utf8Func() {
</div>
</div>
</div>
)
);
}


Expand Down
11 changes: 6 additions & 5 deletions src/components/github/publishGist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {copyWithConfirmation} from "../../utils/clipboard";
import {connect} from "react-redux";

@withDialogs
// @ts-ignore
@connect(
state => ({
(state: any) => ({
gitHubToken: state.config.gitHubToken,
}),
({ config: { setGithubToken } }) => ({
({ config: { setGithubToken } }: any) => ({
setGithubToken
}),
)
Expand Down Expand Up @@ -73,12 +74,12 @@ export default class PublishGist extends React.Component<any, any> {
});

this.props.onSuccess(data);
};
}

setAccessToken = (token) => {
this.props.setGithubToken(token);
this.doPublish();
};
}

showAccessToken = () => {

Expand Down Expand Up @@ -113,7 +114,7 @@ export default class PublishGist extends React.Component<any, any> {
</Fragment>
)
});
};
}

render() {
return (
Expand Down
19 changes: 10 additions & 9 deletions src/components/omnibar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from "react";
import {withRouter} from "react-router";

import {Hotkey, Hotkeys, HotkeysTarget, MenuItem,} from "@blueprintjs/core";
import {Hotkey, Hotkeys, HotkeysTarget, MenuItem, } from "@blueprintjs/core";
import {ItemRenderer, Omnibar} from "@blueprintjs/select";
import {IAction} from "./action";
import {IActionHandler} from "./actions/actionHandler";
Expand Down Expand Up @@ -38,11 +38,12 @@ const renderItem: ItemRenderer<IAction> = (action, { handleClick, modifiers, que
};

@withRouter
// @ts-ignore
@connect(
state => ({
(state: any) => ({
isOpen: state.omnibar.isOpen,
}),
({ omnibar }) => ({
({ omnibar }: any) => ({
toggleOmnibar: omnibar.toggleOmnibar,
setOmnibar: omnibar.setOmnibar,
}),
Expand Down Expand Up @@ -97,20 +98,20 @@ export default class OmnibarWidget extends React.PureComponent<any, IOmnibarExam
return items;
}

for (let handler of this.handlers.concat(getOmnibarHooks())) {
for (const handler of this.handlers.concat(getOmnibarHooks())) {
if (handler.canHandle(query, items)) {
return handler.onItemsList(query, items);
}
}

for (let handler of this.handlers.concat(getOmnibarHooks())) {
for (const handler of this.handlers.concat(getOmnibarHooks())) {
if (handler.canProvide(query, items)) {
items = handler.onItemsList(query, items);
}
}

return items;
};
}

public render() {
return (
Expand All @@ -129,9 +130,9 @@ export default class OmnibarWidget extends React.PureComponent<any, IOmnibarExam
);
}

private handleClick = (_event: React.MouseEvent<HTMLElement>) => {
private handleClick = (ev: React.MouseEvent<HTMLElement>) => {
this.props.setOmnibar(true);
};
}

private handleItemSelect = (film: IAction) => {

Expand All @@ -144,7 +145,7 @@ export default class OmnibarWidget extends React.PureComponent<any, IOmnibarExam
history.push(url);
}
});
};
}

private handleClose = () => this.props.setOmnibar(false);

Expand Down
36 changes: 18 additions & 18 deletions src/components/pageNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ import {withRouter} from "react-router";

class PageNav extends React.Component<any, any> {


render() {
return (
<nav className="bp3-navbar">
<div className="bp3-navbar-group bp3-align-left">
<OverflowList
className="bp3-list-unstyled"
visibleItemRenderer={this.renderBreadcrumbWrapper}
overflowRenderer={this.renderOverflow}
items={this.props.tabs} />
</div>
</nav>
);
}

private renderOverflow = (items) => {
const position = Position.BOTTOM_RIGHT;
return (
Expand All @@ -14,40 +29,25 @@ class PageNav extends React.Component<any, any> {
</Popover>
</li>
);
};
}

private renderOverflowBreadcrumb = (props, index: number) => {
const isClickable = props.href != null || props.onClick != null;
return <MenuItem disabled={!isClickable} {...props} text={props.text} key={index} />;
};
}

private renderBreadcrumbItem = ({ name, type, id, icon, url }) => {
return (
<Button text={name} minimal={true} icon={icon || 'code'} onClick={() => this.props.history.push('/' + url)} />
);
};
}

private renderBreadcrumbWrapper = (props, index: number) => {
return (
<li key={index}>
{this.renderBreadcrumbItem(props)}
</li>
);
};


render() {
return (
<nav className="bp3-navbar">
<div className="bp3-navbar-group bp3-align-left">
<OverflowList
className="bp3-list-unstyled"
visibleItemRenderer={this.renderBreadcrumbWrapper}
overflowRenderer={this.renderOverflow}
items={this.props.tabs} />
</div>
</nav>
);
}

}
Expand Down
Loading