say force push if it's going to happen

This commit is contained in:
Nikita Galaiko 2023-10-11 14:46:00 +02:00 committed by GitButler
parent 3b5005c865
commit b834a6ef01
2 changed files with 7 additions and 2 deletions

View File

@ -37,6 +37,7 @@ export class Branch {
files!: File[];
@Type(() => Commit)
commits!: Commit[];
requiresForce!: boolean;
description!: string;
order!: number;
upstream?: string;

View File

@ -545,7 +545,11 @@
loading={isPushing}
on:click={push}
>
<span class="purple">Push</span>
{#if branch.requiresForce}
<span class="purple">Force Push</span>
{:else}
<span class="purple">Push</span>
{/if}
</Button>
</div>
@ -615,7 +619,7 @@
{#if commit.id === headCommit?.id}
<div class="group relative ml-[0.4rem] mr-1.5 h-3 w-3">
<div
class="insert-0 absolute group-hover:opacity-0 h-3 w-3 rounded-full border-2 border-light-600 bg-light-600 dark:border-dark-400 dark:bg-dark-400"
class="insert-0 absolute h-3 w-3 rounded-full border-2 border-light-600 bg-light-600 group-hover:opacity-0 dark:border-dark-400 dark:bg-dark-400"
class:bg-light-500={commit.isRemote}
class:dark:bg-dark-500={commit.isRemote}
/>