Skip to content

Commit

Permalink
Add testnet warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrypisanko committed Dec 25, 2017
1 parent d5a0380 commit 5f8e548
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/app.bundled.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ <h2 class="sonm-not-supported__support-sub-header">Currently we support browsers
</div>
</div>
</div>
<script type="text/javascript" src="app.bundled.js"></script></body>
<script type="text/javascript" src="app.bundled.js"></script><script type="text/javascript" src="style.bundled.js"></script></body>
</html>
12 changes: 11 additions & 1 deletion docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
border-top-width: 0;
border-bottom-width: 0;
flex-grow: 1;
padding: 50px;
padding: 20px 50px 50px 50px;
min-height: 635px;
box-sizing: border-box;
display: flex;
Expand Down Expand Up @@ -677,6 +677,11 @@
grid-column: 1 / 2;
grid-row: 2;
}
.sonm-account__warning {
margin-bottom: 5px;
font-size: 15px;
font-weight: bold;
}
.sonm-account__give-me {
grid-row: 4;
grid-column: 1;
Expand Down Expand Up @@ -1766,6 +1771,11 @@ li.sonm-select-dropdown-menu-item-divider {
color: #ED5B5B;
font-size: 15px;
}
.sonm-alert--info {
z-index: 1;
background-color: #fcf4d1;
font-size: 15px;
}
.sonm-alert--closed {
opacity: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion front/src/app/api/error-messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const messages: IValidation = {
select_file: 'Please select file',
wait_your_tokens: 'SNMT has been successfully delivered from Mars',
give_me_more: 'Give me SONM tokens!',
insufficient_funds: 'Insufficient funds for gas * price + value',
insufficient_funds: 'There is not enough Ether for the transaction',
required_params_missed: 'Required parameter missed',
};

Expand Down
6 changes: 6 additions & 0 deletions front/src/app/components/common/alert/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
font-size: 15px;
}

&--info {
z-index: 1;
background-color: #fcf4d1;
font-size: 15px;
}

&--closed {
opacity: 0;
}
Expand Down
6 changes: 6 additions & 0 deletions front/src/app/components/layouts/account/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
grid-row: 2;
}

&__warning {
margin-bottom: 5px;
font-size: 15px;
font-weight: bold;
}

&__give-me {
grid-row: 4;
grid-column: 1;
Expand Down
1 change: 1 addition & 0 deletions front/src/app/components/layouts/account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ export class Account extends React.Component<IProps, any> {
<Header className="sonm-account__header">
SONM test tokens request
</Header>
<div className="sonm-account__warning">You need test Ether for token request. Get some here - <a href="https://faucet.rinkeby.io/">https://faucet.rinkeby.io/</a></div>
<div className="sonm-account__give-me-ct">
<Input
autoComplete="off"
Expand Down
2 changes: 1 addition & 1 deletion front/src/app/components/layouts/app/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
.sonm-app__row;

flex-grow: 1;
padding: 50px;
padding: 20px 50px 50px 50px;
min-height: 635px;
box-sizing: border-box;
display: flex;
Expand Down
1 change: 1 addition & 0 deletions front/src/app/components/layouts/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export class App extends React.Component<IProps, any> {
}
</div>
<AlertList className="sonm-app__alerts"/>
<div className="sonm-alert sonm-alert--info">Wallet work in testnet! Do not use real keys, Ether or tokens.</div>
<div className="sonm-app__content">
{children}
</div>
Expand Down
9 changes: 3 additions & 6 deletions post-process-bundled-files.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
const fs = require('fs');

let indexFile = fs.readFileSync('./docs/index.html').toString().replace(`<script type="text/javascript" src="style.bundled.js"></script>`, ``);
let indexFile = fs.readFileSync('./dist/index.html').toString().replace(`<script type="text/javascript" src="style.bundled.js"></script>`, ``);

// for (const type of ['app']) {
// //const inline = fs.readFileSync(`./front/dist/${type}.bundled.js`).toString('base64');
// //indexFile = indexFile.replace(`<script type="text/javascript" src="${type}.bundled.js"></script>`, new Buffer(`<script type="text/javascript" src="data:text/javascript;base64,${inline}"></script>`));
//
// const inline = fs.readFileSync(`./front/dist/${type}.bundled.js`).toString();
// const inline = fs.readFileSync(`./dist/${type}.bundled.js`).toString();
// indexFile = indexFile.replace(`<script type="text/javascript" src="${type}.bundled.js"></script>`, `<script type="text/javascript">${inline}</script>`);
//
// console.log(type, inline.length);
// }

fs.writeFileSync('./docs/index.html', indexFile);
fs.writeFileSync('./dist/index.html', indexFile);

0 comments on commit 5f8e548

Please sign in to comment.