From 505bc908308d0feb730f9e606fbcb3b92a5795b5 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Fri, 6 Aug 2021 21:21:08 +0800 Subject: [PATCH] Inprove chain home ui --- README.md | 72 ++++++++++++++++++++++++- src/lang/locales/en.json | 1 + src/libs/data/data.js | 13 ++--- src/views/Summary.vue | 51 +++++++++++------- src/views/SummaryParmetersComponent.vue | 49 +++++++++++++++-- 5 files changed, 153 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index 79b8a262..6399e50f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,71 @@ -# Vuexy - Vuejs, React, HTML & Laravel Admin Dashboard Template +# Ping Explorer -**Vuexy – Vuejs, React, HTML & Laravel Admin Dashboard Template** – is the most developer friendly & highly customizable Admin Dashboard Template based on Bootstrap 4, Bootstrap Vue & Reactstrap. +Look is a light explorer for Cosmos-based Blockchains. https://ping.pub . + +## What is the difference between Look and other explorers? + +Look is designed to explore blockchain data as real as possible, therefore there is no cache, no analysis. Look does not cache/save blockchain data on its server. Look only fetch data from Cosmos full node via LCD/RPC endpoints. We call it "Light Explorer". + +## Do you want Look to explore your blockchain? + +If you want Look to explore your blockchain, pull a request [here](https://github.com/liangping/look/issues), We will explore your chains as soon as possibe. And the most important thing is that Look is free for all public cosmos-based blockchains. + +## Why LOOK explorer use official/trusted third party public LCD/rpc server? + +We have two considerations: 1, Trust, In decentralize system, everything controled by one single team/orgnization could be risks. So we decided to co-build LOOK explorer with the community. 2. Look explorer will explose handreds and thousands cosmos-based blockchains in the future, it's impossible for our team to run validators or fullnodes for all of those chains. + +## Contributors + +Developers: @liangping @dingyiming + +Data providers: [full list](https://github.com/ping-pub/look/blob/master/hosts.json) + +* irisnet.org, +* nylira.net, +* kava.io + +*If you don't want to provide data services for LOOK exporer, let us know.* + +## Blockchains on LOOK explorer: +* https://ping.pub/cosmos +* https://ping.pub/iris +* https://ping.pub/akash +* https://ping.pub/kava + +# LOOK 浏览器 + +Look是一个轻浏览器,免费为所有的基于Cosmos-SDK开发的区块链提供浏览服务 + +## Look 和其他区块链浏览器有什么不同? + +Look的设计理念是尽可能的保持数据的真实性,所以,他不会在服务器端缓存或者保存任何数据,也不会增加任何分析处理。它仅仅通过LCD/RPC来获取他所需要的所有数据。因此我们叫它“轻浏览器”。 + +## 你希望Look来浏览你的区块链吗? + +如果你需要Look来浏览你的区块链,请在[这里](https://github.com/liangping/look/issues) 提交申请,我们会尽快开通。而且是免费的。 + +## 为什么LOOK要使用官方或者可信赖的第三方的LCD/RPC服务器? + +我们主要是基于以下两个考虑:1,可信,在去中心化的系统里,任何有一个由单个团队或者实体控制的事情都是有风险的,所以我们选择和社区一起来共建LOOK浏览器。2,LOOK浏览器计划在未来支持成百上千条区块链,因此对我们团队来说,不可能为所有这些链去提供一个验证人节点或者全节点。 + +## 项目贡献者 + +开发者: @liangping @dingyiming + +数据服务方: [列表](https://github.com/ping-pub/look/blob/master/hosts.json) + +* irisnet.org, +* nylira.net, +* 01node.com, +* kava.io + +*如果你觉得我们滥用了你的服务器资源,请告知我们。* + +## LOOK explorer 上的区块链: +* https://ping.pub/cosmos +* https://ping.pub/iris +* https://ping.pub/akash +* https://ping.pub/kava + +# Contact Us +Email:18786721#qq.com \ No newline at end of file diff --git a/src/lang/locales/en.json b/src/lang/locales/en.json index 74159185..b5d41c22 100644 --- a/src/lang/locales/en.json +++ b/src/lang/locales/en.json @@ -7,6 +7,7 @@ "akash": "Akash Decloud", "iris": "Iris Hub", "crypto": "Crypto.com", + "osmosis": "Osmosis", "staking": "Staking", "governance": "Governance", diff --git a/src/libs/data/data.js b/src/libs/data/data.js index 25fbfbe8..a266d42b 100644 --- a/src/libs/data/data.js +++ b/src/libs/data/data.js @@ -39,14 +39,15 @@ export function formatToken(token) { let denom = token.denom.toUpperCase() if (denom.charAt(0) === 'U') { denom = denom.substring(1) + const amount = token.amount / 1000000 + if (amount > 10) { + return `${amount.toFixed()} ${denom}` + } + return `${amount} ${denom}` } - const amount = token.amount / 1000000 - if (amount > 10) { - return `${amount.toFixed()} ${denom}` - } - return `${amount} ${denom}` + return `${token.amount} ${denom}` } - return '' + return token } const COUNT_ABBRS = ['', 'K', 'M', 'B', 'T', 'P', 'E', 'Z', 'Y'] diff --git a/src/views/Summary.vue b/src/views/Summary.vue index f8c623c7..cf569eac 100644 --- a/src/views/Summary.vue +++ b/src/views/Summary.vue @@ -35,7 +35,9 @@