Skip to content

Commit

Permalink
- fix whitescreen (after invalid nodes)
Browse files Browse the repository at this point in the history
- fix translates for listing
- add Infrastructure API nodes
-  add PRIZM to listing page
- fix some mobile views issues
  • Loading branch information
serdrdoor committed Mar 18, 2020
1 parent 5927843 commit aa41f8a
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 41 deletions.
21 changes: 21 additions & 0 deletions app/api/apiConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,27 @@ export const settingsAPIs = {
operator: "Witness: delegate-zhaomu",
contact: "telegram:lzmlam;wechat:lzmlam"
},
{
url: "wss://eu.nodes.bitshares.ws",
region: "Western Europe",
country: "Germany",
operator: "Infrastructure Worker",
contact: "email:[email protected]"
},
{
url: "wss://us.nodes.bitshares.ws",
region: "Northern America",
country: "U.S.A.",
operator: "Infrastructure Worker",
contact: "email:[email protected]"
},
{
url: "wss://hk.nodes.bitshares.ws",
region: "Eastern Asia",
country: "Hong Kong",
operator: "Infrastructure Worker",
contact: "email:[email protected]"
},
{
url: "wss://api.bts.mobi/ws",
region: "Northern America",
Expand Down
2 changes: 2 additions & 0 deletions app/assets/coins-logo/coins.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ require("file-loader?name=coins-logo/[name].png!./neo.png");
require("file-loader?name=coins-logo/[name].png!./ltc.png");
require("file-loader?name=coins-logo/[name].png!./doge.png");
require("file-loader?name=coins-logo/[name].png!./dash.png");

require("file-loader?name=coins-logo/[name].png!./pzm.png");
Binary file added app/assets/coins-logo/pzm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/assets/locales/locale-en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3005,6 +3005,7 @@
"progress": "Progress",
"coming_soon": "Coming soon",
"collecting": "Collecting",
"waiting": "Waiting",
"done": "Collected"
},
"texts": {
Expand Down
1 change: 1 addition & 0 deletions app/assets/locales/locale-ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -2984,6 +2984,7 @@
"progress": "Прогресс",
"coming_soon": "Скоро",
"collecting": "Cбор",
"waiting": "Ожидание",
"done": "Собрано"
},
"texts": {
Expand Down
7 changes: 7 additions & 0 deletions app/assets/stylesheets/themes/_theme-template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2790,6 +2790,13 @@
.app-menu {
flex: 0;
}

@media only screen and (max-width: 768px) {
.app-menu.hidez {
display: none;
}
}

.truncated {
flex: 1;
min-width: 0; /* or some value */
Expand Down
7 changes: 7 additions & 0 deletions app/branding.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,13 @@ export function getListingCoins() {
account: "rudex-neo",
goal: 10000,
votes: 0
},
{
name: "PRIZM",
ticker: "PZM",
account: "rudex-prizm",
goal: 10000,
votes: 0
}
];
}
2 changes: 1 addition & 1 deletion app/components/Layout/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ class Header extends React.Component {
)}
</div>

<div className="app-menu">
<div className="app-menu hidez">
<div
onClick={this._toggleLanguageMenu}
style={{padding: "1.25rem", border: "none"}}
Expand Down
86 changes: 49 additions & 37 deletions app/components/Listing/CoinCardListing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class CoinCardListing extends React.Component {
this.props.account.get("name");
} catch (e) {}

let {coin} = this.props;

return (
<div className="listingTable__row">
<SendModal
Expand All @@ -48,13 +50,9 @@ class CoinCardListing extends React.Component {
? this.props.currentAccount
: this.props.account
}
to_name={
this.props.coin.account
? this.props.coin.account
: from_name
}
to_name={coin.account ? coin.account : from_name}
asset_id={"1.3.5588"}
ticker={this.props.coin.ticker}
ticker={coin.ticker}
/>
<div className="listingAsset">
<div className="listingAssetCard">
Expand All @@ -65,13 +63,13 @@ class CoinCardListing extends React.Component {
<img
className="align-center"
style={{maxWidth: 40}}
src={`${__BASE_URL__}coins-logo/${this.props.coin.ticker.toLowerCase()}.png`}
src={`${__BASE_URL__}coins-logo/${coin.ticker.toLowerCase()}.png`}
alt=""
/>
</div>
<div className="listingTable__cell listingTableAssetName align-left nowrap">
{this.props.coin.name} ({this.props.coin.ticker})
{this.props.coin.soon === true ? (
{coin.name} ({coin.ticker})
{coin.soon === true ? (
<Translate
content="listing.table.coming_soon"
style={{float: "right", color: "gold"}}
Expand All @@ -86,51 +84,65 @@ class CoinCardListing extends React.Component {
<div className="listingAssetInfoData">
<div className="listingTable__cell listingTableGoal">
<div className="listingAssetInfoBlock">
Goal:&nbsp;{" "}
<Translate content="listing.table.goal" />
:&nbsp;{" "}
</div>
{this.props.coin.goal}
{coin.goal}
</div>

<div className="listingTable__cell listingTableVotes">
<div className="listingAssetInfoBlock">
Donates:&nbsp;
<Translate content="listing.table.donates" />
:&nbsp;
</div>
{this.props.coin.votes}
<a
onClick={this.triggerSend.bind(
this,
"1.3.5588",
this.props.coin
)}
>
{
<Icon
name="transfer"
title="icons.transfer"
className="icon-14px"
/>
}
&nbsp; Donate
</a>
{coin.votes}
{coin.soon === true ? (
<a className="coin-soon">
{
<Icon
name="transfer"
title="icons.transfer"
className="icon-14px"
/>
}
&nbsp; Donate
</a>
) : (
<a
onClick={this.triggerSend.bind(
this,
"1.3.5588",
coin
)}
>
{
<Icon
name="transfer"
title="icons.transfer"
className="icon-14px"
/>
}
&nbsp; Donate
</a>
)}
</div>

<div className="listingTable__cell listingTableStatus">
<div className="listingAssetInfoBlock">
Status:&nbsp;{" "}
<Translate content="listing.table.status" />
:&nbsp;{" "}
</div>
{this.props.coin.status === "collecting" ? (
<Translate content="listing.table.collecting" />
) : (
<Translate content="listing.table.done" />
)}
<Translate
content={"listing.table." + coin.status}
/>
</div>
</div>

<div className="listingTable__cell listingTableProgress">
{
<DonutChart
votes={this.props.coin.votes_for_percent}
goal={this.props.coin.goal}
votes={coin.votes_for_percent}
goal={coin.goal}
/>
}
</div>
Expand Down
12 changes: 12 additions & 0 deletions app/components/Listing/ListingPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,18 @@ body .listing_button .ant-btn[disabled]:hover {
border-radius: 3px;
}

@media only screen and (max-width: 768px) {
.listingTable__cell.listingTableVotes a {
position: absolute;
right: 100px;
}
}

.coin-soon {
border: 1px solid grey !important;
color: grey !important;
}

.listingTable__cell.listingTableVotes a:hover {
border-color: #1652f0;
}
1 change: 1 addition & 0 deletions app/components/Listing/ListingPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ class ListingPage extends React.Component {
coin.votes_for_percent =
coin.votes < coin.goal ? coin.votes : coin.goal;
coin.status = coin.votes < coin.goal ? "collecting" : "done";
coin.soon == true ? (coin.status = "waiting") : coin.soon;
return <CoinCardListing key={i} rank={i + 1} coin={coin} />;
});
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/Settings/AccessSettings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import Icon from "../Icon/Icon";
import LoadingButton from "../Utility/LoadingButton";
import {Switch, Button} from "bitshares-ui-style-guide";
import NodeSelector from "../Utility/NodeSelector";

import counterpart from "counterpart";
const autoSelectionUrl = "wss://fake.automatic-selection.com";

function isTestNet(url) {
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "RuDEX3-light",
"version": "3.3.200315",
"version": "3.3.200318",
"description": "Reference UI to showcase all features of the BitShares blockchain.",
"homepage": "https://github.com/bitshares/bitshares-ui",
"author": "BitShares UI Worker <[email protected]>",
Expand Down

0 comments on commit aa41f8a

Please sign in to comment.