{group.summary}
diff --git a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte
index 132501b472..47329903d9 100644
--- a/frontend/src/lib/components/raw_apps/RawAppEditor.svelte
+++ b/frontend/src/lib/components/raw_apps/RawAppEditor.svelte
@@ -178,6 +178,8 @@
/** `Exit & see details`: see RawAppEditorHeader. */
onDetails?: (e: { path: string }) => void
/** See RawAppEditorHeader. */
+ detailsHref?: (path: string) => string
+ /** See RawAppEditorHeader. */
onOpenFork?: (path: string) => void
onResetToDeployed?: () => void | Promise
/** The app_version the draft forked from, for the deploy-time "new version
@@ -251,6 +253,7 @@
pendingDraftPath = $bindable(undefined),
pendingDraftSettings = $bindable(),
onDetails,
+ detailsHref,
onOpenFork,
onResetToDeployed,
loadedFromDraft = false,
@@ -2742,6 +2745,7 @@ addEventListener('message', function (e) {
{onNavigate}
{onDeploy}
{onDetails}
+ {detailsHref}
{onOpenFork}
{onResetToDeployed}
{loadedFromDraft}
diff --git a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte
index 1a5b426378..f0ce23c185 100644
--- a/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte
+++ b/frontend/src/lib/components/raw_apps/RawAppEditorHeader.svelte
@@ -208,6 +208,9 @@
/** `Exit & see details`: leaves the editor for the app's deployed page. A session hosts that
* page itself, so it flips the tab there rather than navigating out of the session. */
onDetails?: (e: { path: string }) => void
+ /** Makes `Exit & see details` a link, so it opens in a new tab on middle/ctrl-click. Wins
+ * over `onDetails`. */
+ detailsHref?: (path: string) => string
/** Opens the draft `Fork` saved. Without it, the fork opens in a new browser tab; a
* session opens it as one of its own tabs instead. */
onOpenFork?: (path: string) => void
@@ -263,6 +266,7 @@
pendingDraftPath = $bindable(undefined),
pendingDraftSettings = $bindable(),
onDetails,
+ detailsHref,
onOpenFork,
onResetToDeployed,
loadedFromDraft = false,
@@ -1347,10 +1351,12 @@
...(newApp
? []
: [
- {
- label: 'Exit & see details',
- onClick: () => onDetails?.({ path: appPath })
- }
+ detailsHref
+ ? { label: 'Exit & see details', href: detailsHref(appPath) }
+ : {
+ label: 'Exit & see details',
+ onClick: () => onDetails?.({ path: appPath })
+ }
]),
{
label: 'Fork',
diff --git a/frontend/src/lib/components/resources/ResourcesList.svelte b/frontend/src/lib/components/resources/ResourcesList.svelte
index 84da0fdca7..4f89f5c476 100644
--- a/frontend/src/lib/components/resources/ResourcesList.svelte
+++ b/frontend/src/lib/components/resources/ResourcesList.svelte
@@ -1,6 +1,7 @@
+
- {
+ {href}
+ tabindex={href ? -1 : undefined}
+ onclickcapture={(e: MouseEvent) => {
e.stopImmediatePropagation()
+ // The link only serves clicks the browser opens elsewhere (modified, middle, right); a
+ // plain click still goes through onselect, which may select rather than navigate.
+ // Capture, not a delegated onclick: the palette is portalled outside the app root, where
+ // a delegated handler runs after SvelteKit's link handler has already followed the href.
+ if (href && isNewTabClick(e)) return
+ if (href) e.preventDefault()
onselect(e.shiftKey || e.ctrlKey)
}}
onmouseenter={() => {
@@ -83,7 +98,7 @@
mouseMoved = false
}}
class={twMerge(
- `rounded-md w-full transition-all cursor-pointer ${hovered ? 'bg-surface-hover' : ''}`,
+ `block rounded-md w-full text-[color:inherit] transition-all cursor-pointer ${hovered ? 'bg-surface-hover' : ''}`,
containerClass
)}
>
@@ -123,4 +138,4 @@
{/if}
{/if}
-