fix a bug where the "sign commits" toggle did not work

This commit is contained in:
Kiril Videlov 2024-06-06 16:09:33 +02:00
parent 452ae8fe7d
commit 59abae2a04

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}