Merge pull request #4022 from gitbutlerapp/add-log-for-sign-commits-setting

fix a bug where the "sign commits" toggle did not work
This commit is contained in:
Kiril Videlov 2024-06-06 16:12:19 +02:00 committed by GitHub
commit 3f32e659e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -43,9 +43,9 @@
}
let signCommits = false;
async function setSignCommits(value: boolean) {
signCommits = value;
await gitConfig.setGbConfig(project.id, { signCommits: value });
async function setSignCommits() {
signCommits = !signCommits;
await gitConfig.setGbConfig(project.id, { signCommits: signCommits });
}
// gpg.format
@ -128,11 +128,7 @@
GitButler will sign commits as per your git configuration.
</svelte:fragment>
<svelte:fragment slot="actions">
<Toggle
id="signCommits"
bind:checked={signCommits}
on:change={async () => await setSignCommits(signCommits)}
/>
<Toggle id="signCommits" bind:checked={signCommits} on:click={setSignCommits} />
</svelte:fragment>
</SectionCard>
{#if signCommits}