mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-28 04:47:42 +03:00
Improve app drag areas
- drag from lane gutters (but not over scrollbar) - drag from empty space in new branch dropzone - drag from empty space
This commit is contained in:
parent
be4ddb1fe1
commit
191dc073e8
@ -107,11 +107,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="resizer-wrapper" bind:this={scrollViewport}>
|
||||
<div
|
||||
class="branch-card hide-native-scrollbar"
|
||||
data-tauri-drag-region
|
||||
class:target-branch={branch.selectedForChanges}
|
||||
>
|
||||
<div class="branch-card hide-native-scrollbar" class:target-branch={branch.selectedForChanges}>
|
||||
<ScrollableContainer
|
||||
wide
|
||||
padding={{
|
||||
@ -123,6 +119,7 @@
|
||||
bind:this={rsViewport}
|
||||
style:width={`${laneWidth || $defaultBranchWidthRem}rem`}
|
||||
class="branch-card__contents"
|
||||
data-tauri-drag-region
|
||||
>
|
||||
<BranchHeader {isLaneCollapsed} onGenerateBranchName={generateBranchName} />
|
||||
<PullRequestCard />
|
||||
@ -171,7 +168,7 @@
|
||||
</Dropzones>
|
||||
{:else}
|
||||
<Dropzones>
|
||||
<div class="no-changes" data-dnd-ignore>
|
||||
<div class="no-changes">
|
||||
<EmptyStatePlaceholder image={noChangesSvg} width="11rem" hasBottomMargin={false}>
|
||||
<svelte:fragment slot="caption"
|
||||
>No uncommitted changes on this branch</svelte:fragment
|
||||
|
@ -31,10 +31,10 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="canvas-dropzone">
|
||||
<div class="canvas-dropzone" data-tauri-drag-region>
|
||||
<Dropzone {accepts} ondrop={onDrop}>
|
||||
{#snippet overlay({ hovered, activated })}
|
||||
<div class="new-virtual-branch" class:activated class:hovered>
|
||||
<div class="new-virtual-branch" class:activated class:hovered data-tauri-drag-region>
|
||||
<div class="new-virtual-branch__content">
|
||||
<div class="stimg">
|
||||
<div class="stimg__hand">
|
||||
|
@ -85,6 +85,7 @@
|
||||
<div
|
||||
class="board"
|
||||
role="group"
|
||||
data-tauri-drag-region
|
||||
on:drop={(e) => {
|
||||
e.preventDefault();
|
||||
if (!dragged) {
|
||||
|
Loading…
Reference in New Issue
Block a user