diff --git a/src/app/pages/settings/settings.page.css b/src/app/pages/settings/settings.page.css index 64cc985..8f8c67e 100644 --- a/src/app/pages/settings/settings.page.css +++ b/src/app/pages/settings/settings.page.css @@ -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
| نام فایل | عنوان سند | وضعیت پردازش | تعداد بخشها | @@ -513,11 +520,9 @@ @for (doc of documents(); track doc.id) {|||
|---|---|---|---|---|---|---|
| - {{ doc.filename }} - | -- {{ doc.title ?? '—' }} + {{ + doc.title ?? '—' + }} | {{ formatDateTime(doc.created_at) }} | -+ |
@if (doc.status === 'ready' && !isReviewNeeded(doc) && isAdmin()) {
@if (togglingDocId() === doc.id) {
@@ -632,6 +637,30 @@
تلاشمجدد
}
+
|
||
|
هیچ سندی با فیلتر انتخابشده مطابقت ندارد.
@@ -884,6 +913,57 @@
}
+
+
+ @if (deletingDoc(); as doc) {
+
+
+ }
}
@@ -946,6 +1026,25 @@
+
+
+
+ حذف سند+ +
+
+
+ + آیا از حذف سند «{{ doc.title ?? doc.filename }}» مطمئن هستید؟ این عملیات قابل بازگشت نیست. + +
+
diff --git a/src/app/pages/settings/settings.page.spec.ts b/src/app/pages/settings/settings.page.spec.ts
index b1a1bd8..eba9f69 100644
--- a/src/app/pages/settings/settings.page.spec.ts
+++ b/src/app/pages/settings/settings.page.spec.ts
@@ -30,12 +30,18 @@ function readyDoc(): DocumentListItem {
};
}
+const toastr = { success: vi.fn(), error: vi.fn(), warning: vi.fn(), info: vi.fn() };
+
const filterSelect = (el: HTMLElement): HTMLSelectElement | null => el.querySelector('.documents-filters select');
describe('SettingsPage — document filters', () => {
let getDocuments: ReturnType
+
+
+ در صورت فعال بودن، محتوای استخراجشده از اسناد FAQ باید توسط ادمین بازبینی و تأیید شود.
+
+
+
+
+
+ | ||||||