🔨 chore: add readonly prop to Commit component to prevent actions when in readonly mode

This commit is contained in:
Mattias Granlund 2023-11-29 10:23:18 +01:00
parent 20782cec64
commit 65d1c0e629
2 changed files with 5 additions and 1 deletions

View File

@ -340,6 +340,7 @@
{onSquash}
{resetHeadCommit}
{prService}
{readonly}
type="local"
/>
<LocalCommits
@ -356,6 +357,7 @@
{onSquash}
{resetHeadCommit}
{prService}
{readonly}
type="remote"
/>
<LocalCommits
@ -372,6 +374,7 @@
{onSquash}
{resetHeadCommit}
{prService}
{readonly}
type="integrated"
/>
{/if}

View File

@ -27,6 +27,7 @@
export let branchController: BranchController;
export let type: CommitType;
export let prService: PrService;
export let readonly: boolean;
export let acceptAmend: (commit: Commit) => (data: any) => boolean;
export let acceptSquash: (commit: Commit) => (data: any) => boolean;
@ -167,7 +168,7 @@
</div>
{/each}
</div>
{#if type != 'integrated'}
{#if !readonly && type != 'integrated'}
<div class="actions">
{#if githubContext && !$pr$ && type == 'local'}
<PushButton