Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
yarn-error.log
1 change: 0 additions & 1 deletion dist

This file was deleted.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "substrate-ui",
"version": "1.0.0",
"description": "Gav's Substrate UI",
"description": "Substrate UI",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
Expand Down Expand Up @@ -30,9 +30,13 @@
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.6.1",
"babel-preset-react": "^6.24.1",
"css-loader": "^2.1.1",
"express": "^4.16.3",
"html-webpack-plugin": "^3.2.0",
"nodemon": "^1.18.3",
"npm-run-all": "^4.1.3",
"style-loader": "^0.23.1",
"url-loader": "^1.1.2",
"webpack": "^4.29.0",
"webpack-cli": "^3.1.1"
},
Expand All @@ -41,7 +45,6 @@
"bip39": "^2.5.0",
"blakejs": "^1.1.0",
"bs58": "^4.0.1",
"css-loader": "^2.1.0",
"file-loader": "^3.0.1",
"oo7": "^0.7.9",
"oo7-react": "^0.8.10",
Expand All @@ -52,10 +55,8 @@
"react-dom": "^16.3.2",
"semantic-ui-css": "^2.3.3",
"semantic-ui-react": "^0.84.0",
"style-loader": "^0.23.1",
"tweetnacl": "^1.0.1",
"url-loader": "^1.0.1",
"uuid": "^3.3.2",
"xxhashjs": "^0.2.2"
}
}
}
13 changes: 13 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="us">

<head>
<meta charset="utf-8">
<title>Substrate UI</title>
</head>

<body>
<div id="app"></div>
</body>

</html>
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import 'semantic-ui-css/semantic.min.css';
import React from 'react';
import {render} from 'react-dom';
import {App} from './app.jsx';
import { render } from 'react-dom';
import { App } from './app.jsx';
import { setNodeUri } from 'oo7-substrate'
import './styles/styles.css';
require('./denominations')

setNodeUri(['ws://127.0.0.1:9944/', 'wss://substrate-rpc.parity.io/'])

render(<App/>, document.getElementById('app'));
render(<App />, document.getElementById('app'));
38 changes: 38 additions & 0 deletions src/styles/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.validator-balances {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: stretch;
align-content: flex-start;
display: flex;
}

.validator-balance {
margin: 6px;
padding: 12px;
width: 150px;
background: #fcfcfc;
border-radius: 8px;
}

.validator {
float: left;
}

.AccountId {
clear: both;
font-family: 'Courier New', Courier, monospace;
}

.paren {
font-size: small;
color: #666;
}

.value {
font-weight: bold;
}

.ui.basic.label {
background: none #FFFFFF !important;
}
16 changes: 12 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// webpack v4
const path = require('path');
const HtmlWebpackPlugin = require("html-webpack-plugin");
const dist = path.resolve(__dirname, "dist");

module.exports = {
entry: { main: './src/index.js' },
module: {
Expand All @@ -11,7 +14,7 @@ module.exports = {
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
Expand All @@ -22,12 +25,17 @@ module.exports = {
resolve: {
extensions: ['*', '.js', '.jsx']
},
plugins: [
new HtmlWebpackPlugin({
template: 'public/index.html'
})
],
output: {
path: __dirname + '/dist',
path: dist,
publicPath: '/',
filename: 'bundle.js'
},
devServer: {
contentBase: './dist'
contentBase: dist
}
};
};
Loading