([]);
@@ -337,9 +338,16 @@
Deleting…
{/if}
- {repos.length > 0
- ? repos.map((r) => r.githubRepo).join(', ')
- : (project.githubRepo ?? 'No repo attached')}
+ {#if repos.length > 0}
+ {#each repos as r, i}
+ {#if i > 0}, {/if}
+
+ {/each}
+ {:else if project.githubRepo}
+
+ {:else}
+ No repo attached
+ {/if}
@@ -524,7 +532,6 @@
.repo {
margin-top: auto;
- color: var(--text-primary);
font-size: var(--size-sm);
display: -webkit-box;
-webkit-box-orient: vertical;
@@ -533,6 +540,10 @@
overflow: hidden;
}
+ .repo-separator {
+ color: var(--text-faint);
+ }
+
.deleting-pill {
width: fit-content;
padding: 2px 8px;
diff --git a/staged/src/lib/features/projects/RepoSearchInput.svelte b/staged/src/lib/features/projects/RepoSearchInput.svelte
index b822ca04..db2973d2 100644
--- a/staged/src/lib/features/projects/RepoSearchInput.svelte
+++ b/staged/src/lib/features/projects/RepoSearchInput.svelte
@@ -9,6 +9,7 @@
import { onMount, onDestroy } from 'svelte';
import { Search, Lock, Globe, Clock, Plus, Command } from 'lucide-svelte';
import Spinner from '../../shared/Spinner.svelte';
+ import RepoLabel from '../../shared/RepoLabel.svelte';
import * as commands from '../../commands';
import type { GitHubRepo, RecentRepo } from '../../types';
@@ -278,9 +279,7 @@
- {recent.githubRepo}{#if recent.subpath}/{recent.subpath}{/if}
+
{#if i < 3}
@@ -336,7 +335,7 @@
{/if}
- {repo.nameWithOwner}
+
{#if repo.description}
{repo.description}
{/if}
@@ -484,11 +483,6 @@
white-space: nowrap;
}
- .repo-subpath {
- font-weight: 400;
- color: var(--text-muted);
- }
-
.repo-description {
font-size: var(--size-xs);
color: var(--text-muted);
diff --git a/staged/src/lib/features/settings/ActionsPreferencesModal.svelte b/staged/src/lib/features/settings/ActionsPreferencesModal.svelte
index 181fc0c5..0799a017 100644
--- a/staged/src/lib/features/settings/ActionsPreferencesModal.svelte
+++ b/staged/src/lib/features/settings/ActionsPreferencesModal.svelte
@@ -15,6 +15,7 @@
Code2,
} from 'lucide-svelte';
import Spinner from '../../shared/Spinner.svelte';
+ import RepoLabel from '../../shared/RepoLabel.svelte';
import type { ActionContext, ProjectAction } from '../../commands';
import * as commands from '../../commands';
import { detectRepoActions, type SuggestedAction, type ActionType } from '../actions/actions';
@@ -88,11 +89,6 @@
loadActions();
});
- function contextLabel(context: ActionContext): string {
- const repoName = context.githubRepo.split('/').pop() || context.githubRepo;
- return context.subpath ? `${repoName}/${context.subpath}` : repoName;
- }
-
async function detectActions() {
if (!selectedContext) return;
@@ -305,9 +301,7 @@
class:selected={context.id === selectedContextId}
onclick={() => (selectedContextId = context.id)}
>
- {context.githubRepo}{#if context.subpath}/{context.subpath}{/if}
+
{/each}
@@ -522,14 +516,6 @@
border-color: var(--border-muted);
}
- .context-repo {
- color: var(--text-primary);
- }
-
- .context-subpath {
- color: var(--text-muted);
- }
-
.loading-side,
.empty-side,
.empty-main,
diff --git a/staged/src/lib/shared/RepoLabel.svelte b/staged/src/lib/shared/RepoLabel.svelte
new file mode 100644
index 00000000..d2ae236b
--- /dev/null
+++ b/staged/src/lib/shared/RepoLabel.svelte
@@ -0,0 +1,60 @@
+
+
+
+{#if prefix}{prefix}{/if}{emphasis}
+
+