diff --git a/client/src/components/BlockInfo.svelte b/client/src/components/BlockInfo.svelte
index 08a4ef4..c91c1bd 100644
--- a/client/src/components/BlockInfo.svelte
+++ b/client/src/components/BlockInfo.svelte
@@ -62,18 +62,24 @@
}
}
+ let transitionDirection
let flyIn
let flyOut
$: {
- if ($blockTransitionDirection && $blockTransitionDirection === 'right') {
+ if (!$blockTransitionDirection || !visible || !block || !$blocksEnabled) {
+ transitionDirection = 'up'
+ flyIn = { y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }
+ flyOut = { y: -50, duration: 2000, easing: linear }
+ } else if ($blockTransitionDirection && $blockTransitionDirection === 'right') {
+ transitionDirection = 'right'
flyIn = { x: 100, easing: linear, delay: 1000, duration: 1000 }
flyOut = { x: -100, easing: linear, delay: 0, duration: 1000 }
} else if ($blockTransitionDirection && $blockTransitionDirection === 'left') {
+ transitionDirection = 'left'
flyIn = { x: -100, easing: linear, delay: 1000, duration: 1000 }
flyOut = { x: 100, easing: linear, delay: 0, duration: 1000 }
} else {
- flyIn = { y: (restoring ? -50 : 50), duration: (restoring ? 500 : 1000), easing: linear, delay: (restoring ? 0 : newBlockDelay) }
- flyOut = { y: -50, duration: 2000, easing: linear }
+ transitionDirection = 'down'
}
}
@@ -155,6 +161,14 @@
}
}
+ .block-info-container {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ }
+
.block-info {
position: absolute;
bottom: calc(100% + 0.25rem);
@@ -319,68 +333,71 @@
}
-{#key block}
- {#if block != null && visible && $blocksEnabled }
-
-
-
-
- {#if block.height == $latestBlockHeight}Latest {/if}Block: { numberFormat.format(block.height) }
-
-
-
- { formatDateTime(block.time) }
- { formattedBlockValue }
-
-
- { formatBytes(block.bytes) }
- { formatCount(block.txnCount) } transactions
-
-
-
- Avg fee rate
- {#if block.fees != null}
- { formatFee(block.avgFeerate) } sats/vbyte
- {:else}
- unavailable
- {/if}
-
-
-
-
- Latest Block: { numberFormat.format(block.height) }
-
-
-
- { formatDateTime(block.time) }
- { formattedBlockValue }
-
-
-
{ formatCount(block.txnCount) } transactions
- {#if block.fees != null}
-
{ formatFee(block.avgFeerate) } sats/vb
- {:else}
+{#key transitionDirection}
+ {#each ((block != null && visible && $blocksEnabled) ? [block] : []) as block (block.id)}
+
+
+
+
+
+ {#if block.height == $latestBlockHeight}Latest {/if}Block: { numberFormat.format(block.height) }
+
+
+
+ { formatDateTime(block.time) }
+ { formattedBlockValue }
+
+
{ formatBytes(block.bytes) }
- {/if}
+ { formatCount(block.txnCount) } transaction{block.txnCount == 1 ? '' : 's'}
+
+
+
+ Avg fee rate
+ {#if block.fees != null}
+ { formatFee(block.avgFeerate) } sats/vbyte
+ {:else}
+ unavailable
+ {/if}
+
-
+
+
+ Latest Block: { numberFormat.format(block.height) }
+
+
+
+ { formatDateTime(block.time) }
+ { formattedBlockValue }
+
+
+ { formatCount(block.txnCount) } transactions
+ {#if block.fees != null}
+ { formatFee(block.avgFeerate) } sats/vb
+ {:else}
+ { formatBytes(block.bytes) }
+ {/if}
+
+
+
+
+ {#if hasPrevBlock }
+
+
+
+ {/if}
+ {#if hasNextBlock }
+
+
+
+ {/if}
+
- {#if hasPrevBlock }
-
-
-
- {/if}
- {#if hasNextBlock }
-
-
-
- {/if}
-
- {/if}
+ {/each}
{/key}
diff --git a/client/src/components/SearchBar.svelte b/client/src/components/SearchBar.svelte
index 68f9e79..cd5cee7 100644
--- a/client/src/components/SearchBar.svelte
+++ b/client/src/components/SearchBar.svelte
@@ -219,7 +219,7 @@ async function searchSubmit (e) {