Skip to content

Commit 47ceab1

Browse files
authored
Release v1.16.0 Merge pull request #112 from celenium-io/dev
Release v1.16.0
2 parents e269779 + 53e956b commit 47ceab1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+9390
-5636
lines changed

app.vue

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<script setup>
2+
/** Vendor */
3+
import * as Sentry from "@sentry/vue"
4+
25
/** Services */
36
import Socket from "@/services/api/socket"
47
import amp from "@/services/amp"
@@ -47,6 +50,8 @@ onMounted(async () => {
4750
nodeStore.settings = JSON.parse(localStorage.nodeSettings)
4851
}
4952
53+
settingsStore.init()
54+
5055
const runtimeConfig = useRuntimeConfig()
5156
amp.init(runtimeConfig.public.AMP)
5257
@@ -86,6 +91,22 @@ onMounted(async () => {
8691
})
8792
}
8893
94+
if (window.location.hostname !== "localhost") {
95+
Sentry.init({
96+
dsn: "https://[email protected]/12",
97+
integrations: [
98+
Sentry.replayIntegration({
99+
maskAllText: false,
100+
blockAllMedia: false,
101+
}),
102+
],
103+
104+
// Session Replay
105+
replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
106+
replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
107+
})
108+
}
109+
89110
window.onbeforeunload = function () {
90111
Socket.close()
91112
}

assets/icons.json

Lines changed: 4 additions & 0 deletions
Large diffs are not rendered by default.

assets/styles/base.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ $grayscale: (
7373
--logo-name: var(--txt-primary);
7474
--bar-fill: rgb(243, 147, 45);
7575
--validator-active: #85f891;
76-
--validator-inactive: #65c7f8;
76+
--validator-inactive: #1ca7ed;
7777
--validator-jailed: #f8774a;
78-
--supply: #65c7f8;
78+
// --supply: #65c7f8;
79+
--supply: #1ca7ed;
7980
--staking: #85f891;
8081
}
8182

components/AddressBadge.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<script setup>
22
const props = defineProps({
3-
hash: {
4-
type: String,
3+
account: {
4+
type: Object,
55
required: true,
66
},
77
color: {
@@ -13,12 +13,12 @@ const props = defineProps({
1313
const alias = computed(() => {
1414
const { $getDisplayName } = useNuxtApp()
1515
16-
return $getDisplayName('addresses', props.hash)
16+
return $getDisplayName('addresses', "", props.account)
1717
})
1818
</script>
1919

2020
<template>
21-
<NuxtLink :to="`/address/${hash}`" @click.stop>
21+
<NuxtLink :to="`/address/${account.hash}`" @click.stop>
2222
<Flex align="center" gap="6">
2323
<Text size="13" weight="600" :color="color"> {{ alias }} </Text>
2424
</Flex>

components/DatePicker.vue

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
<script setup>
22
/** Vendor */
3-
import { useDebounceFn } from "@vueuse/core"
43
import { DateTime, Info } from "luxon"
54
65
/** Stats Constants */
@@ -129,8 +128,8 @@ const updateSelectedRange = (from, to) => {
129128
}
130129
updateSelectedRange(startDate.value, endDate.value)
131130
132-
const isNextMonthAvailable = computed(() => !(month.value === currentDate.value.month && year.value === currentDate.value.year))
133-
const isPrevMonthAvailable = computed(() => limitMinDate.value ? limitMinDate.value.ts < days.value[0][0].ts : true)
131+
const isNextMonthAvailable = true // computed(() => !(month.value === currentDate.value.month && year.value === currentDate.value.year))
132+
const isPrevMonthAvailable = true // computed(() => limitMinDate.value ? limitMinDate.value.ts < days.value[0][0].ts : true)
134133
const isDayAvailable = (d) => {
135134
if (d.startOf('day').ts > currentDate.value.startOf('day').ts) {
136135
return false
@@ -237,6 +236,10 @@ const handleMonthChange = (v) => {
237236
}
238237
}
239238
239+
const handleYearChange = (v) => {
240+
year.value = year.value + v
241+
}
242+
240243
watch(
241244
() => props.from,
242245
() => {
@@ -299,27 +302,49 @@ watch(
299302
300303
<Flex direction="column" gap="12" :style="popoverStyles.calendar">
301304
<Flex align="center" justify="center" gap="6">
302-
<Icon
303-
@click="handleMonthChange(-1)"
304-
name="chevron"
305-
size="14"
306-
color="tertiary"
307-
class="clickable"
308-
:class="!isPrevMonthAvailable && $style.disabled"
309-
:style="{ transform: 'rotate(90deg)' }"
310-
/>
311-
312-
<Text size="12" color="secondary"> {{ `${DateTime.local(year, month).toFormat('LLLL')} ${year}` }} </Text>
313-
314-
<Icon
315-
@click="handleMonthChange(1)"
316-
name="chevron"
317-
size="14"
318-
color="tertiary"
319-
class="clickable"
320-
:class="!isNextMonthAvailable && $style.disabled"
321-
:style="{ transform: 'rotate(-90deg)' }"
322-
/>
305+
<Flex align="center" justify="between" :style="{width: '160px'}">
306+
<Flex align="center">
307+
<Icon
308+
@click="handleYearChange(-1)"
309+
name="chevron-double-left"
310+
size="14"
311+
color="tertiary"
312+
class="clickable"
313+
:class="!isPrevMonthAvailable && $style.disabled"
314+
/>
315+
<Icon
316+
@click="handleMonthChange(-1)"
317+
name="chevron-left"
318+
size="14"
319+
color="tertiary"
320+
class="clickable"
321+
:class="!isPrevMonthAvailable && $style.disabled"
322+
/>
323+
</Flex>
324+
325+
<Text size="12" color="secondary"> {{ `${DateTime.local(year, month).toFormat('LLLL')} ${year}` }} </Text>
326+
327+
<Flex align="center">
328+
<Icon
329+
@click="handleMonthChange(1)"
330+
name="chevron-left"
331+
size="14"
332+
color="tertiary"
333+
class="clickable"
334+
:class="!isNextMonthAvailable && $style.disabled"
335+
:style="{ transform: 'rotate(180deg)' }"
336+
/>
337+
<Icon
338+
@click="handleYearChange(1)"
339+
name="chevron-double-left"
340+
size="14"
341+
color="tertiary"
342+
class="clickable"
343+
:class="!isNextMonthAvailable && $style.disabled"
344+
:style="{ transform: 'rotate(180deg)' }"
345+
/>
346+
</Flex>
347+
</Flex>
323348
</Flex>
324349
325350
<Flex direction="column" gap="16" wide :class="$style.table">

components/LeftSidebar.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@ const mainLinks = reactive([
5151
{
5252
name: "Active",
5353
path: "/validators?status=active&page=1",
54+
queryParam: {status: "active"},
5455
},
5556
{
5657
name: "Jailed",
5758
path: "/validators?status=jailed&page=1",
59+
queryParam: {status: "jailed"},
5860
},
5961
{
6062
name: "Inactive",
6163
path: "/validators?status=inactive&page=1",
64+
queryParam: {status: "inactive"},
6265
},
6366
],
6467
},
@@ -70,14 +73,17 @@ const mainLinks = reactive([
7073
{
7174
name: "General",
7275
path: "/stats?tab=general",
76+
queryParam: {tab: "general"},
7377
},
7478
{
7579
name: "Blocks",
7680
path: "/stats?tab=blocks",
81+
queryParam: {tab: "blocks"},
7782
},
7883
{
7984
name: "Rollups",
8085
path: "/stats?tab=rollups",
86+
queryParam: {tab: "rollups"},
8187
},
8288
],
8389
},

components/cmd/CommandMenu.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,8 @@ const runBounce = () => {
15521552
scroll-padding: 4px;
15531553
overflow-y: auto;
15541554
1555+
overscroll-behavior: contain;
1556+
15551557
padding-bottom: 4px;
15561558
}
15571559

components/data/LatestPFBTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ isLoading.value = false
106106
<NuxtLink :to="`/tx/${pfb.hash}`">
107107
<Flex align="center" justify="center">
108108
<Text size="12" weight="600" color="primary" class="table_column_alias">
109-
{{ $getDisplayName('addresses', pfb.signers[0]) }}
109+
{{ $getDisplayName('addresses', pfb.signers[0].hash) }}
110110
</Text>
111111
</Flex>
112112
</NuxtLink>

components/data/RecentNamespacesTable.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ const getNamespaces = async () => {
3232
isLoading.value = false
3333
}
3434
35-
getNamespaces()
35+
await getNamespaces()
3636
37-
const handleSort = (by) => {
37+
const handleSort = async (by) => {
3838
switch (sort.dir) {
3939
case "desc":
4040
if (sort.by == by) sort.dir = "asc"
@@ -48,7 +48,7 @@ const handleSort = (by) => {
4848
4949
sort.by = by
5050
51-
getNamespaces()
51+
await getNamespaces()
5252
}
5353
</script>
5454

components/modals/BlobModal.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const props = defineProps({
1919
show: Boolean,
2020
})
2121
22+
const supportedContentTypeForPreview = ["image/png", "image/jpeg", "video/mp4", "text/plain; charset=utf-8"]
23+
2224
const isLoading = ref(true)
2325
const isStopped = ref(false)
2426
const blob = ref({})
@@ -121,12 +123,18 @@ const handleDownload = () => {
121123
.map((e) => parseInt(e, 16)),
122124
)
123125
126+
let extension = "bin"
127+
if (supportedContentTypeForPreview.includes(blob.value?.content_type)) {
128+
const ct = blob.value.content_type.split(";")[0].split("/")[1]
129+
extension = ct === "plain" ? "txt" : ct
130+
}
131+
124132
const a = window.document.createElement("a")
125133
a.href = window.URL.createObjectURL(new Blob([byteArray], { type: "application/octet-stream" }))
126134
a.download = `${getNamespaceID(cacheStore.selectedBlob.namespace_id)}_${cacheStore.selectedBlob.commitment.slice(
127135
cacheStore.selectedBlob.commitment.length - 8,
128136
cacheStore.selectedBlob.commitment.length,
129-
)}.bin`
137+
)}.${extension}`
130138
document.body.appendChild(a)
131139
a.click()
132140
document.body.removeChild(a)
@@ -319,12 +327,12 @@ const handlePreviewContent = () => {
319327
<Text size="12" weight="500" color="tertiary">Signer:</Text>
320328
321329
<Flex align="center" gap="8" :class="$style.value_wrapper">
322-
<CopyButton :text="cacheStore.selectedBlob.signer" />
330+
<CopyButton :text="cacheStore.selectedBlob.signer.hash" />
323331
324-
<NuxtLink :to="`/address/${cacheStore.selectedBlob.signer}`" target="_blank">
332+
<NuxtLink :to="`/address/${cacheStore.selectedBlob.signer.hash}`" target="_blank">
325333
<Flex align="center" gap="6">
326334
<Text size="13" weight="600" color="primary" :class="$style.value">
327-
{{ $getDisplayName("addresses", cacheStore.selectedBlob.signer) }}
335+
{{ $getDisplayName("addresses", "", cacheStore.selectedBlob.signer) }}
328336
</Text>
329337
330338
<Icon name="arrow-narrow-up-right" size="12" color="secondary" />

0 commit comments

Comments
 (0)