Skip to content

Commit 6238502

Browse files
authored
Merge pull request #2608 from appwrite/fix-empty-states
2 parents 2632b0a + 5a92fbe commit 6238502

File tree

1 file changed

+25
-0
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/layout

1 file changed

+25
-0
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/table-[table]/layout/emptySheet.svelte

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
data-mode={mode}
252252
bind:this={spreadsheetContainer}
253253
class:custom-columns={customColumns.length > 0}
254+
class:no-custom-columns={customColumns.length <= 0}
254255
class="databases-spreadsheet spreadsheet-container-outer">
255256
<SpreadsheetContainer>
256257
<Spreadsheet.Root
@@ -381,6 +382,19 @@
381382
width: unset;
382383
}
383384
385+
&.no-custom-columns {
386+
@media (max-width: 768px) {
387+
& :global(.spreadsheet-wrapper) {
388+
opacity: 0;
389+
}
390+
391+
& > .spreadsheet-fade-bottom {
392+
top: var(--top-actions-spacing) !important;
393+
background: var(--bgcolor-neutral-primary) !important;
394+
}
395+
}
396+
}
397+
384398
&:not(.custom-columns) :global(.spreadsheet-container) {
385399
overflow-x: hidden;
386400
overflow-y: hidden;
@@ -393,12 +407,16 @@
393407
}
394408
395409
&[data-mode='rows'] {
410+
--top-actions-spacing: 50%;
411+
396412
& :global([role='rowheader'] :nth-last-child(2) [role='presentation']) {
397413
display: none;
398414
}
399415
}
400416
401417
&[data-mode='indexes'] {
418+
--top-actions-spacing: 40%;
419+
402420
& :global([role='cell']:last-child [role='presentation']) {
403421
display: none;
404422
}
@@ -463,4 +481,11 @@
463481
margin-bottom: 15%;
464482
}
465483
}
484+
485+
@media (max-width: 768px) {
486+
// global but controlled properly!
487+
:global(main:has(.no-custom-columns) .console-container) {
488+
opacity: 0;
489+
}
490+
}
466491
</style>

0 commit comments

Comments
 (0)