@@ -177,7 +167,7 @@
:has-more-results="data.search.modules.pageInfo.hasNextPage"
>
@@ -189,10 +179,7 @@
Age
-
+
{{ convertTimestampToRelative(module.blockSlotTime, NOW) }}
@@ -262,14 +249,11 @@ import BakerLink from '~/components/molecules/BakerLink.vue'
import AccountLink from '~/components/molecules/AccountLink.vue'
import ContractLink from '~/components/molecules/ContractLink.vue'
import { useDateNow } from '~/composables/useDateNow'
-import type { Position } from '~/composables/useTooltip'
import NodeLink from '~/components/molecules/NodeLink.vue'
const { NOW } = useDateNow()
const drawer = useDrawer()
-const tooltipPositionBottom = 'bottom' as Position
-const tooltipPositionTop = 'top' as Position
const searchValue = ref('')
const delayedSearchValue = ref('')
const isMaskVisible = ref(false)
@@ -362,10 +346,6 @@ const lostFocusOnSearch = (x: FocusEvent) => {
}, 100)
}
-const getTooltipPosition = (index: number) => {
- return index === 0 ? tooltipPositionBottom : tooltipPositionTop
-}
-
const resultCount = computed(() => ({
modules: data.value?.search.modules.nodes.length,
contracts: data.value?.search.contracts.nodes.length,
diff --git a/frontend/src/components/atoms/InfoTooltip.vue b/frontend/src/components/atoms/InfoTooltip.vue
index 45ecf7272..a4e5e51f1 100644
--- a/frontend/src/components/atoms/InfoTooltip.vue
+++ b/frontend/src/components/atoms/InfoTooltip.vue
@@ -1,12 +1,24 @@
-
-
+
+
@@ -16,10 +28,9 @@
import Tooltip from '~~/src/components/atoms/Tooltip.vue'
type Props = {
- text: string
+ text: string
}
-defineProps();
-
+defineProps()
diff --git a/frontend/src/components/atoms/Validation.vue b/frontend/src/components/atoms/Validation.vue
index 88c62521b..8d18442ce 100644
--- a/frontend/src/components/atoms/Validation.vue
+++ b/frontend/src/components/atoms/Validation.vue
@@ -1,60 +1,44 @@
-
+
- {{ text }}
+ {{ text }}
diff --git a/frontend/src/composables/useTooltip.ts b/frontend/src/composables/useTooltip.ts
index d647f7986..6fbe016fa 100644
--- a/frontend/src/composables/useTooltip.ts
+++ b/frontend/src/composables/useTooltip.ts
@@ -1,61 +1,41 @@
import { ref } from 'vue'
-export type Position = 'top' | 'bottom'
-
/**
* Hook to control tooltip position values
* Returns CSS values for triangle position, tooltip position and animation
*/
-export const useTooltip = (
- position: Position = 'top',
- xOverride?: string,
- yOverride?: string
-) => {
+export const useTooltip = (xOverride?: string, yOverride?: string) => {
const TOOLTIP_OFFSET = 10
// Drawing of the triangle
- const triangleTopBorder = position === 'top' ? `${TOOLTIP_OFFSET}px` : 'unset'
- const triangleBottomBorder =
- position === 'bottom' ? `${TOOLTIP_OFFSET}px` : 'unset'
+ const triangleBottomBorder = `${TOOLTIP_OFFSET}px`
// Positioning of the triangle
- const trianglePosTop = position === 'top' ? '100%' : `-${TOOLTIP_OFFSET}px`
+ const trianglePosTop = `-${TOOLTIP_OFFSET}px`
// Positioning of the tooltip
const tooltipX = ref('0px')
const tooltipY = ref('0px')
-
- // Animation values of the tooltip
- const tooltipTransformYFrom =
- position === 'top' ? `-100%` : `100% - ${1 * TOOLTIP_OFFSET}px`
- const tooltipTransformYTo =
- position === 'top'
- ? `-100% - ${0.5 * TOOLTIP_OFFSET}px`
- : `100% - ${0.5 * TOOLTIP_OFFSET}px`
-
+ const triangleShift = ref('0px')
const calculateCoordinates = (event: MouseEvent) => {
// compiler does not know if this is e.g. a SVGElement, on which `target` does not exist
const target = event.target as HTMLSpanElement
const { x, y } = target.getBoundingClientRect()
- tooltipX.value = xOverride || x + 0.5 * target.offsetWidth + 'px'
+ tooltipX.value = xOverride || x + 'px'
+ triangleShift.value = 10 + 'px'
tooltipY.value =
- yOverride ||
- (position === 'top'
- ? y - 0.5 * target.offsetHeight + TOOLTIP_OFFSET + 'px'
- : y + 0.5 * target.offsetHeight - TOOLTIP_OFFSET + 'px')
+ yOverride || y + target.offsetHeight + TOOLTIP_OFFSET + 'px'
}
return {
- triangleTopBorder,
triangleBottomBorder,
trianglePosTop,
+ triangleShift,
tooltipX,
tooltipY,
- tooltipTransformYFrom,
- tooltipTransformYTo,
calculateCoordinates,
}
}
From e7e303c1496d84d281b89b92aaf9ff1c62233e3b Mon Sep 17 00:00:00 2001
From: schwartz-concordium
<132270889+schwartz-concordium@users.noreply.github.com>
Date: Wed, 6 Dec 2023 15:49:13 +0100
Subject: [PATCH 4/6] remove unused
---
frontend/src/composables/useTooltip.ts | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/frontend/src/composables/useTooltip.ts b/frontend/src/composables/useTooltip.ts
index 6fbe016fa..7026d0c93 100644
--- a/frontend/src/composables/useTooltip.ts
+++ b/frontend/src/composables/useTooltip.ts
@@ -4,7 +4,7 @@ import { ref } from 'vue'
* Hook to control tooltip position values
* Returns CSS values for triangle position, tooltip position and animation
*/
-export const useTooltip = (xOverride?: string, yOverride?: string) => {
+export const useTooltip = () => {
const TOOLTIP_OFFSET = 10
// Drawing of the triangle
@@ -23,11 +23,10 @@ export const useTooltip = (xOverride?: string, yOverride?: string) => {
const { x, y } = target.getBoundingClientRect()
- tooltipX.value = xOverride || x + 'px'
+ tooltipX.value = x + 'px'
triangleShift.value = 10 + 'px'
- tooltipY.value =
- yOverride || y + target.offsetHeight + TOOLTIP_OFFSET + 'px'
+ tooltipY.value = y + target.offsetHeight + TOOLTIP_OFFSET + 'px'
}
return {
From d5818cfc52e949e1e65d672dc3ce7b4bf8ef34f0 Mon Sep 17 00:00:00 2001
From: schwartz-concordium
<132270889+schwartz-concordium@users.noreply.github.com>
Date: Wed, 6 Dec 2023 15:53:25 +0100
Subject: [PATCH 5/6] remove unused
---
frontend/src/components/atoms/Tooltip.vue | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/frontend/src/components/atoms/Tooltip.vue b/frontend/src/components/atoms/Tooltip.vue
index e8cc18e7b..57302f251 100644
--- a/frontend/src/components/atoms/Tooltip.vue
+++ b/frontend/src/components/atoms/Tooltip.vue
@@ -28,8 +28,6 @@ const isVisible = ref(false)
type Props = {
text?: string
textClass?: string
- x?: string
- y?: string
tooltipPosition?: string
onMouseEnter?: () => void
onMouseLeave?: () => void
@@ -44,7 +42,7 @@ const {
tooltipX,
tooltipY,
calculateCoordinates,
-} = useTooltip(props.x, props.y)
+} = useTooltip()
const handleOnMouseEnter = (event: MouseEvent) => {
calculateCoordinates(event)
From 3ed455192f39fd27713ec3767ff1d9836ba9b4ff Mon Sep 17 00:00:00 2001
From: schwartz-concordium
<132270889+schwartz-concordium@users.noreply.github.com>
Date: Wed, 6 Dec 2023 16:05:54 +0100
Subject: [PATCH 6/6] bump versions
---
backend/Application/Application.csproj | 2 +-
frontend/package.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/Application/Application.csproj b/backend/Application/Application.csproj
index 4c9291956..e63025c87 100644
--- a/backend/Application/Application.csproj
+++ b/backend/Application/Application.csproj
@@ -4,7 +4,7 @@
net6.0
enable
disable
- 1.8.2
+ 1.8.3
true
true
true
diff --git a/frontend/package.json b/frontend/package.json
index 7ceb58ce7..f0070e4d4 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -1,7 +1,7 @@
{
"name": "ccscan-frontend",
"description": "CCDScan frontend",
- "version": "1.5.24",
+ "version": "1.5.25",
"engine": "16",
"type": "module",
"private": true,