Files
ss-tools/frontend/src/components/git/GitOperationsPanel.svelte
busya 4fc3356312 refactor(frontend): migrate Svelte stores from .ts to .svelte.ts runes
- Delete legacy .ts stores (auth, activity, assistantChat, datasetReview, environmentContext, health, sidebar, taskDrawer, translationRun)
- Create new .svelte.ts runes-based stores using  reactive primitives
- Migrate i18n: /i18n → /i18n/index.svelte.js
- Migrate toasts: /toasts → /toasts.svelte.js
- Update all component imports across 180+ files: components, pages, routes, lib
- Remove fromStore() wrappers — use store.value directly with Svelte 5 runes
- Update test mocks for new import paths
- Add @DEPRECATED annotation to legacy  alias
2026-06-02 09:54:18 +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 lang="ts">
import { t } from "$lib/i18n/index.svelte.js";
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 -->