Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion frontend/src/components/base/molecules/PushModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@
<template v-else-if="preview">
<div class="commit-summary">
<span class="icon">📤</span>
Pushing {{ preview.commits_ahead }} commit{{ preview.commits_ahead !== 1 ? 's' : '' }} to {{ preview.remote }}/{{ preview.branch }}
<span v-if="preview.is_first_push">
Creating {{ preview.remote }}/{{ preview.branch }} with {{ preview.commits_ahead }} commit{{ preview.commits_ahead !== 1 ? 's' : '' }}
</span>
<span v-else>
Pushing {{ preview.commits_ahead }} commit{{ preview.commits_ahead !== 1 ? 's' : '' }} to {{ preview.remote }}/{{ preview.branch }}
</span>
</div>

<!-- First push info -->
<div v-if="preview.is_first_push" class="info-box">
<span class="info-icon">ℹ</span>
<span>This will create the remote branch for the first time.</span>
</div>

<!-- Outgoing commits -->
Expand Down Expand Up @@ -262,6 +273,22 @@ function handlePush(force: boolean) {
font-size: var(--cg-font-size-sm);
}

.info-box {
display: flex;
align-items: center;
gap: var(--cg-space-2);
padding: var(--cg-space-3);
background: var(--cg-color-info-muted);
border: 1px solid var(--cg-color-info);
border-radius: var(--cg-radius-sm);
color: var(--cg-color-info);
font-size: var(--cg-font-size-sm);
}

.info-icon {
flex-shrink: 0;
}

.commits-section {
display: flex;
flex-direction: column;
Expand Down
17 changes: 13 additions & 4 deletions frontend/src/components/deploy/RunPodTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@
<input type="radio" v-model="selectedCloudType" value="SECURE" />
<span class="radio-label">Secure (${{ getSelectedGpuPrice('SECURE') }}/hr)</span>
</label>
<label class="radio-option">
<input type="radio" v-model="selectedCloudType" value="COMMUNITY" />
<label class="radio-option disabled">
<input type="radio" v-model="selectedCloudType" value="COMMUNITY" disabled />
<span class="radio-label">Community (${{ getSelectedGpuPrice('COMMUNITY') }}/hr)</span>
</label>
</div>
Expand All @@ -174,8 +174,8 @@
<input type="radio" v-model="selectedPricingType" value="ON_DEMAND" />
<span class="radio-label">On-Demand (${{ getSelectedGpuPrice('ON_DEMAND') }}/hr)</span>
</label>
<label class="radio-option">
<input type="radio" v-model="selectedPricingType" value="SPOT" />
<label class="radio-option disabled">
<input type="radio" v-model="selectedPricingType" value="SPOT" disabled />
<span class="radio-label">Spot (${{ getSelectedGpuPrice('SPOT') }}/hr)</span>
</label>
</div>
Expand Down Expand Up @@ -1255,6 +1255,15 @@ onUnmounted(() => {
accent-color: var(--cg-color-accent);
}

.radio-option.disabled {
cursor: not-allowed;
opacity: 0.5;
}

.radio-option.disabled input {
cursor: not-allowed;
}

.radio-label {
font-size: var(--cg-font-size-sm);
color: var(--cg-color-text-primary);
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/services/mockApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,8 @@ export const mockApi = {
remote_has_new_commits: false,
can_push: true,
needs_force: false,
block_reason: null
block_reason: null,
is_first_push: false
}
},

Expand Down
1 change: 1 addition & 0 deletions frontend/src/types/comfygit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ export interface PushPreview {
can_push: boolean
needs_force: boolean
block_reason: string | null
is_first_push: boolean
}

export interface PushResult {
Expand Down
2 changes: 1 addition & 1 deletion js/comfygit-panel.css

Large diffs are not rendered by default.

Loading
Loading