File tree Expand file tree Collapse file tree 1 file changed +0
-27
lines changed
apps/desktop/src/components Expand file tree Collapse file tree 1 file changed +0
-27
lines changed Original file line number Diff line number Diff line change 19
19
import { URL_SERVICE } from ' $lib/utils/url' ;
20
20
import { ensureValue } from ' $lib/utils/validation' ;
21
21
import { inject } from ' @gitbutler/core/context' ;
22
- import { copyToClipboard } from ' @gitbutler/shared/clipboard' ;
23
22
24
23
import { Button , Modal , TestId } from ' @gitbutler/ui' ;
25
24
import { getForgeLogo } from ' @gitbutler/ui/utils/getForgeLogo' ;
47
46
// Component is read-only when stackId is undefined
48
47
const isReadOnly = $derived (! stackId );
49
48
50
- const [insertBlankCommitInBranch, commitInsertion] = stackService .insertBlankCommit ;
51
-
52
49
let addDependentBranchModalContext = $state <AddDependentBranchModalProps >();
53
50
let addDependentBranchModal = $state <AddDependentBranchModal >();
54
51
194
191
}}
195
192
>
196
193
{#snippet buttons ()}
197
- <Button
198
- icon =" new-empty-commit"
199
- size =" tag"
200
- kind =" outline"
201
- tooltip ={isReadOnly ? ' Read-only mode' : ' Create empty commit' }
202
- onclick ={async () => {
203
- await insertBlankCommitInBranch ({
204
- projectId ,
205
- stackId: ensureValue (stackId ),
206
- commitId: undefined ,
207
- offset: - 1
208
- });
209
- }}
210
- disabled ={isReadOnly || commitInsertion .current .isLoading }
211
- />
212
- <Button
213
- icon =" copy-small"
214
- size =" tag"
215
- kind =" outline"
216
- tooltip =" Copy branch name"
217
- onclick ={() => {
218
- copyToClipboard (branchName );
219
- }}
220
- />
221
194
{#if first }
222
195
<Button
223
196
icon =" new-dep-branch"
You can’t perform that action at this time.
0 commit comments