From 8625b7f519e65c6d1422374f2c814f81d0e2e785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Mon, 31 Jul 2023 15:57:17 +0200 Subject: [PATCH] feat: add download button to UpObject --- webui/src/components/display/UpObject.svelte | 37 +++++++++++++++----- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/webui/src/components/display/UpObject.svelte b/webui/src/components/display/UpObject.svelte index e7c9c01..5d68c35 100644 --- a/webui/src/components/display/UpObject.svelte +++ b/webui/src/components/display/UpObject.svelte @@ -4,6 +4,7 @@ import HashBadge from "./HashBadge.svelte"; import Ellipsis from "../utils/Ellipsis.svelte"; import UpLink from "./UpLink.svelte"; + import Icon from "../utils/Icon.svelte"; import { readable, type Readable } from "svelte/store"; import { notify, UpNotification } from "../../notifications"; import IconButton from "../utils/IconButton.svelte"; @@ -12,7 +13,9 @@ import type { UpObject } from "upend"; import type { ADDRESS_TYPE, EntityInfo } from "upend/types"; import { useEntity } from "../../lib/entity"; + import { i18n } from "../../i18n"; import api from "../../lib/api"; + const dispatch = createEventDispatcher(); export let address: string; @@ -124,9 +127,7 @@
{#if banner && isFile} - - - + {:else if link} @@ -143,13 +144,23 @@
{/if}
- {#if $vaultInfo?.desktop} - {#if banner && isFile} + {#if banner && isFile} +
+ + + +
+ {#if $vaultInfo?.desktop}
{/if} @@ -218,10 +229,20 @@ } .icon { - margin: 0 0.25em; + margin: 0 0.1em; } .resolving { opacity: 0.7; } + + .link-button { + opacity: 0.66; + transition: opacity 0.2s, color 0.2s; + + &:hover { + opacity: 1; + color: var(--active-color, var(--primary)); + } + }