mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
🔨 chore: add readonly prop to Commit component to prevent actions when in readonly mode
This commit is contained in:
parent
20782cec64
commit
65d1c0e629
@ -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}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user