Skip to content

Commit bcd2bdc

Browse files
committed
Search on enter. Dockerfile
1 parent f79a8af commit bcd2bdc

9 files changed

Lines changed: 93 additions & 28 deletions

File tree

.dockerignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
.github
2+
.git
3+
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
pnpm-debug.log*
10+
lerna-debug.log*
11+
12+
node_modules
13+
.DS_Store
14+
dist
15+
dist-ssr
16+
coverage
17+
*.local
18+
19+
/cypress/videos/
20+
/cypress/screenshots/
21+
22+
.vscode
23+
.vscode/*
24+
!.vscode/extensions.json
25+
.idea
26+
*.suo
27+
*.ntvs*
28+
*.njsproj
29+
*.sln
30+
*.sw?
31+
32+
*.tsbuildinfo
33+
*.patch
34+
35+
/patches_history
36+
build_*
37+
releases.json
38+
docker-compose-tmp.yml

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ coverage
3131
*.patch
3232

3333
/patches_history
34+
# DAppNodeSDK release directories
35+
build_*
36+
releases.json
37+
docker-compose-tmp.yml

Dockerfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM node:22.17.0-alpine3.21
2+
3+
WORKDIR /app
4+
5+
RUN apk add --no-cache python3
6+
7+
COPY package*.json .
8+
9+
RUN npm ci
10+
11+
COPY . .
12+
13+
RUN npm run build
14+
15+
CMD ["sh", "-c", "cd dist && python3 -m http.server 80"]

src/assets/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
content: '🗑️';
198198
}
199199
.bi-copy:before {
200-
content: '©';
200+
content: '📋';
201201
}
202202
.bi-file-earmark-text:before {
203203
content: '📃';

src/components/Search.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const clearWarning = () => {
8080
class="text-input"
8181
type="text"
8282
v-model.trim="search"
83+
@keyup.enter="handleSearch"
8384
placeholder="Search addresses, transactions, blocks"
8485
/>
8586
<div class="dropdown">

src/components/address-view/FavoritesList.vue

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import type { FavoriteAddress } from '@/types';
3-
import { fromWeiToEth, shortenFavAddr } from '@/utils/utils';
3+
import { fromWeiToEth, shortenFavAddr, handleClickCopyIcon } from '@/utils/utils';
44
55
const emit = defineEmits(['deleteFavorite']);
66
@@ -11,17 +11,6 @@ defineProps<{
1111
const handleDeleteFavorite = (address: string) => {
1212
emit('deleteFavorite', address);
1313
};
14-
15-
const handleCopy = (event: Event, text: string) => {
16-
const target = event.target as HTMLElement;
17-
target.classList.remove('bi-copy');
18-
target.classList.add('bi-check2');
19-
navigator.clipboard.writeText(text);
20-
setTimeout(() => {
21-
target.classList.add('bi-copy');
22-
target.classList.remove('bi-check2');
23-
}, 2000);
24-
};
2514
</script>
2615

2716
<template>
@@ -32,7 +21,7 @@ const handleCopy = (event: Event, text: string) => {
3221
{{ shortenFavAddr(fav.address) }}
3322
</RouterLink>
3423
<i
35-
@click="(e: Event) => handleCopy(e, fav.address)"
24+
@click="(e: Event) => handleClickCopyIcon(e, fav.address)"
3625
class="txn-hash-copy-icon bi bi-copy"
3726
></i>
3827
<!-- <span v-if="fav.type === 'contract'">(contract)</span> -->
@@ -99,6 +88,7 @@ const handleCopy = (event: Event, text: string) => {
9988
.txn-hash-copy-icon {
10089
font-size: 16px;
10190
cursor: pointer;
91+
font-style: normal;
10292
}
10393
10494
.balance-trash {
@@ -135,6 +125,10 @@ const handleCopy = (event: Event, text: string) => {
135125
color: var(--red-darker);
136126
}
137127
128+
.delete-icon i {
129+
font-style: normal;
130+
}
131+
138132
.delete-btn {
139133
cursor: pointer;
140134
color: var(--btn-red);

src/components/address-view/TransactionsListItem.vue

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { watchEffect, ref, computed } from 'vue';
3-
import { shortenTx } from '@/utils/utils';
3+
import { shortenTx, handleClickCopyIcon } from '@/utils/utils';
44
import type { TransactionListItem } from '@/types';
55
import TransactionListItemFromTo from '@/components/address-view/TransactionListItemFromTo.vue';
66
@@ -18,17 +18,6 @@ const isFirstTxnValue = computed(() => {
1818
watchEffect(() => {
1919
txns.value = props.transactions;
2020
});
21-
22-
const handleCopy = (event: Event, text: string) => {
23-
const target = event.target as HTMLElement;
24-
target.classList.remove('bi-copy');
25-
target.classList.add('bi-check2');
26-
navigator.clipboard.writeText(text);
27-
setTimeout(() => {
28-
target.classList.add('bi-copy');
29-
target.classList.remove('bi-check2');
30-
}, 2000);
31-
};
3221
</script>
3322

3423
<template>
@@ -46,7 +35,7 @@ const handleCopy = (event: Event, text: string) => {
4635
{{ shortenTx(txns[0].hash) }}
4736
</RouterLink>
4837
<i
49-
@click="(e: Event) => handleCopy(e, txns[0].hash)"
38+
@click="(e: Event) => handleClickCopyIcon(e, txns[0].hash)"
5039
class="txn-hash-copy-icon bi bi-copy"
5140
></i>
5241
</span>
@@ -139,6 +128,7 @@ const handleCopy = (event: Event, text: string) => {
139128
.txn-hash-copy-icon {
140129
font-size: 16px;
141130
cursor: pointer;
131+
font-style: normal;
142132
}
143133
144134
.txns-list {

src/utils/utils.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ export const getChainIdName = (netId: string) => {
4444
}
4545
};
4646

47+
export const handleClickCopyIcon = (event: Event, text: string) => {
48+
const target = event.target as HTMLElement;
49+
target.classList.remove('bi-copy');
50+
target.classList.add('bi-check2');
51+
navigator.clipboard.writeText(text);
52+
setTimeout(() => {
53+
target.classList.add('bi-copy');
54+
target.classList.remove('bi-check2');
55+
}, 2000);
56+
};
57+
4758
export const shortenFavAddr = (address: string | null) => {
4859
if (!address?.length) {
4960
return '-';

src/views/TransactionView.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
shortenAddr,
1111
getTransferValue,
1212
fromWeiToEth,
13+
fromWeiToGwei,
1314
concatTransfers,
1415
roundToTwo,
1516
} from '@/utils/utils';
@@ -51,6 +52,7 @@ const value = ref(0);
5152
const type = ref('');
5253
const nonce = ref(0);
5354
const transactionIndex = ref(0);
55+
const gasPrice = ref(0n);
5456
const gasUsed = ref(0n);
5557
const gasLimit = ref(0n);
5658
const input = ref('');
@@ -110,6 +112,7 @@ const mount = async (tx: string) => {
110112
// @ts-ignore
111113
nonce.value = txn.info.nonce;
112114
transactionIndex.value = txn.info.transactionIndex;
115+
gasPrice.value = txn.info.gasPrice;
113116
gasUsed.value = txn.receipt.gasUsed;
114117
gasLimit.value = txn.info.gas;
115118
input.value = txn.info.input;
@@ -283,6 +286,13 @@ const mount = async (tx: string) => {
283286
</div>
284287
</div>
285288

289+
<div class="field">
290+
<div class="field-title">Gas Price:</div>
291+
<div v-if="!isLoadingTxnBaseInfo" class="eth-value">
292+
{{ fromWeiToGwei(gasPrice, 9) }} Gwei ({{ fromWeiToEth(gasPrice, 18) }} ETH)
293+
</div>
294+
</div>
295+
286296
<div class="field">
287297
<div class="field-title">Gas Used & Limit:</div>
288298
<div class="eth-value" v-if="!isLoadingTxnBaseInfo">
@@ -356,7 +366,7 @@ const mount = async (tx: string) => {
356366
</div>
357367
</div>
358368
</div>
359-
<div v-else>-</div>
369+
<div v-else>No logs for this transactions.</div>
360370
</div>
361371
</div>
362372
</template>
@@ -380,11 +390,13 @@ const mount = async (tx: string) => {
380390
.log-data {
381391
overflow-y: scroll;
382392
max-height: 103px;
393+
padding-right: 7px;
383394
}
384395
385396
.input-data {
386397
overflow-y: scroll;
387398
max-height: 130px;
399+
padding-right: 7px;
388400
}
389401
390402
.header {

0 commit comments

Comments
 (0)