mirror of
https://github.com/khoaliber/dockhand.git
synced 2026-03-06 21:29:05 +00:00
Initial commit
This commit is contained in:
36
routes/settings/git/GitTab.svelte
Normal file
36
routes/settings/git/GitTab.svelte
Normal file
@@ -0,0 +1,36 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { FolderGit2, Key } from 'lucide-svelte';
|
||||
import GitCredentialsTab from './GitCredentialsTab.svelte';
|
||||
import GitRepositoriesTab from './GitRepositoriesTab.svelte';
|
||||
|
||||
let gitSubTab = $derived<'repositories' | 'credentials'>(
|
||||
($page.url.searchParams.get('subtab') as 'repositories' | 'credentials') || 'repositories'
|
||||
);
|
||||
</script>
|
||||
|
||||
<div class="space-y-4">
|
||||
<!-- Git subtabs -->
|
||||
<div class="inline-flex gap-1 p-1 bg-muted/50 rounded-lg">
|
||||
<a
|
||||
href="/settings?tab=git&subtab=repositories"
|
||||
class="px-3 py-1.5 text-sm font-medium rounded-md transition-all flex items-center gap-1.5 {gitSubTab === 'repositories' ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'}"
|
||||
>
|
||||
<FolderGit2 class="w-4 h-4" />
|
||||
Repositories
|
||||
</a>
|
||||
<a
|
||||
href="/settings?tab=git&subtab=credentials"
|
||||
class="px-3 py-1.5 text-sm font-medium rounded-md transition-all flex items-center gap-1.5 {gitSubTab === 'credentials' ? 'bg-background text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'}"
|
||||
>
|
||||
<Key class="w-4 h-4" />
|
||||
Credentials
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{#if gitSubTab === 'repositories'}
|
||||
<GitRepositoriesTab />
|
||||
{:else}
|
||||
<GitCredentialsTab />
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user