mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-17 08:03:06 +00:00
fix: make the home last-run cell a link that ignores mouse clicks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d7e690fad8
commit
f2e8b786d6
@@ -9,7 +9,6 @@
|
||||
import { ExternalLink } from 'lucide-svelte'
|
||||
import { Button } from '$lib/components/common'
|
||||
import { workspaceStore } from '$lib/stores'
|
||||
import { goto } from '$lib/navigation'
|
||||
import { getHomeActivity, type ActivityKind } from './homeActivity.svelte'
|
||||
|
||||
interface Props {
|
||||
@@ -94,16 +93,15 @@
|
||||
{#if lastRun}
|
||||
<!-- The close delay lets the pointer cross into the popup to click a run. -->
|
||||
<Tooltip class="min-w-0" closeDelay={150}>
|
||||
<!-- Not a link for the mouse: the popover's "View runs" and run entries are the
|
||||
ways in. The popover's links are out of the tab order, so Enter on the focused
|
||||
cell stands in for "View runs". -->
|
||||
<span
|
||||
tabindex="0"
|
||||
role="link"
|
||||
class="flex items-center gap-1.5 min-w-0 text-secondary cursor-default rounded focus-visible:outline focus-visible:outline-1"
|
||||
aria-label="Latest runs, press Enter to view all runs"
|
||||
onkeydown={(e) => {
|
||||
if (e.key === 'Enter') goto(`/runs/${path}?workspace=${$workspaceStore}`)
|
||||
<!-- A mouse click does nothing: the popover's "View runs" and run entries are the
|
||||
ways in. Its links are out of the tab order, so the cell stays a real link for
|
||||
keyboard Enter and screen-reader activation, which click with `detail === 0`. -->
|
||||
<a
|
||||
href="{base}/runs/{path}?workspace={$workspaceStore}"
|
||||
class="flex items-center gap-1.5 min-w-0 text-secondary hover:text-secondary cursor-default rounded"
|
||||
aria-label="Latest runs, open all runs"
|
||||
onclick={(e) => {
|
||||
if (e.detail > 0) e.preventDefault()
|
||||
}}
|
||||
>
|
||||
<span class={twMerge('w-1.5 h-1.5 rounded-full shrink-0', statusClass[lastRun.status])}
|
||||
@@ -115,7 +113,7 @@
|
||||
<TimeAgo date={lastRun.created_at} compact /> ago
|
||||
{/if}
|
||||
</span>
|
||||
</span>
|
||||
</a>
|
||||
{#snippet text()}
|
||||
<div class="flex flex-col gap-1 min-w-56">
|
||||
<div class="flex items-center justify-between gap-4">
|
||||
|
||||
Reference in New Issue
Block a user