git stack source badge with forge-aware icons and commit hash
This commit is contained in:
9 files changed
+280
-76
No files matched your search
@@ -24,6 +24,7 @@
|
||||
let highlightUpdates = $derived($appSettings.highlightUpdates);
|
||||
let compactPorts = $derived($appSettings.compactPorts);
|
||||
let showExposedPorts = $derived($appSettings.showExposedPorts);
|
||||
let showGitCommitHash = $derived($appSettings.showGitCommitHash);
|
||||
let honorProxyLabels = $derived($appSettings.honorProxyLabels);
|
||||
let showImageChangelogLinks = $derived($appSettings.showImageChangelogLinks);
|
||||
let showWhatsNew = $derived($appSettings.showWhatsNew);
|
||||
@@ -411,6 +412,28 @@ services:
|
||||
</div>
|
||||
<p class="text-xs text-muted-foreground">Display internal container ports in the container list grid</p>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<div class="flex items-center gap-3">
|
||||
<Label>Show git commit hash</Label>
|
||||
<Tooltip.Root>
|
||||
<Tooltip.Trigger>
|
||||
<HelpCircle class="w-3.5 h-3.5 text-muted-foreground" />
|
||||
</Tooltip.Trigger>
|
||||
<Tooltip.Content side="top" class="w-96 max-w-[90vw]">
|
||||
<p>Shows the deployed short commit hash on the Git badge in the stacks list source column, with the full hash, repo URL and branch in a tooltip.</p>
|
||||
</Tooltip.Content>
|
||||
</Tooltip.Root>
|
||||
<TogglePill
|
||||
checked={showGitCommitHash}
|
||||
onchange={(checked) => {
|
||||
appSettings.setShowGitCommitHash(checked);
|
||||
toast.success(checked ? 'Showing git commit hash on stack badges' : 'Git commit hash hidden');
|
||||
}}
|
||||
disabled={!$canAccess('settings', 'edit')}
|
||||
/>
|
||||
</div>
|
||||
<p class="text-xs text-muted-foreground">Display the deployed commit hash on the Git source badge in the stacks list</p>
|
||||
</div>
|
||||
<div class="space-y-1">
|
||||
<div class="flex items-center gap-3">
|
||||
<Label>Honor Traefik/Pangolin labels</Label>
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import * as Card from '$lib/components/ui/card';
|
||||
import { Badge } from '$lib/components/ui/badge';
|
||||
import { Plus, Trash2, Pencil, GitBranch, FolderGit2, Plug, CheckCircle, XCircle, Loader2, Github, Lock, Globe } from 'lucide-svelte';
|
||||
import { Plus, Trash2, Pencil, GitBranch, FolderGit2, Plug, CheckCircle, XCircle, Loader2, Lock, Globe } from 'lucide-svelte';
|
||||
import { forgeIcon } from '$lib/utils/git-forge';
|
||||
import ConfirmPopover from '$lib/components/ConfirmPopover.svelte';
|
||||
import { canAccess } from '$lib/stores/auth';
|
||||
import GitRepositoryModal from './GitRepositoryModal.svelte';
|
||||
@@ -160,13 +161,10 @@
|
||||
{:else}
|
||||
<div class="space-y-1">
|
||||
{#each repositories as repo (repo.id)}
|
||||
{@const ForgeIcon = forgeIcon(repo.url)}
|
||||
<div class="flex items-center justify-between py-2 px-3 rounded-md border bg-card hover:bg-muted/50 transition-colors">
|
||||
<div class="flex items-center gap-2 min-w-0 flex-1">
|
||||
{#if repo.url.includes('github.com')}
|
||||
<Github class="w-4 h-4 shrink-0 text-muted-foreground" />
|
||||
{:else}
|
||||
<FolderGit2 class="w-4 h-4 shrink-0 text-muted-foreground" />
|
||||
{/if}
|
||||
<ForgeIcon class="w-4 h-4 shrink-0 text-muted-foreground" />
|
||||
<span class="font-medium text-sm truncate">{repo.name}</span>
|
||||
<span class="text-xs text-muted-foreground truncate hidden sm:inline">{repo.url}</span>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user