Files
ss-tools/frontend/src/components/git/GitOperationsPanel.svelte
busya 8039d09505 refactor(frontend): unify Tailwind classes — replace hardcoded colors with semantic design tokens
- Replace all bg-blue-600/hover:bg-blue-700 → bg-primary/hover:bg-primary-hover
- Replace all bg-red-600/hover:bg-red-700 → bg-destructive/hover:bg-destructive-hover
- Replace all focus:ring-blue-500 → focus-visible:ring-primary-ring
- Replace all text-blue-600 → text-primary on interactive elements
- Replace all bg-blue-50 → bg-primary-light on UI surfaces
- Replace all bg-red-50 → bg-destructive-light on error surfaces
- Replace all border-blue-200/300 → border-primary-ring
- Replace all border-red-200 → border-destructive-light
- Replace peer-checked:bg-blue-600 → peer-checked:bg-primary (toggles)
- Replace focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 patterns
- Keep status badge patterns (bg-*-100 text-*-700) and hover:bg-blue-50 intact

82 files changed, ~400 changes. Build passes.
2026-05-19 10:46:00 +03:00

47 lines
1.2 KiB
Svelte

<!-- #region GitOperationsPanel [C:2] [TYPE Component] [SEMANTICS git, operations, pull, push, deploy] -->
<!-- @BRIEF Git server operations panel: pull, push, and deploy actions. -->
<!-- @LAYER UI -->
<script>
import { t } from "$lib/i18n";
import { Button } from "$lib/ui";
let {
isPulling,
isPushing,
workspaceStatus,
currentEnvStage,
onPull,
onPush,
onDeploy,
} = $props();
</script>
<div class="grid grid-cols-1 gap-3 md:grid-cols-3">
<Button
variant="ghost"
onclick={onPull}
disabled={isPulling}
isLoading={isPulling}
class="border border-gray-200"
>
⬇ Pull
</Button>
<Button
variant="ghost"
onclick={onPush}
disabled={isPushing}
isLoading={isPushing}
class="border border-gray-200"
>
⬆ Push{#if workspaceStatus?.ahead_count > 0} ({workspaceStatus.ahead_count}){/if}
</Button>
<Button
variant="primary"
onclick={onDeploy}
class={`w-full ${currentEnvStage === 'PROD' ? 'bg-destructive hover:bg-destructive-hover focus-visible:ring-red-500' : 'bg-green-600 hover:bg-green-700 focus-visible:ring-green-500'}`}
>
🚀 Deploy
</Button>
</div>
<!-- #endregion GitOperationsPanel -->