From 8f1561dd74f1be6017483046c771ba0b1f94c8a6 Mon Sep 17 00:00:00 2001 From: liangping <18786721@qq.com> Date: Tue, 16 May 2023 16:19:22 +0800 Subject: [PATCH] add uptime overview --- src/modules/[chain]/uptime/favorite.vue | 0 src/modules/[chain]/uptime/index.vue | 33 ++--- src/modules/[chain]/uptime/overview.vue | 188 ++++++++++++++++++++++++ 3 files changed, 201 insertions(+), 20 deletions(-) delete mode 100644 src/modules/[chain]/uptime/favorite.vue create mode 100644 src/modules/[chain]/uptime/overview.vue diff --git a/src/modules/[chain]/uptime/favorite.vue b/src/modules/[chain]/uptime/favorite.vue deleted file mode 100644 index e69de29b..00000000 diff --git a/src/modules/[chain]/uptime/index.vue b/src/modules/[chain]/uptime/index.vue index a86a8f03..45b76c4c 100644 --- a/src/modules/[chain]/uptime/index.vue +++ b/src/modules/[chain]/uptime/index.vue @@ -23,16 +23,6 @@ const commits = ref([] as Commit[]); const keyword = ref(''); const live = ref(true); -// storage local favorite validator ids -const local = ref( - JSON.parse(localStorage.getItem('uptime-validators') || '{}') as Record< - string, - string[] - > -); -const currentPined = local.value[chainStore.chainName] -const selected = ref(currentPined || []); // favorite validators on selected blockchain - const signingInfo = ref({} as Record); // filter validators by keywords @@ -90,10 +80,17 @@ onUnmounted(() => { }); -watchEffect(() => { - local.value[chainStore.chainName] = selected.value; - localStorage.setItem('uptime-validators', JSON.stringify(local.value)); -}); +// watchEffect((x) => { +// const list = selected.value.map(x => { +// const val = stakingStore.validators.find(v => v.operator_address === x) +// return { +// name: val?.description.moniker || "", +// address: x +// } +// }) +// local.value[chainStore.chainName] = list; +// localStorage.setItem('uptime-validators', JSON.stringify(local.value)); +// });