Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2531 from ethcore/jg-dapp-githubhint
Browse files Browse the repository at this point in the history
GitHubHint dapp
  • Loading branch information
jacogr authored Oct 8, 2016
2 parents 6c6c97e + 58b1fb7 commit 0a7dad3
Show file tree
Hide file tree
Showing 20 changed files with 829 additions and 1 deletion.
5 changes: 5 additions & 0 deletions js/src/api/rpc/ethcore/ethcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export default class Ethcore {
.execute('ethcore_generateSecretPhrase');
}

hashContent (url) {
return this._transport
.execute('ethcore_hashContent', url);
}

minGasPrice () {
return this._transport
.execute('ethcore_minGasPrice')
Expand Down
18 changes: 18 additions & 0 deletions js/src/dapps/githubhint.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>GitHub Hint</title>
<link href="//fonts.googleapis.com/css?family=Roboto:300" rel="stylesheet">
<link href="//fonts.googleapis.com/css?family=Roboto+Mono:300" rel="stylesheet">
</head>
<body>
<div id="container"></div>
<script src="vendor.js"></script>
<script src="commons.js"></script>
<script src="parity.js"></script>
<script src="githubhint.js"></script>
</body>
</html>
31 changes: 31 additions & 0 deletions js/src/dapps/githubhint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Copyright 2015, 2016 Ethcore (UK) Ltd.
// This file is part of Parity.

// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

import ReactDOM from 'react-dom';
import React from 'react';

import injectTapEventPlugin from 'react-tap-event-plugin';
injectTapEventPlugin();

import Application from './githubhint/Application';

import './style.css';
import './githubhint.html';

ReactDOM.render(
<Application />,
document.querySelector('#container')
);
121 changes: 121 additions & 0 deletions js/src/dapps/githubhint/Application/application.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
/* Copyright 2015, 2016 Ethcore (UK) Ltd.
/* This file is part of Parity.
/*
/* Parity is free software: you can redistribute it and/or modify
/* it under the terms of the GNU General Public License as published by
/* the Free Software Foundation, either version 3 of the License, or
/* (at your option) any later version.
/*
/* Parity is distributed in the hope that it will be useful,
/* but WITHOUT ANY WARRANTY; without even the implied warranty of
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
/* GNU General Public License for more details.
/*
/* You should have received a copy of the GNU General Public License
/* along with Parity. If not, see <http://www.gnu.org/licenses/>.
*/

.container {
background: #333;
font-family: 'Roboto';
vertical-align: middle;
padding: 4em 0;
text-align: center;
}

.form {
text-align: right;
margin: 0 auto;
border-radius: 5px;
width: 44em;
color: #eee;
}

.box {
padding: 2em;
background: rgba(255, 255, 255, 0.1);
border-radius: 5px;
margin-bottom: 2em;
}

.buttons {
text-align: center;
margin: 0 auto 2em auto;
}

.box .buttons {
text-align: right;
margin: 2em 0 0 0;
position: relative;
}

.box .buttons .addressSelect {
position: absolute;
top: 0;
left: 0;
}

.box .description {
margin: 0 0 2em 0;
text-align: center;
opacity: 0.75;
}

.progress {
margin: 2em 0 0 0;
opacity: 0.75;
text-align: center;
}

.statusHeader {
font-size: 1em;
}

.statusState, .statusError {
padding: 1em 0 0 0;
}

.statusError {
color: #f66;
}

.capture {
}

.capture * {
display: inline-block;
padding: 0.75em;
vertical-align: middle;
box-sizing: border-box;
width: 20em;
}

.capture input {
color: #333;
background: #eee;
border: none;
border-radius: 5px;
width: 100%;
font-size: 1em;
text-align: center;
}

.capture input[disabled] {
opacity: 0.5;
}

.capture input.error {
background: #fcc;
}

.hashError {
padding-top: 0.5em;
color: #f66;
text-align: center;
}

.hashOk {
padding-top: 0.5em;
opacity: 0.5;
text-align: center;
}
Loading

0 comments on commit 0a7dad3

Please sign in to comment.