feat(settings): implement document removal and responsive table layout
Add a confirmation workflow for removing documents and refactor the documents table to support responsive layouts. The table now uses a fixed layout with defined column widths and handles overflow on mobile devices. The redundant filename column has been removed.
This commit is contained in:
@@ -208,6 +208,10 @@
|
||||
background-color: color-mix(in srgb, var(--color-primary) 78%, #000);
|
||||
}
|
||||
|
||||
.file-remove-btn:hover{
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@keyframes fadeInDown {
|
||||
from { opacity: 0; transform: translateY(-10px); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
@@ -428,6 +432,50 @@
|
||||
}
|
||||
.documents-table-wrapper {
|
||||
border: 1px solid var(--color-card-border);
|
||||
/* Clip the table to the rounded corners on wide layouts. */
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/*
|
||||
* md and below (Tailwind md = 48rem/768px).
|
||||
*
|
||||
* Six fixed-percentage columns stop being readable well before 768px: the date wraps,
|
||||
* and the status column's error text overflows its column and bleeds into the
|
||||
* neighbouring cells — which is what makes the row contents look mixed.
|
||||
*
|
||||
* Switching to `table-layout: auto` lets each column size to its own content, so no
|
||||
* cell can overflow into the next one. The table then grows past the card and the
|
||||
* wrapper scrolls horizontally instead of squeezing the columns.
|
||||
*/
|
||||
@media (max-width: 767.98px) {
|
||||
.documents-table-wrapper {
|
||||
overflow-x: auto;
|
||||
/* Keep the scroll chain inside the card instead of leaking to the page. */
|
||||
overscroll-behavior-x: contain;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
|
||||
.documents-table {
|
||||
/* Auto layout ignores the <col> percentages, so columns follow their content. */
|
||||
table-layout: auto;
|
||||
min-width: 720px;
|
||||
}
|
||||
|
||||
/* Short cells stay on one line so each column keeps a clean width. */
|
||||
.documents-table th,
|
||||
.documents-table td {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Title and status hold long text; let them wrap instead of widening the table. */
|
||||
.documents-table td:nth-child(1),
|
||||
.documents-table td:nth-child(2) {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.documents-table td:nth-child(1) {
|
||||
max-width: 220px;
|
||||
}
|
||||
}
|
||||
.documents-table {
|
||||
border-collapse: separate;
|
||||
@@ -439,6 +487,8 @@
|
||||
text-align: right;
|
||||
vertical-align: top;
|
||||
border-bottom: 1px solid var(--color-card-border);
|
||||
/* Fixed layout fits the card; wrap long tokens so a cell never widens the table. */
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.documents-table thead th {
|
||||
background: var(--sidebar-hover);
|
||||
@@ -562,6 +612,10 @@
|
||||
padding: 1rem 1.25rem;
|
||||
border-bottom: 1px solid var(--color-card-border);
|
||||
}
|
||||
/* Narrower variant for confirmations (e.g. remove document). */
|
||||
.review-modal--sm {
|
||||
max-width: 30rem;
|
||||
}
|
||||
.review-modal-body {
|
||||
padding: 1.25rem;
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user