diff --git a/public/elevations.css b/public/elevations.css index d3a8f1341..b21ad2187 100644 --- a/public/elevations.css +++ b/public/elevations.css @@ -1,7 +1,7 @@ :root { - --elevation-low: 0 0 64px 0 #00000099; + --elevation-low: 0 0 48px 0 #000000ee; } [data-theme="light"] { - --elevation-low: 0 0 64px 0 #0000001a; + --elevation-low: 0 0 16px 0 #00000022; } diff --git a/src/components/Id.svelte b/src/components/Id.svelte index a36f755e6..0453cd26c 100644 --- a/src/components/Id.svelte +++ b/src/components/Id.svelte @@ -12,11 +12,10 @@ export let clipboard: string = id; export let shorten: boolean = true; export let style: "oid" | "commit" | "none" = "oid"; - export let subject: string | undefined = undefined; export let ariaLabel: string | undefined = undefined; let icon: ComponentProps["name"] = "clipboard"; - const text = subject ? `Click to copy ${subject}` : "Click to copy"; + const text = "Click to copy"; let tooltip = text; const restoreIcon = debounce(() => { @@ -47,24 +46,24 @@ } .popover { position: absolute; - bottom: 1.5rem; - left: 0; + left: 1rem; display: flex; align-items: center; flex-direction: row; gap: 0.5rem; justify-content: center; z-index: 20; - background: var(--color-background-float); - color: var(--color-foreground-default); - border: 1px solid var(--color-border-hint); - border-radius: var(--border-radius-small); + bottom: 1.5rem; + background: var(--color-fill-ghost); + color: var(--color-fill-gray); + border: 1px solid var(--color-border-default); + border-radius: var(--border-radius-tiny); box-shadow: var(--elevation-low); font-family: var(--font-family-sans-serif); font-size: var(--font-size-small); font-weight: var(--font-weight-regular); white-space: nowrap; - padding: 0.25rem 0.5rem; + padding: 0.125rem 0.5rem; } .target-commit:hover { color: var(--color-foreground-contrast); @@ -75,42 +74,38 @@
+
{ setVisible(true); }} on:mouseleave={() => { setVisible(false); - }}> - -
{ - await copy(); - setVisible(true); - }} - role="button" - tabindex="0"> - - {#if shorten} - {formatObjectId(id)} - {:else} - {id} - {/if} - -
- - {#if visible} -
-
- - {tooltip} -
-
- {/if} + }} + class="target-{style} global-{style}" + style:cursor="copy" + aria-label={ariaLabel} + on:click={async () => { + await copy(); + setVisible(true); + }} + role="button" + tabindex="0"> + + {#if shorten} + {formatObjectId(id)} + {:else} + {id} + {/if} +
+ + {#if visible} +
+
+ + {tooltip} +
+
+ {/if}
diff --git a/src/components/NodeId.svelte b/src/components/NodeId.svelte index 6807b4313..752fec84b 100644 --- a/src/components/NodeId.svelte +++ b/src/components/NodeId.svelte @@ -6,7 +6,6 @@ export let nodeId: string; export let alias: string | undefined = undefined; - export let subject: string = formatNodeId(nodeId); - +
{#if alias} diff --git a/src/views/projects/Source/PeerBranchSelector/Peer.svelte b/src/views/projects/Source/PeerBranchSelector/Peer.svelte index d9b71df7a..c0bef22a4 100644 --- a/src/views/projects/Source/PeerBranchSelector/Peer.svelte +++ b/src/views/projects/Source/PeerBranchSelector/Peer.svelte @@ -38,10 +38,7 @@ (expanded = !expanded)}> - + {#if peer.remote.delegate}