Launche on version card + dropdown
This commit is contained in:
@@ -36,7 +36,21 @@
|
||||
{#each release.links as link, i (link.version)}
|
||||
<option value={i} selected={i === linkIndex}>{link.version}</option>
|
||||
{/each}
|
||||
|
||||
</select>
|
||||
<svg
|
||||
class="arrow"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
width="14"
|
||||
height="14"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
><polyline points="6 9 12 15 18 9"></polyline></svg
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="progress" class:downloading={downloading || installed}>
|
||||
@@ -78,6 +92,13 @@
|
||||
box-sizing: border-box;
|
||||
width: 5.5rem;
|
||||
min-width: 5.5rem;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.arrow {
|
||||
pointer-events: none;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.progress {
|
||||
flex: 1;
|
||||
@@ -103,7 +124,7 @@
|
||||
transition: color 0.3s ease;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
select:hover {
|
||||
.selectVersion:hover {
|
||||
outline: 2px solid var(--accent);
|
||||
}
|
||||
select.disabled {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
let { version, selectedVersion } = $props();
|
||||
|
||||
let selected = $derived(version.version === selectedVersion?.version);
|
||||
let hovering = $state(false);
|
||||
|
||||
async function handleDelete() {
|
||||
const prompt = await show({
|
||||
@@ -74,7 +75,20 @@
|
||||
/>
|
||||
</svg>
|
||||
</Button>
|
||||
{version.version}
|
||||
<div
|
||||
id="version-tag"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
onkeydown={() => {}}
|
||||
onmouseenter={() => (hovering = true)}
|
||||
onmouseleave={() => (hovering = false)}
|
||||
onclick={async (e) => {
|
||||
e.stopPropagation();
|
||||
await launchBlenderVersion(version);
|
||||
}}
|
||||
>
|
||||
<p>{hovering ? 'Launch' : version.version}</p>
|
||||
</div>
|
||||
<Menu>
|
||||
{#snippet children({ close })}
|
||||
<MenuItem
|
||||
@@ -123,4 +137,23 @@
|
||||
.fav-btn.fav {
|
||||
fill: var(--accent);
|
||||
}
|
||||
#version-tag{
|
||||
cursor: pointer;
|
||||
border-radius: var(--round);
|
||||
}
|
||||
#version-tag p{
|
||||
padding: .1rem .5rem ;
|
||||
}
|
||||
#version-tag:hover{
|
||||
border-radius: 5px;
|
||||
background-color: var(--accent);
|
||||
}
|
||||
|
||||
#version-tag:active{
|
||||
background-color: var(--black);
|
||||
}
|
||||
|
||||
#version-tag:hover p {
|
||||
color: var(--light);
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user