Skip to content

Commit 5821d92

Browse files
authored
Replase checkbox with toggle + copy update (#4810)
1 parent c820a33 commit 5821d92

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

apps/desktop/src/lib/settings/GithubIntegration.svelte

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
import SectionCard from '$lib/components/SectionCard.svelte';
44
import { gitHostUsePullRequestTemplate } from '$lib/config/config';
55
import { getGitHubUserServiceStore } from '$lib/gitHost/github/githubUserService';
6+
import Toggle from '$lib/shared/Toggle.svelte';
67
import { UserService } from '$lib/stores/user';
78
import { copyToClipboard } from '$lib/utils/clipboard';
89
import { getContext } from '$lib/utils/context';
910
import * as toasts from '$lib/utils/toasts';
1011
import { openExternalUrl } from '$lib/utils/url';
1112
import Button from '@gitbutler/ui/Button.svelte';
12-
import Checkbox from '@gitbutler/ui/Checkbox.svelte';
1313
import Icon from '@gitbutler/ui/Icon.svelte';
1414
import Modal from '@gitbutler/ui/Modal.svelte';
1515
import { fade } from 'svelte/transition';
@@ -96,9 +96,7 @@
9696
</div>
9797
</svelte:fragment>
9898
<svelte:fragment slot="title">GitHub</svelte:fragment>
99-
<svelte:fragment slot="caption">
100-
Allows you to view and create Pull Requests from GitButler.
101-
</svelte:fragment>
99+
<svelte:fragment slot="caption">Allows you to view and create Pull Requests.</svelte:fragment>
102100
{#if $user?.github_access_token}
103101
<Button style="ghost" outline {disabled} icon="bin-small" onclick={forgetGitHub}
104102
>Forget</Button
@@ -109,15 +107,11 @@
109107
</SectionCard>
110108
<SectionCard roundedBottom={false} orientation="row" labelFor="use-pull-request-template">
111109
<svelte:fragment slot="title">Pull Request Template</svelte:fragment>
112-
<svelte:fragment slot="caption">
113-
Use Pull Request template when creating a PR through GitButler.
114-
</svelte:fragment>
110+
<svelte:fragment slot="caption"
111+
>Use Pull Request template when creating a Pull Requests.</svelte:fragment
112+
>
115113
<svelte:fragment slot="actions">
116-
<Checkbox
117-
name="use-pull-request-template"
118-
value="false"
119-
bind:checked={$usePullRequestTemplate}
120-
/>
114+
<Toggle id="use-pull-request-template" value="false" bind:checked={$usePullRequestTemplate} />
121115
</svelte:fragment>
122116
</SectionCard>
123117
{/if}

0 commit comments

Comments
 (0)