explorer: Put the download archive button first

Co-authored-by: Brandon Oxendine <brandon.oxendine@gmail.com>
This commit is contained in:
Rūdolfs Ošiņš
2026-11-04 15:01:47 +01:00
co-authored by Brandon Oxendine
parent 0bc014dded
commit aa606ee12c
2 changed files with 33 additions and 41 deletions
+7 -30
View File
@@ -1,11 +1,9 @@
<script lang="ts">
import Clipboard from "@app/components/Clipboard.svelte";
import Icon from "@app/components/Icon.svelte";
export let command: string;
export let fullWidth: boolean = false;
export let showPrompt: boolean = true;
export let downloadHref: string | undefined = undefined;
let clipboard: Clipboard;
</script>
@@ -33,24 +31,15 @@
border: 1px solid var(--color-border-mid);
color: var(--color-text-primary);
}
.with-download {
padding-right: 3.5rem;
}
.actions {
.clipboard {
display: flex;
align-items: center;
position: absolute;
right: 0.25rem;
top: 0;
height: 100%;
}
.download {
width: 1.5rem;
height: 1.5rem;
display: inline-flex;
justify-content: center;
align-items: center;
color: inherit;
position: absolute;
right: 0;
top: 0;
width: 2rem;
height: 100%;
}
.full-width.wrapper,
@@ -66,7 +55,6 @@
tabindex="0"
class="cmd"
class:full-width={fullWidth}
class:with-download={downloadHref}
on:click={() => {
clipboard.copy();
}}>
@@ -74,18 +62,7 @@
{#if showPrompt}${/if}
{command}
</div>
<div class="actions">
{#if downloadHref}
<a
class="download"
href={downloadHref}
download
aria-label="Download"
title="Download"
on:click|stopPropagation>
<Icon name="download" />
</a>
{/if}
<div class="clipboard">
<Clipboard bind:this={clipboard} text={command} />
</div>
</div>