From d618eae5344733e13e7e7ba3e05f32b93434e0f2 Mon Sep 17 00:00:00 2001
From: liangping <18786721@qq.com>
Date: Sat, 13 Nov 2021 17:03:49 +0800
Subject: [PATCH] add pinned mode
---
src/libs/fetch.js | 4 +-
src/router/index.js | 18 +++
src/views/Uptime.vue | 53 ++++++---
src/views/UptimeMyChainBlocks.vue | 182 ++++++++++++++++++++++++++++++
src/views/UptimeMyValidators.vue | 66 +++++++++++
vue.config.js | 2 +-
6 files changed, 305 insertions(+), 20 deletions(-)
create mode 100644 src/views/UptimeMyChainBlocks.vue
create mode 100644 src/views/UptimeMyValidators.vue
diff --git a/src/libs/fetch.js b/src/libs/fetch.js
index 24023de8..3cb6a0b8 100644
--- a/src/libs/fetch.js
+++ b/src/libs/fetch.js
@@ -52,8 +52,8 @@ export default class ChainFetch {
return this.get('/blocks/latest', config).then(data => Block.create(data))
}
- async getBlockByHeight(height) {
- return this.get(`/blocks/${height}`).then(data => Block.create(data))
+ async getBlockByHeight(height, config = null) {
+ return this.get(`/blocks/${height}`, config).then(data => Block.create(data))
}
async getSlashingSigningInfo() {
diff --git a/src/router/index.js b/src/router/index.js
index d4ae821b..b1f25aad 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -126,6 +126,24 @@ const router = new VueRouter({
],
},
},
+ {
+ path: '/:chain/uptime/my',
+ name: 'uptime',
+ component: () => import('@/views/UptimeMyValidators.vue'),
+ meta: {
+ pageTitle: 'Uptime',
+ breadcrumb: [
+ {
+ text: 'Uptime',
+ active: true,
+ },
+ {
+ text: 'My Validators',
+ active: true,
+ },
+ ],
+ },
+ },
{
path: '/:chain/account/:address',
name: 'chain-account',
diff --git a/src/views/Uptime.vue b/src/views/Uptime.vue
index 7ba483f6..3a0db17d 100644
--- a/src/views/Uptime.vue
+++ b/src/views/Uptime.vue
@@ -13,6 +13,12 @@
no-body
class="mb-1"
>
+
+ Browse favourate only
+
- {{ index+1 }} {{ x.validator.moniker }}
-
-
+
{{ index+1 }} {{ x.validator.moniker }}
+
+
+
+ v-b-tooltip.hover.v-second
+ :title="b.height"
+ :class="b.sigs && b.sigs[x.address] ? b.sigs[x.address] : 'bg-light-success'"
+ class="m-auto"
+ >
+
-
+
@@ -52,7 +62,7 @@
+
+
diff --git a/src/views/UptimeMyValidators.vue b/src/views/UptimeMyValidators.vue
new file mode 100644
index 00000000..69da36f6
--- /dev/null
+++ b/src/views/UptimeMyValidators.vue
@@ -0,0 +1,66 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vue.config.js b/vue.config.js
index c58e8a44..22551cf3 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -48,7 +48,7 @@ module.exports = {
devServer: {
proxy: {
'/api': {
- target: 'https://lcd-cosmos.cosmostation.io/',
+ target: 'https://cosmos.api.ping.pub/',
changeOrigin: true,
pathRewrite: {
'^/api': '',