Skip to content

Commit 515d838

Browse files
committed
Merge branch 'master' into dev
2 parents d0dc032 + 99edbf1 commit 515d838

File tree

7 files changed

+66
-31
lines changed

7 files changed

+66
-31
lines changed

components/Feed.vue

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ onMounted(async () => {
6464
<template>
6565
<Flex tag="section" justify="center" wide :class="$style.wrapper">
6666
<Flex align="center" justify="between" gap="24" wide :class="$style.container">
67-
<Flex align="center" gap="8" :class="$style.stats">
67+
<Flex align="center" gap="12" :class="$style.stats">
6868
<template v-if="isMainnet()">
6969
<NuxtLink :to="`/rollup/rank/${topRollup?.slug}`">
7070
<Tooltip>
@@ -101,15 +101,18 @@ onMounted(async () => {
101101
<Flex align="center" gap="6" :class="$style.stat">
102102
<Icon name="tx" size="12" color="secondary" :class="$style.icon" />
103103
<Flex align="center" gap="4">
104-
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Total Txs:</Text>
104+
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Txs:</Text>
105105
106106
<Text v-if="head.total_tx" size="12" weight="600" noWrap :class="$style.value">{{ abbreviate(head.total_tx) }}</Text>
107107
<Skeleton v-else w="40" h="12" />
108108
</Flex>
109109
</Flex>
110110
111111
<template #content>
112-
{{ comma(head.total_tx) }}
112+
<Flex align="center" justify="between" gap="8">
113+
<Text size="12" weight="500" color="tertiary">Total Txs:</Text>
114+
<Text size="12" weight="600" color="secondary"> {{ comma(head.total_tx) }} </Text>
115+
</Flex>
113116
</template>
114117
</Tooltip>
115118
@@ -119,7 +122,7 @@ onMounted(async () => {
119122
<Flex align="center" gap="6" :class="$style.stat">
120123
<Icon name="coins" size="12" color="secondary" :class="$style.icon" />
121124
<Flex align="center" gap="4">
122-
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Total Supply:</Text>
125+
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Supply:</Text>
123126
124127
<Text v-if="head.total_supply" size="12" weight="600" noWrap :class="$style.value">
125128
{{ abbreviate(totalSupply, 2) }} TIA
@@ -128,7 +131,12 @@ onMounted(async () => {
128131
</Flex>
129132
</Flex>
130133
131-
<template #content> {{ abbreviate(totalSupplyUSD, 2) }} USD </template>
134+
<template #content>
135+
<Flex align="center" justify="between" gap="8">
136+
<Text size="12" weight="500" color="tertiary">Total Supply:</Text>
137+
<Text size="12" weight="600" color="secondary"> {{ abbreviate(totalSupplyUSD, 2) }} USD </Text>
138+
</Flex>
139+
</template>
132140
</Tooltip>
133141
134142
<div :class="$style.dot" />
@@ -137,7 +145,7 @@ onMounted(async () => {
137145
<Flex align="center" gap="6" :class="$style.stat">
138146
<Icon name="namespace" size="12" color="secondary" :class="$style.icon" />
139147
<Flex align="center" gap="4">
140-
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Total Blobs Size:</Text>
148+
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Blobs Size:</Text>
141149
142150
<Text v-if="head.total_blobs_size" size="12" weight="600" noWrap :class="$style.value">{{
143151
formatBytes(head.total_blobs_size)
@@ -146,7 +154,12 @@ onMounted(async () => {
146154
</Flex>
147155
</Flex>
148156
149-
<template #content> {{ comma(head.total_blobs_size) }} Bytes</template>
157+
<template #content>
158+
<Flex align="center" justify="between" gap="8">
159+
<Text size="12" weight="500" color="tertiary">Total Blobs Size:</Text>
160+
<Text size="12" weight="600" color="secondary"> {{ comma(head.total_blobs_size) }} Bytes </Text>
161+
</Flex>
162+
</template>
150163
</Tooltip>
151164
152165
<div :class="$style.dot" />
@@ -155,7 +168,7 @@ onMounted(async () => {
155168
<Flex align="center" gap="6" :class="$style.stat">
156169
<Icon name="tag" size="12" color="secondary" :class="$style.icon" />
157170
<Flex align="center" gap="4">
158-
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Total Fees:</Text>
171+
<Text size="12" weight="500" color="tertiary" noWrap :class="$style.key">Fees:</Text>
159172
160173
<Text v-if="head.total_fee" size="12" weight="600" noWrap :class="$style.value">
161174
{{ abbreviate(parseInt(totalFees)) }} TIA
@@ -164,7 +177,12 @@ onMounted(async () => {
164177
</Flex>
165178
</Flex>
166179
167-
<template #content> {{ abbreviate(totalFeesUSD) }} USD </template>
180+
<template #content>
181+
<Flex align="center" justify="between" gap="8">
182+
<Text size="12" weight="500" color="tertiary">Total Fees:</Text>
183+
<Text size="12" weight="600" color="secondary"> {{ abbreviate(totalFeesUSD) }} USD </Text>
184+
</Flex>
185+
</template>
168186
</Tooltip>
169187
</Flex>
170188

components/modals/BlobModal.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const getBlobMetadata = async () => {
7474
notFound.value = true
7575
}
7676
77-
isLoading.value = false
77+
// isLoading.value = false
7878
}
7979
8080
watch(
@@ -113,6 +113,8 @@ watch(
113113
showPreviewText.value = false
114114
contentPreviewText.value = ""
115115
}
116+
117+
isLoading.value = false
116118
},
117119
)
118120
@@ -165,7 +167,7 @@ const handlePreviewContent = () => {
165167
} else {
166168
if (!showPreviewText.value) {
167169
showPreviewText.value = true
168-
contentPreviewText.value = blob.value.data
170+
contentPreviewText.value = atob(blob.value.data)
169171
} else {
170172
showPreviewText.value = false
171173
contentPreviewText.value = ""

components/modals/RollupRankModal.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ const metrics = ref([
3838
{
3939
key: "commits_weekly",
4040
name: "Weekly commits",
41-
coefficient: 0.2,
41+
coefficient: 0.1,
4242
type: "Quantitative",
4343
},
4444
{
4545
key: "last_pushed_at",
4646
name: "Last pushed",
47-
coefficient: 0.2,
47+
coefficient: 0.1,
4848
type: "Time-Based",
4949
},
5050
])

pages/faucet.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const isLoading = ref(false)
7272
const address = ref("")
7373
const account = ref()
7474
const networks = ["Mocha", "Arabica", "Mammoth"]
75-
const network = ref(networks.find(n => n === getNetworkName()) || networks[0].toLowerCase())
75+
const network = ref((networks.find(n => n === getNetworkName()) || networks[0]).toLowerCase())
7676
7777
const isNetworkSelectorOpen = ref(false)
7878
const fetchAccount = async() => {
@@ -336,7 +336,7 @@ onMounted(() => {
336336
:loading="isLoading"
337337
:disabled="validation.type === 'error' || !address"
338338
>
339-
Recieve 1 TIA
339+
{{ `Recieve ${network === 'mammoth' ? 100 : 1} TIA` }}
340340
</Button>
341341
</Flex>
342342
</Flex>
@@ -476,7 +476,7 @@ onMounted(() => {
476476
477477
<Flex id="2" :class="[$style.answer, openedQuestion === 2 && $style.answer_extended]">
478478
<Text size="13" weight="500" color="tertiary" height="160">
479-
You can request testnet tokens by entering your Celestia testnet address, and clicking the "Received 1 TIA" button. Tokens will be sent to your wallet within a few moments.
479+
{{ `You can request testnet tokens by entering your Celestia testnet address, and clicking the "Receive ${network === 'mammoth' ? 100 : 1} TIA" button. Tokens will be sent to your wallet within a few moments.` }}
480480
</Text>
481481
</Flex>
482482
@@ -497,7 +497,7 @@ onMounted(() => {
497497
<Flex id="3" :class="[$style.answer, openedQuestion === 3 && $style.answer_extended]">
498498
<Text size="13" weight="500" color="tertiary" height="160">
499499
To ensure fair distribution and prevent abuse, the faucet has the following limitations:<br>
500-
&nbsp;&nbsp;• You can receive <b>1 TIA per request</b>.<br>
500+
&nbsp;&nbsp;• You can receive <b>100 TIA for Mammoth network and 1 TIA for other testnets per request</b>.<br>
501501
&nbsp;&nbsp;• You can request tokens <b>only once per hour</b> per <b>IP address or wallet address</b>.<br>
502502
&nbsp;&nbsp;• If you reach the limit, you will need to wait before requesting again.
503503
</Text>

pages/rollup/rank/[slug].vue

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const rollupRanking = computed(() => {
6565
const category = getMetricCategory(key, value / 100)
6666
ranking[key] = { category, score: value }
6767
68+
if (category.name.toLowerCase() === "offline") continue
69+
6870
description.push({
6971
text: getMetricDescription(key),
7072
category,
@@ -77,11 +79,20 @@ const rollupRanking = computed(() => {
7779
score: rawRanking.rank,
7880
}
7981
80-
description = sortArrayOfObjects(description, "category.rank", false).slice(0, 3)
81-
description[0].text += ", "
82-
description[1].text += " and "
83-
description[2].text += "."
84-
82+
if (description.length) {
83+
description = sortArrayOfObjects(description, "category.rank", false).slice(0, Math.min(3, description.length))
84+
if (description[2]?.text) {
85+
description[0].text += ", "
86+
description[1].text += " and "
87+
description[2].text += "."
88+
} else if (description[1]?.text) {
89+
description[0].text += " and "
90+
description[1].text += "."
91+
} else {
92+
description[0].text += "."
93+
}
94+
}
95+
8596
return {
8697
...rollupRaw,
8798
ranking,
@@ -423,7 +434,7 @@ onMounted(() => {
423434
</Flex>
424435
</Flex>
425436
426-
<Text size="13" color="primary" weight="600" :style="{ lineHeight: '1.4' }">
437+
<Text v-if="rollupRanking?.description.length" size="13" color="primary" weight="600" :style="{ lineHeight: '1.4' }">
427438
{{ rollup.name }}
428439
<Text weight="500" color="secondary">shows the </Text>
429440
<span v-for="d in rollupRanking?.description">
@@ -433,6 +444,10 @@ onMounted(() => {
433444
<Text weight="500" color="secondary"> {{ d.text }} </Text>
434445
</span>
435446
</Text>
447+
<Text v-else size="13" color="primary" weight="600" :style="{ lineHeight: '1.4' }">
448+
{{ rollup.name }}
449+
<Text weight="500" color="secondary"> is possible offline. </Text>
450+
</Text>
436451
</Flex>
437452
<div :class="$style.divider" />
438453
@@ -668,10 +683,10 @@ onMounted(() => {
668683
.good {
669684
background-image: linear-gradient(var(--blue), var(--rare));
670685
}
671-
.poor {
686+
.normal {
672687
background-image: linear-gradient(var(--txt-primary), var(--txt-tertiary));
673688
}
674-
.bad {
689+
.offline {
675690
background-image: linear-gradient(var(--txt-tertiary), var(--txt-tertiary));
676691
}
677692

services/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export const useServerURL = () => {
4242
return Server.API.dev
4343

4444
default:
45-
return Server.API.arabica
45+
return Server.API.dev
4646
}
4747
}
4848

@@ -69,7 +69,7 @@ export const useSocketURL = () => {
6969
return Server.WSS.dev
7070

7171
default:
72-
return Server.WSS.arabica
72+
return Server.WSS.dev
7373
}
7474
}
7575

services/constants/rollups.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ export const rankCoefficients = {
88
day_blobs_count: 0.2,
99
avg_pfb_size: 0.3,
1010
last_message_time: 0.3,
11-
commits_weekly: 0.2,
12-
last_pushed_at: 0.2,
11+
commits_weekly: 0.1,
12+
last_pushed_at: 0.1,
1313
}
1414

1515
export const rankCategories = [
1616
{ min: 9, max: 10, name: "Legendary", color: "legendary" },
1717
{ min: 6, max: 8, name: "Epic", color: "epic" },
1818
{ min: 3, max: 5, name: "Good", color: "rare" },
19-
{ min: 1, max: 2, name: "Poor", color: "primary" },
20-
{ min: 0, max: 1, name: "Bad", color: "tertiary" },
19+
{ min: 1, max: 2, name: "Normal", color: "primary" },
20+
{ min: 0, max: 1, name: "Offline", color: "tertiary" },
2121
]
2222

2323
export const getRankCategory = (rank) => {

0 commit comments

Comments
 (0)