From 05dc037b94f86bac282ae184ee16d9c4c355eed3 Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Thu, 5 Feb 2026 18:54:27 +0100 Subject: [PATCH] RightClickPopover --- .../lib/components/RightClickPopover.svelte | 35 +++++++++++++++++++ .../src/lib/components/runs/RunsTable.svelte | 14 +++++++- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 frontend/src/lib/components/RightClickPopover.svelte diff --git a/frontend/src/lib/components/RightClickPopover.svelte b/frontend/src/lib/components/RightClickPopover.svelte new file mode 100644 index 0000000000..a748d15987 --- /dev/null +++ b/frontend/src/lib/components/RightClickPopover.svelte @@ -0,0 +1,35 @@ + + + + {#if isOpen} +
{ + isOpen = false + e.preventDefault() + e.stopPropagation() + } + }} + class="absolute left-0 top-0 z-[9999] w-fit" + style="transform: translate({mousePos.x}px, {mousePos.y}px)" + > +
+ {/if} +
diff --git a/frontend/src/lib/components/runs/RunsTable.svelte b/frontend/src/lib/components/runs/RunsTable.svelte index ef2873b5be..9d54038c3b 100644 --- a/frontend/src/lib/components/runs/RunsTable.svelte +++ b/frontend/src/lib/components/runs/RunsTable.svelte @@ -10,6 +10,7 @@ import './runs-grid.css' import { useKeyboardModifiers } from '$lib/svelte5Utils.svelte' import { twMerge } from 'tailwind-merge' + import RightClickPopover from '../RightClickPopover.svelte' interface Props { //import InfiniteLoading from 'svelte-infinite-loading' @@ -40,6 +41,7 @@ }: Props = $props() const keyboardModifiers = useKeyboardModifiers() + let rightClickPopover: RightClickPopover | undefined = $state(undefined) function getTime(job: Job): string | undefined { return job['completed_at'] ?? job['started_at'] ?? job['scheduled_for'] ?? job['created_at'] @@ -272,7 +274,15 @@ {jobOrDate.date} {:else} -
+ + +
{ + e.preventDefault() + rightClickPopover?.open(e) + }} + >
+ +