change pagination styles for file matches table
This commit is contained in:
@@ -4417,6 +4417,7 @@
|
|||||||
grid-template-columns: 1fr 3fr;
|
grid-template-columns: 1fr 3fr;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
height: 80vh;
|
height: 80vh;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.sources-list {
|
.sources-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -4424,10 +4425,6 @@
|
|||||||
gap: 15px;
|
gap: 15px;
|
||||||
|
|
||||||
.source-card {
|
.source-card {
|
||||||
/* background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
|
|
||||||
border-radius: 12px;
|
|
||||||
border: 1px solid v.$border-color-1; */
|
|
||||||
|
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border: 1px solid #f3f4f6;
|
border: 1px solid #f3f4f6;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
@@ -4441,7 +4438,6 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
/* flex-direction: column; */
|
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
@@ -4503,6 +4499,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sources-list-pagination {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
.source-status {
|
.source-status {
|
||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -4696,37 +4698,55 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pagination {
|
.pagination-controls {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: start;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 0.5rem;
|
||||||
margin-top: 20px;
|
|
||||||
|
|
||||||
&-item {
|
.arrow {
|
||||||
padding: 8px 12px;
|
padding-left: 0.5rem;
|
||||||
border-radius: 8px;
|
padding-right: 0.5rem;
|
||||||
text-decoration: none;
|
padding-top: 0.25rem;
|
||||||
font-weight: 600;
|
padding-bottom: 0.25rem;
|
||||||
background: white;
|
border: 2px solid v.$border-color-1;
|
||||||
color: #374151;
|
border-radius: 10px;
|
||||||
border: 2px solid #e5e7eb;
|
box-shadow: 0 1px 2px #0000000d;
|
||||||
transition: all 0.2s ease;
|
color: v.$p-color;
|
||||||
|
|
||||||
|
.icon {
|
||||||
|
width: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: v.$bg-light;
|
||||||
|
}
|
||||||
|
|
||||||
&:disabled {
|
&:disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.5;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&-pages {
|
||||||
border-color: #667eea;
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
|
||||||
|
button {
|
||||||
|
border: 2px solid v.$border-color-1;
|
||||||
|
padding: 0.25rem 0.75rem;
|
||||||
|
border-radius: 10px;
|
||||||
|
color: v.$p-color;
|
||||||
|
|
||||||
|
&.current {
|
||||||
|
background-color: v.$p-color;
|
||||||
|
color: v.$white;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-active {
|
&.other {
|
||||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
|
||||||
color: white;
|
|
||||||
border: 2px solid #667eea;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: #667eea;
|
background-color: v.$bg-light;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import FilePageViolationInfo from '@/app/ui/file-page/violation-table/file-page-
|
|||||||
import { useFileViolations } from '@/app/hooks/react-query/useFileViolations';
|
import { useFileViolations } from '@/app/hooks/react-query/useFileViolations';
|
||||||
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
||||||
import DropDownList from '@/app/components/DropDownList';
|
import DropDownList from '@/app/components/DropDownList';
|
||||||
|
import { IconArrowLeft, IconArrowRight } from '@/app/ui/icons/icons';
|
||||||
|
|
||||||
export default function FilePageViolationsList({
|
export default function FilePageViolationsList({
|
||||||
currentPage,
|
currentPage,
|
||||||
@@ -96,9 +97,6 @@ export default function FilePageViolationsList({
|
|||||||
<li value="AUTHORIZED_USE">{tStatus('AUTHORIZED_USE')}</li>
|
<li value="AUTHORIZED_USE">{tStatus('AUTHORIZED_USE')}</li>
|
||||||
</DropDownList>
|
</DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
|
||||||
{t('total-violations')}: {fileViolations.total_elements} | {t('page')} {fileViolations.current_page} {t('out-of')} {fileViolations.total_pages}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -173,35 +171,48 @@ export default function FilePageViolationsList({
|
|||||||
<FilePageViolationInfo selectedViolation={selectedViolation} />
|
<FilePageViolationInfo selectedViolation={selectedViolation} />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div
|
||||||
|
className="sources-list-pagination"
|
||||||
|
>
|
||||||
|
<span>
|
||||||
|
{t('total-violations')}: {fileViolations.total_elements} | {t('page')} {fileViolations.current_page} {t('out-of')} {fileViolations.total_pages}
|
||||||
|
</span>
|
||||||
{fileViolations.total_pages > 1 && (
|
{fileViolations.total_pages > 1 && (
|
||||||
<div className="pagination">
|
<div className="pagination-controls">
|
||||||
<button
|
<button
|
||||||
onClick={() => handlePageChange(currentPage - 1)}
|
onClick={() => handlePageChange(currentPage - 1)}
|
||||||
className="pagination-item pagination-item-prev"
|
className="arrow"
|
||||||
disabled={!fileViolations.has_previous}
|
disabled={!fileViolations.has_previous}
|
||||||
>
|
>
|
||||||
{t('previous')}
|
<IconArrowLeft />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<div
|
||||||
|
className="pagination-controls-pages"
|
||||||
|
>
|
||||||
{getPageNumbers().map(pageNum => (
|
{getPageNumbers().map(pageNum => (
|
||||||
<button
|
<button
|
||||||
key={pageNum}
|
key={pageNum}
|
||||||
onClick={() => handlePageChange(pageNum)}
|
onClick={() => handlePageChange(pageNum)}
|
||||||
className={`pagination-item ${currentPage === pageNum ? 'pagination-item-active' : ''}`}
|
/* className={`pagination-item ${currentPage === pageNum ? 'pagination-item-active' : ''}`} */
|
||||||
|
className={currentPage === pageNum ? 'current' : 'other'}
|
||||||
>
|
>
|
||||||
{pageNum}
|
{pageNum}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={() => handlePageChange(currentPage + 1)}
|
onClick={() => handlePageChange(currentPage + 1)}
|
||||||
className="pagination-item pagination-item-next"
|
className="arrow"
|
||||||
disabled={!fileViolations.has_next}
|
disabled={!fileViolations.has_next}
|
||||||
>
|
>
|
||||||
{t('next')}
|
<IconArrowRight />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user