mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-14 04:08:19 +00:00
Fixed FileDropArea in Drive (#5993)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
parent
15d9661f29
commit
6756c43e4e
@ -71,34 +71,29 @@
|
||||
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div
|
||||
class="dropzone h-full"
|
||||
class="dropzone flex-col w-full h-full"
|
||||
class:dragover
|
||||
on:dragenter={handleDragEnter}
|
||||
on:dragleave={handleDragLeave}
|
||||
on:dragover|preventDefault={handleDragOver}
|
||||
on:drop={handleDrop}
|
||||
>
|
||||
{#if dragover}
|
||||
<div class="dropzone-overlay" />
|
||||
{/if}
|
||||
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.dropzone {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropzone-overlay {
|
||||
pointer-events: none;
|
||||
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: var(--primary-button-transparent);
|
||||
border: 2px dashed var(--primary-button-outline);
|
||||
&::after {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background-color: var(--primary-button-transparent);
|
||||
border: 2px dashed var(--primary-button-outline);
|
||||
pointer-events: none;
|
||||
}
|
||||
&.dragover::after {
|
||||
content: '';
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -69,11 +69,11 @@
|
||||
<FilterBar {_class} {space} query={searchQuery} {viewOptions} on:change={(e) => (resultQuery = e.detail)} />
|
||||
<div class="popupPanel rowContent" on:contextmenu>
|
||||
{#if viewlet}
|
||||
<Scroller horizontal={true}>
|
||||
<FileDropArea {space} {parent} canDrop={() => !readonly}>
|
||||
<FileDropArea {space} {parent} canDrop={() => !readonly}>
|
||||
<Scroller horizontal={true}>
|
||||
<ViewletContentView {_class} {viewlet} query={resultQuery} {space} {viewOptions} />
|
||||
</FileDropArea>
|
||||
</Scroller>
|
||||
</Scroller>
|
||||
</FileDropArea>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
Loading…
Reference in New Issue
Block a user