Skip to content

Commit 0728b11

Browse files
committed
chore: upgrade nuxt to v4
Including necessary adaptions
1 parent 7520761 commit 0728b11

30 files changed

+6557
-3038
lines changed

frontend/app.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const exchangeRates = computed(() => latestState.value?.exchange_rates ?? [])
2626
const exchangeRateLengthOnTestNetworks = 1
2727
if (exchangeRates.value.length === exchangeRateLengthOnTestNetworks) {
2828
const { selectedCurrencyMain } = useCurrency()
29-
selectedCurrencyMain.value = exchangeRates.value[0].code as CurrencyCode
29+
selectedCurrencyMain.value = exchangeRates.value[0]?.code as CurrencyCode
3030
}
3131
</script>
3232

frontend/assets/css/prime.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ div.p-checkbox {
241241
}
242242
}
243243

244-
.p-toggleswitch-slider:before {
244+
.p-toggleswitch-handle {
245245
background: var(--switch-slider-color) !important;
246246
width: 20px;
247247
height: 20px;
@@ -251,7 +251,7 @@ div.p-checkbox {
251251
transition-duration: 0.2s;
252252
}
253253

254-
&.p-toggleswitch-checked .p-toggleswitch-slider:before {
254+
&.p-toggleswitch-checked .p-toggleswitch-handle {
255255
transform: translateX(20.6px);
256256
}
257257

frontend/components/bc/PageWrapper.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ defineProps<{
1515
<slot name="banner" />
1616
<main class="content">
1717
<slot name="top" />
18-
<!-- <BcAdControl /> -->
1918
<slot />
2019
<div id="bottom_banner" />
2120
<slot name="bottom" />

frontend/components/bc/ad/AdComponent.vue

Lines changed: 0 additions & 112 deletions
This file was deleted.

frontend/components/bc/ad/AdControl.vue

Lines changed: 0 additions & 27 deletions
This file was deleted.

frontend/components/bc/toggle/SingleBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function onButtonClicked(value: string) {
5959
:icon="button.icon"
6060
:text="button.text"
6161
:sub-text="button.subText"
62-
:selected="values[button.value]"
62+
:selected="values[button.value] ?? false"
6363
:tooltip="button.tooltip"
6464
:disabled="button.disabled"
6565
:class="[layout, button.className]"

frontend/components/dashboard/DashboardControls.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -293,12 +293,12 @@ const deleteAction = async (
293293
}
294294
295295
if ((preferedDashboards?.length ?? 0) > 0) {
296-
setDashboardKey(`${preferedDashboards[0].id}`)
296+
setDashboardKey(`${preferedDashboards[0]?.id}`)
297297
return
298298
}
299299
300300
if ((fallbackDashboards.length ?? 0) > 0) {
301-
await navigateTo(`${fallbackUrl}${fallbackDashboards[0].id}`)
301+
await navigateTo(`${fallbackUrl}${fallbackDashboards[0]?.id}`)
302302
return
303303
}
304304
}

frontend/components/dashboard/DashboardHeader.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ const items = computed<MenuBarEntry[]>(() => {
5454
const count = hasMoreItems && width.value >= 520 ? ` (${items.length})` : ''
5555
buttons.push({
5656
active: !!active,
57-
command: !hasMoreItems ? items[0].command : undefined,
58-
disabledTooltip: !hasMoreItems ? items[0].disabledTooltip : undefined,
57+
command: !hasMoreItems ? items[0]?.command : undefined,
58+
disabledTooltip: !hasMoreItems ? items[0]?.disabledTooltip : undefined,
5959
dropdown: hasMoreItems,
6060
items: hasMoreItems ? items : undefined,
6161
label: label + count,
62-
route: !hasMoreItems ? items[0].route : undefined,
62+
route: !hasMoreItems ? items[0]?.route : undefined,
6363
})
6464
}
6565
}

frontend/components/dashboard/DashboardValidatorManagementModalSearch.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const isLoading = computed(() => status.value === 'pending')
4242
4343
const handleSearch = (input: string) => {
4444
if (!input.length) return
45-
error.value = null
45+
error.value = undefined
4646
execute()
4747
}
4848
const emit = defineEmits<{

frontend/components/dashboard/chart/DashboardChartRewards.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ const getGroupInfo = (series: ChartSeries<number, string>[], currentIndex: numbe
282282
name: groups.value.find(group => group.id === id)?.name ?? '',
283283
value: data[currentIndex] === '0' || data[currentIndex] === null
284284
? '-'
285-
: formatAmount(data[currentIndex], {
285+
: formatAmount(data[currentIndex] ?? '0', {
286286
hasCurrencyDisplay: true,
287287
hasHigherPrecision: true,
288288
hasUnitDisplay: true,
@@ -295,7 +295,7 @@ const getGroupInfo = (series: ChartSeries<number, string>[], currentIndex: numbe
295295
name: groups.value.find(group => group.id === id)?.name ?? '',
296296
value: data[currentIndex] === '0' || data[currentIndex] === null
297297
? '-'
298-
: formatAmount(data[currentIndex], {
298+
: formatAmount(data[currentIndex] ?? '0', {
299299
hasCurrencyDisplay: true,
300300
hasHigherPrecision: true,
301301
hasUnitDisplay: true,
@@ -361,13 +361,13 @@ const option = computed<EChartsOption>(() => {
361361
362362
const paramsConsensusLayer = params.find(param => param.seriesId === seriesId.cl)
363363
const paramsExecutionLayer = params.find(param => param.seriesId === seriesId.el)
364-
const currentIndex = params[0].dataIndex
364+
const currentIndex = params[0]?.dataIndex
365365
const currentEpoch = {
366-
index: params[0].name,
367-
timestamp: Number(params[0].name),
366+
index: params[0]?.name ?? '0',
367+
timestamp: Number(params[0]?.name),
368368
}
369-
const currentGroupTotalCl = clSeriesGroupTotal.value[currentIndex]
370-
const currentGroupTotalEl = elSeriesGroupTotal.value[currentIndex]
369+
const currentGroupTotalCl = clSeriesGroupTotal.value[currentIndex ?? 0]
370+
const currentGroupTotalEl = elSeriesGroupTotal.value[currentIndex ?? 0]
371371
372372
const consensusLayerRewardSum = currentGroupTotalCl === '0'
373373
? '-'
@@ -392,8 +392,8 @@ const option = computed<EChartsOption>(() => {
392392
const executionLayerRewardSumLabel = paramsExecutionLayer?.seriesName ?? ''
393393
394394
const groupInfo = {
395-
cl: getGroupInfo(clSeries.value, currentIndex),
396-
el: getGroupInfo(elSeries.value, currentIndex),
395+
cl: getGroupInfo(clSeries.value, currentIndex ?? 0),
396+
el: getGroupInfo(elSeries.value, currentIndex ?? 0),
397397
}
398398
399399
const d = document.createElement('div')

0 commit comments

Comments
 (0)