From f5dcffd5706243987ecd40ee78f9aa549957d977 Mon Sep 17 00:00:00 2001 From: akhuoa Date: Tue, 29 Apr 2025 18:28:12 +1200 Subject: [PATCH] Update related conneciton button --- src/components.d.ts | 1 + .../Tooltip/ExternalResourceCard.vue | 61 +++++----- .../Tooltip/RelatedConnectivitiesButton.vue | 106 +++++++++++++++--- 3 files changed, 129 insertions(+), 39 deletions(-) diff --git a/src/components.d.ts b/src/components.d.ts index 73eb01d..4655605 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -24,6 +24,7 @@ declare module 'vue' { ElIconArrowDown: typeof import('@element-plus/icons-vue')['ArrowDown'] ElIconArrowUp: typeof import('@element-plus/icons-vue')['ArrowUp'] ElIconClose: typeof import('@element-plus/icons-vue')['Close'] + ElIconConnection: typeof import('@element-plus/icons-vue')['Connection'] ElIconCopyDocument: typeof import('@element-plus/icons-vue')['CopyDocument'] ElIconDelete: typeof import('@element-plus/icons-vue')['Delete'] ElIconEdit: typeof import('@element-plus/icons-vue')['Edit'] diff --git a/src/components/Tooltip/ExternalResourceCard.vue b/src/components/Tooltip/ExternalResourceCard.vue index 87fbc5d..b726fa2 100644 --- a/src/components/Tooltip/ExternalResourceCard.vue +++ b/src/components/Tooltip/ExternalResourceCard.vue @@ -50,12 +50,14 @@ @@ -63,23 +65,27 @@
  • - +
    + - + +
  • {{ reference.url }} - +
    + - + +
  • @@ -581,6 +587,17 @@ export default { text-transform: uppercase; } +.reference-actions { + display: flex; + flex-direction: row; + gap: 0.5rem; + position: absolute; + bottom: 0.25rem; + right: 0.25rem; + opacity: 0; + visibility: hidden; +} + .citation-list { margin: 0; margin-top: 0.5rem; @@ -590,7 +607,7 @@ export default { li { margin: 0; - padding: 0.5rem 1.5rem 0.5rem 0.75rem; + padding: 0.75rem 1.5rem 1.5rem 0.75rem; border-radius: var(--el-border-radius-base); background-color: var(--el-bg-color-page); position: relative; @@ -635,16 +652,8 @@ export default { background-color: transparent; } - :deep(.copy-clipboard-button) { - position: absolute; - bottom: 0.25rem; - right: 0.25rem; - opacity: 0; - visibility: hidden; - } - &:hover { - :deep(.copy-clipboard-button) { + .reference-actions { opacity: 1; visibility: visible; } diff --git a/src/components/Tooltip/RelatedConnectivitiesButton.vue b/src/components/Tooltip/RelatedConnectivitiesButton.vue index 4501fd3..f5a01aa 100644 --- a/src/components/Tooltip/RelatedConnectivitiesButton.vue +++ b/src/components/Tooltip/RelatedConnectivitiesButton.vue @@ -1,16 +1,29 @@ -.reference-icon-button { - color: $app-primary-color !important; - background-color: #f9f2fc !important; - border-color: $app-primary-color !important; +