Skip to content

Commit 02879f9

Browse files
[6.x] Upload drag area improvements (#13361)
Co-authored-by: Jason Varga <[email protected]>
1 parent f7f7122 commit 02879f9

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

resources/css/components/assets.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
}
2727

2828
.drag-notification {
29-
@apply absolute inset-0 flex items-center justify-center rounded-sm p-1 text-center text-xs leading-tight @sm:text-lg;
29+
@apply absolute inset-0 flex items-center justify-center rounded-xl p-1 text-center text-xs leading-tight @sm:text-lg;
3030
border: 1px dashed var(--color-gray-600);
3131
pointer-events: none;
3232
z-index: var(--z-index-draggable);

resources/js/components/assets/Browser/Browser.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div ref="browser" @keydown.shift="shiftDown" @keyup="clearShift">
2+
<div ref="browser" class="h-full" @keydown.shift="shiftDown" @keyup="clearShift">
33
<Uploader
44
ref="uploader"
55
:container="container.id"
@@ -12,7 +12,7 @@
1212
>
1313
<div>
1414
<div class="drag-notification" v-show="dragging">
15-
<Icon name="upload" class="m-4 size-12" />
15+
<Icon name="upload-cloud-large" class="m-4 size-13" />
1616
<span>{{ __('Drop File to Upload') }}</span>
1717
</div>
1818

@@ -146,6 +146,8 @@
146146
<ListingPagination />
147147
</PanelFooter>
148148
</Panel>
149+
150+
<slot name="footer" />
149151
</template>
150152
</Listing>
151153
</div>

resources/js/components/assets/Uploader.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export default {
1717
return h(
1818
'div',
1919
{
20+
class: 'h-full',
2021
onDragenter: this.dragenter,
2122
onDragover: this.dragover,
2223
onDragleave: this.dragleave,

resources/js/pages/assets/Browse.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export default {
9090
</script>
9191

9292
<template>
93-
<div v-cloak>
93+
<div class="h-full" v-cloak>
9494
<Head :title="container.title" />
9595

9696
<asset-browser
@@ -127,10 +127,11 @@ export default {
127127
<ui-skeleton class="h-30 w-full" />
128128
</div>
129129
</template>
130+
<template #footer>
131+
<div class="starting-style-transition starting-style-transition--delay">
132+
<DocsCallout :topic="__('Assets')" url="assets" />
133+
</div>
134+
</template>
130135
</asset-browser>
131-
132-
<div class="starting-style-transition starting-style-transition--delay">
133-
<DocsCallout :topic="__('Assets')" url="assets" />
134-
</div>
135136
</div>
136137
</template>

resources/js/pages/layout/Layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ provide('layout', {
3232
<main id="main" class="flex bg-body-bg dark:border-t dark:border-body-border rounded-t-2xl fixed top-14 inset-x-0 bottom-0 min-h-[calc(100vh-3.5rem)]">
3333
<Nav />
3434
<div id="main-content" class="main-content sm:p-2 h-full flex-1 overflow-y-auto rounded-t-2xl">
35-
<div id="content-card" class="relative content-card min-h-full">
35+
<div id="content-card" class="relative content-card min-h-full h-full">
3636
<slot />
3737
</div>
3838
</div>
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)