Skip to content

Commit

Permalink
fix: sonar bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
CalicoNino committed Oct 29, 2023
1 parent af6283f commit 3e57cd7
Show file tree
Hide file tree
Showing 16 changed files with 39 additions and 8 deletions.
2 changes: 2 additions & 0 deletions src/components/dynamic/ObjectElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ const props = defineProps(['value']);
<template>
<div class="overflow-auto">
<table class="table table-compact w-full text-sm">
<caption class="hidden">List Table</caption>
<th class="hidden"></th>
<tbody>
<tr v-for="(v, k) of value">
<td
Expand Down
1 change: 1 addition & 0 deletions src/components/dynamic/TxsElement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const chain = useBlockchain();
<template>
<div class="overflow-x-auto mt-4">
<table class="table w-full" density="compact" v-if="txs.length > 0">
<caption class="hidden">Txs</caption>
<thead>
<tr>
<th style="position: relative; z-index: 2;">Hash</th>
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/ChainProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function changeEndpoint(item: Endpoint) {
<div class="dropdown">
<label tabindex="0" class="flex items-center">
<div class="p-1 relative mr-3 cursor-pointer">
<img v-lazy="chainStore.logo" class="w-9 h-9 rounded-full" />
<img v-lazy="chainStore.logo" class="w-9 h-9 rounded-full" alt="chainstore-logo"/>
<div
class="w-2 h-2 rounded-full bg-yes absolute right-0 bottom-0 shadow"
></div>
Expand Down
5 changes: 5 additions & 0 deletions src/layouts/components/DefaultLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function selected(route: any, nav: NavLink) {
v-if="item?.icon?.image"
:src="item?.icon?.image"
class="w-6 h-6 rounded-full mr-3"
alt="icon"
/>
<div
class="text-base capitalize flex-1 text-gray-700 dark:text-gray-200 whitespace-nowrap"
Expand Down Expand Up @@ -150,6 +151,7 @@ function selected(route: any, nav: NavLink) {
<img
v-if="el?.icon?.image"
:src="el?.icon?.image"
alt="el-icon"
class="w-6 h-6 rounded-full mr-3 ml-4 " :class="{
'border border-gray-300 bg-white': selected($route, el),
}"
Expand Down Expand Up @@ -186,6 +188,7 @@ function selected(route: any, nav: NavLink) {
v-if="item?.icon?.image"
:src="item?.icon?.image"
class="w-6 h-6 rounded-full mr-3 border border-blue-100"
alt="listed-icon"
/>
<div
class="text-base capitalize flex-1 text-gray-700 dark:text-gray-200 whitespace-nowrap"
Expand Down Expand Up @@ -219,6 +222,7 @@ function selected(route: any, nav: NavLink) {
>
<img
src="https://ping.pub/logos/osmosis.jpg"
alt="osmosis-logo"
class="w-6 h-6 rounded-full mr-3"
/>
<div
Expand All @@ -235,6 +239,7 @@ function selected(route: any, nav: NavLink) {
>
<img
src="https://becole.com/static/logo/logo_becole.png"
alt="becole-logo"
class="w-6 h-6 rounded-full mr-3"
/>
<div
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/components/NavFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
&copy;&nbsp;
{{ new Date().getFullYear() }}&nbsp;
Made With&nbsp;
<img src="../../assets/images/heart.svg" />&nbsp;
<img alt="footer-logo" src="../../assets/images/heart.svg" />&nbsp;
By&nbsp;
<a
class="link link-primary no-underline"
Expand Down
3 changes: 3 additions & 0 deletions src/modules/[chain]/account/[address].vue
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ function updateEvent() {
</div>
<div class="overflow-x-auto">
<table class="table w-full text-sm table-zebra">
<caption class="hidden">Rewards</caption>
<thead>
<tr>
<th class="py-3">{{ $t('account.validator') }}</th>
Expand Down Expand Up @@ -438,6 +439,7 @@ function updateEvent() {
<h2 class="card-title mb-4">{{ $t('account.unbonding_delegations') }}</h2>
<div class="overflow-x-auto">
<table class="table text-sm w-full">
<caption class="hidden">unbounding Delegations</caption>
<thead>
<tr>
<th class="py-3">{{ $t('account.creation_height') }}</th>
Expand Down Expand Up @@ -497,6 +499,7 @@ function updateEvent() {
<h2 class="card-title mb-4">{{ $t('account.transactions') }}</h2>
<div class="overflow-x-auto">
<table class="table w-full text-sm">
<caption class="hidden">Transactions</caption>
<thead>
<tr>
<th class="py-3">{{ $t('account.height') }}</th>
Expand Down
2 changes: 2 additions & 0 deletions src/modules/[chain]/account/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ function showPubkey(v: any) {
<template>
<div class=" overflow-x-auto">
<table class="table table-compact">
<caption class="hidden">List Table</caption>
<th class="hidden"></th>
<thead>
<tr>
<td>{{ $t('account.type') }}</td>
Expand Down
2 changes: 2 additions & 0 deletions src/modules/[chain]/block/[height].vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ onBeforeRouteUpdate(async (to, from, next) => {
</div>
<div class="pt-10 flex justify-center">
<table class="table w-max rounded-lg bg-base-100">
<caption class="hidden">List Table</caption>
<th class="hidden"></th>
<tbody>
<tr class="hover cursor-pointer" @click="edit = !edit">
<td>{{ $t('block.countdown_for_block') }}:</td>
Expand Down
1 change: 1 addition & 0 deletions src/modules/[chain]/block/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const list = computed(() => {

<div v-show="tab === 'transactions'" class="bg-base-100 rounded overflow-x-auto">
<table class="table w-full table-compact">
<caption class="hidden">Transactions</caption>
<thead class="bg-base-200">
<tr>
<th style="position: relative; z-index: 2;">{{ $t('account.height') }}</th>
Expand Down
1 change: 1 addition & 0 deletions src/modules/[chain]/cosmwasm/[code_id]/contracts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ function showInfo(address: string) {
</h2>
<div class="overflow-x-auto">
<table class="table table-compact w-full mt-4">
<caption class="hidden">Contracts</caption>
<thead>
<tr>
<th style="position: relative; z-index: 2">{{ $t('cosmwasm.contract_list') }}</th>
Expand Down
4 changes: 4 additions & 0 deletions src/modules/[chain]/cosmwasm/[code_id]/transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ const result = ref('');
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
<h2 class="card-title truncate w-full mt-4">Transactions</h2>
<table class="table">
<caption class="hidden">Transactions</caption>
<th class="hidden"></th>
<thead>
<tr>
<td> {{ $t('ibc.height') }}</td>
Expand Down Expand Up @@ -223,6 +225,8 @@ const result = ref('');
</div>
<div class="overflow-auto">
<table class="table table-compact w-full text-sm">
<caption class="hidden">contracts states</caption>
<th class="hidden"></th>
<tr v-for="(v, index) in state.models" :key="index" class="hover">
<td class="" :data-tip="format.hexToString(v.key)">
<span class="font-bold">{{ format.hexToString(v.key) }}</span>
Expand Down
1 change: 1 addition & 0 deletions src/modules/[chain]/cosmwasm/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function myContracts() {
</div>
<div class="overflow-x-auto">
<table class="table table-compact w-full mt-4 text-sm">
<caption class="hidden">contracts</caption>
<thead>
<tr>
<th>{{ $t('cosmwasm.code_id') }}</th>
Expand Down
2 changes: 2 additions & 0 deletions src/modules/[chain]/gov/[proposal_id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,8 @@ function pageload(p: number) {
<h2 class="card-title">{{ $t('gov.votes') }}</h2>
<div class="overflow-x-auto">
<table class="table w-full table-zebra">
<caption class="hidden">Proposals</caption>
<th class="hidden"></th>
<tbody>
<tr v-for="(item, index) of votes" :key="index">
<td class="py-2 text-sm">{{ showValidatorName(item.voter) }}</td>
Expand Down
14 changes: 8 additions & 6 deletions src/modules/[chain]/ibc/connection/[connection_id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ function loadChannel(channel: string, port: string) {
}
function pageload(pageNum: number) {
if (direction.value === 'In') {
fetchSendingTxs(channel_id.value, port_id.value, pageNum -1)
} else {
fetchSendingTxs(channel_id.value, port_id.value, pageNum -1)
}
fetchSendingTxs(channel_id.value, port_id.value, pageNum -1)
}
function fetchSendingTxs(channel: string, port: string, pageNum = 0) {
Expand Down Expand Up @@ -133,6 +128,8 @@ function color(v: string) {
clientState.client_state?.['@type'] }}</span></h2>
<div class="overflow-x-auto grid grid-cols-1 md:grid-cols-2 gap-4">
<table class="table table-sm capitalize">
<caption class="hidden">Connections</caption>
<th class="hidden"></th>
<thead class="bg-base-200">
<tr>
<td colspan="3">{{ $t('ibc.trust_parameters') }}</td>
Expand Down Expand Up @@ -170,6 +167,8 @@ function color(v: string) {
</tbody>
</table>
<table class="table table-sm text-sm w-full capitalize">
<caption class="hidden">Connections</caption>
<th class="hidden"></th>
<thead class="bg-base-200">
<tr>
<td colspan="2">{{ $t('ibc.upgrade_parameters') }}</td>
Expand Down Expand Up @@ -201,6 +200,7 @@ function color(v: string) {
<h2 class="card-title">{{ $t('ibc.channels') }}</h2>
<div class="overflow-auto">
<table class="table w-full mt-4">
<caption class="hidden">Connections</caption>
<thead>
<tr>
<th>{{ $t('ibc.txs') }}</th>
Expand Down Expand Up @@ -277,6 +277,8 @@ function color(v: string) {
<div v-if="channel_id">
<h3 class=" card-title capitalize">Transactions ({{ channel_id }} {{ port_id }} {{ direction }}) </h3>
<table class="table">
<caption class="hidden">Transactions</caption>
<th class="hidden"></th>
<thead>
<tr>
<td> {{ $t('ibc.height') }}</td>
Expand Down
3 changes: 3 additions & 0 deletions src/modules/[chain]/staking/[validator].vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function pageload(p: number) {
v-if="avatars[identity] !== 'undefined'"
v-lazy="logo(identity)"
class="object-contain"
alt="avatar"
/>
<Icon
v-else
Expand Down Expand Up @@ -492,6 +493,7 @@ function pageload(p: number) {
</div>
<div class="rounded overflow-auto">
<table class="table validatore-table w-full">
<caption class="hidden">Validators</caption>
<thead>
<th class="text-left pl-4" style="position: relative; z-index: 2">
{{ $t('account.delegator') }}
Expand All @@ -518,6 +520,7 @@ function pageload(p: number) {
<div class="text-lg mb-4 font-semibold">{{ $t('account.transactions') }}</div>
<div class="rounded overflow-auto">
<table class="table validatore-table w-full">
<caption class="hidden">Validators</caption>
<thead>
<th class="text-left pl-4" style="position: relative; z-index: 2">
{{ $t('account.height') }}
Expand Down
2 changes: 2 additions & 0 deletions src/modules/[chain]/staking/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ loadAvatars();
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
<div class="overflow-x-auto">
<table class="table staking-table w-full">
<caption class="hidden">Validators</caption>
<thead>
<tr>
<th
Expand Down Expand Up @@ -320,6 +321,7 @@ loadAvatars();
v-if="logo"
:src="logo"
class="object-contain"
alt="logo"
/>
<Icon
v-else
Expand Down

0 comments on commit 3e57cd7

Please sign in to comment.