change match table styles and notification styles
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "no-copy-frontend",
|
||||
"version": "0.89.0",
|
||||
"version": "0.90.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 2999",
|
||||
|
||||
@@ -159,6 +159,41 @@
|
||||
}
|
||||
}
|
||||
|
||||
.btn,
|
||||
.btn-s,
|
||||
.btn-m {
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-weight: 600;
|
||||
transition: all 0.3s;
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
padding: 12px 24px;
|
||||
font-size: 14px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.btn-s {
|
||||
padding: 6px 12px;
|
||||
font-size: 12px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-l {
|
||||
padding: 16px 32px;
|
||||
font-size: 16px;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: linear-gradient(135deg, v.$p-color, v.$s-color);
|
||||
color: v.$white;
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
|
||||
&-item {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
gap: 0px;
|
||||
padding: 10px 14px;
|
||||
border-bottom: 1px solid v.$b-color-1;
|
||||
transition: background-color 0.2s;
|
||||
@@ -216,6 +216,8 @@
|
||||
cursor: pointer;
|
||||
height: max-content;
|
||||
color: v.$p-color;
|
||||
align-self: start;
|
||||
padding-top: 5px;
|
||||
|
||||
svg {
|
||||
fill: v.$p-color;
|
||||
|
||||
@@ -28,8 +28,7 @@ $color-document: #a561e6;
|
||||
|
||||
$status-new: #fab005;
|
||||
$status-showed: #5a6e8a;
|
||||
/* $status-in-work: #3b82f6; */
|
||||
$status-in-work: #6366f1;
|
||||
$status-in-work: #3b82f6;
|
||||
$authorized-use: #2ecc71;
|
||||
|
||||
:root {
|
||||
|
||||
@@ -141,26 +141,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.btn-small {
|
||||
padding: 6px 12px;
|
||||
border-radius: 8px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-primary-small {
|
||||
/* background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||
color: white; */
|
||||
|
||||
border: 2px solid v.$status-in-work;
|
||||
color: v.$status-in-work;
|
||||
|
||||
@@ -216,7 +197,7 @@
|
||||
|
||||
&.selected {
|
||||
opacity: 1;
|
||||
border: 1px solid #6366f1;
|
||||
border-color: #cbd5e1;
|
||||
background: linear-gradient(180deg, #ffffff 0%, #e6eaf3 100%);
|
||||
}
|
||||
}
|
||||
@@ -251,6 +232,7 @@
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
box-shadow: 4px 4px 7px v.$bg-darkening;
|
||||
|
||||
img {
|
||||
object-fit: contain;
|
||||
@@ -264,7 +246,7 @@
|
||||
}
|
||||
|
||||
.source-url {
|
||||
color: v.$status-in-work;
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
text-decoration: none;
|
||||
@@ -286,6 +268,22 @@
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: auto;
|
||||
|
||||
a {
|
||||
font-weight: 600;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
svg {
|
||||
fill: #64748b;
|
||||
|
||||
&:hover {
|
||||
fill: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -330,23 +328,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.btn-action {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
padding: 12px 20px;
|
||||
border-radius: 12px;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
font-size: 14px;
|
||||
max-width: 300px;
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
.btn-case {
|
||||
background: linear-gradient(135deg, #6366f1, #8b5cf6);
|
||||
color: white;
|
||||
@@ -358,10 +339,6 @@
|
||||
}
|
||||
|
||||
.btn-resolve {
|
||||
/* background: linear-gradient(135deg, #10b981, #059669); */
|
||||
/* background: #10b981;
|
||||
color: white; */
|
||||
padding: 12px 30px;
|
||||
white-space: nowrap;
|
||||
color: #10b981;
|
||||
border: 2px solid #10b981;
|
||||
@@ -410,7 +387,8 @@
|
||||
}
|
||||
|
||||
&-title {
|
||||
border-bottom: 1px solid v.$border-color-1;
|
||||
/* border-bottom: 1px solid v.$border-color-1; */
|
||||
font-size: 18px;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 5px;
|
||||
@@ -432,6 +410,7 @@
|
||||
background: #f5f5f5;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
box-shadow: 4px 4px 10px v.$bg-darkening;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
@@ -475,6 +454,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
padding-left: 16px;
|
||||
/* gap: 10px; */
|
||||
}
|
||||
|
||||
@@ -485,15 +465,31 @@
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: v.$p-color;
|
||||
.source {
|
||||
color: #000;
|
||||
word-break: break-all;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
&-icon {
|
||||
svg {
|
||||
display: inline;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-left: 3px;
|
||||
fill: v.$text-s;
|
||||
cursor: pointer;
|
||||
padding-bottom: 4px;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
fill: #000;
|
||||
}
|
||||
}
|
||||
|
||||
&.hiden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&-status {
|
||||
@@ -514,7 +510,7 @@
|
||||
font-weight: 600;
|
||||
|
||||
div {
|
||||
color: v.$p-color;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -535,6 +531,8 @@
|
||||
&-header {
|
||||
flex-shrink: 0;
|
||||
padding-bottom: 5px;
|
||||
padding-right: 16px;
|
||||
padding-left: 10px;
|
||||
border-bottom: 1px solid rgb(226, 232, 240);
|
||||
|
||||
&-grid {
|
||||
@@ -580,6 +578,7 @@
|
||||
|
||||
.btn {
|
||||
min-width: 180px;
|
||||
background: v.$status-showed;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -644,6 +643,17 @@
|
||||
background: v.$status-in-work;
|
||||
|
||||
}
|
||||
|
||||
&.action {
|
||||
color: v.$status-showed;
|
||||
border: 2px solid v.$status-showed;
|
||||
}
|
||||
|
||||
&.action.active {
|
||||
color: v.$white;
|
||||
border: 2px solid v.$status-showed;
|
||||
background: v.$status-showed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -737,17 +747,24 @@
|
||||
|
||||
&:first-child {
|
||||
font-weight: 700;
|
||||
color: v.$p-color;
|
||||
color: v.$status-in-work;
|
||||
|
||||
.complaint-details-header {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&:nth-child(even) {
|
||||
background-color: v.$b-color-1;
|
||||
}
|
||||
|
||||
&:nth-child(odd) {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
&-header {
|
||||
background-color: #f8f9fa;
|
||||
background-color: v.$b-color-1;
|
||||
/* background-color: v.$b-color-1; */
|
||||
padding: 10px 16px;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
}
|
||||
@@ -756,19 +773,10 @@
|
||||
color: #495057;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
/* text-transform: uppercase; */
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
&-content {
|
||||
padding: 12px 16px;
|
||||
color: #212529;
|
||||
font-size: 15px;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
color: #212529;
|
||||
@@ -796,10 +804,9 @@
|
||||
.note-textarea {
|
||||
width: 100%;
|
||||
min-height: 80px;
|
||||
padding: 12px;
|
||||
padding: 10px 20px;
|
||||
border: 1px solid v.$border-color-1;
|
||||
border-radius: 8px;
|
||||
font-size: 14px;
|
||||
font-family: inherit;
|
||||
resize: vertical;
|
||||
box-sizing: border-box;
|
||||
@@ -807,8 +814,7 @@
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: #6366f1;
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
box-shadow: 2px 2px 4px v.$shadow-1;
|
||||
}
|
||||
|
||||
&-wrapper {
|
||||
@@ -829,7 +835,7 @@
|
||||
border-radius: 8px;
|
||||
box-sizing: border-box;
|
||||
background: #f8fafc;
|
||||
padding: 5px;
|
||||
padding: 10px 20px;
|
||||
|
||||
&::-webkit-outer-spin-button,
|
||||
&::-webkit-inner-spin-button {
|
||||
@@ -839,8 +845,7 @@
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: #6366f1;
|
||||
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||
box-shadow: 2px 2px 4px v.$shadow-1;
|
||||
}
|
||||
|
||||
&::placeholder {
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function FilePageNote() {
|
||||
<form method="POST">
|
||||
<input type="hidden" name="action" value="add_note" />
|
||||
<textarea name="note" className="note-textarea" placeholder="Добавить заметку к этому нарушению..." ></textarea>
|
||||
<button type="submit" className="btn-small btn-primary-small">
|
||||
<button type="submit" className="btn-s btn-primary-small">
|
||||
Сохранить заметку
|
||||
</button>
|
||||
</form>
|
||||
|
||||
@@ -86,10 +86,16 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
||||
<div className="note-form">
|
||||
<form action={formAction}>
|
||||
<input type="hidden" name="violationId" value={localViolation.id} />
|
||||
<label
|
||||
className="note-case-label"
|
||||
htmlFor="note"
|
||||
>
|
||||
{t('text-of-the-complaint')}
|
||||
</label>
|
||||
<textarea
|
||||
name="note"
|
||||
className="note-textarea"
|
||||
placeholder={`${t('text-of-the-complaint')}...`}
|
||||
placeholder={`${t('text-area-error-fill-complaint-text')}...`}
|
||||
value={noteText}
|
||||
onChange={(e) => setNoteText(e.target.value)}
|
||||
>
|
||||
@@ -99,7 +105,7 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
className="btn-small btn-primary-small"
|
||||
className="btn-s btn-primary-small"
|
||||
disabled={isPending}
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
@@ -110,7 +116,7 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
className="btn-small btn-primary-small"
|
||||
className="btn-s btn-primary-small"
|
||||
disabled={isPending}
|
||||
>
|
||||
{t('submit-violation')}
|
||||
@@ -262,40 +268,35 @@ export default function CaseComplaint({ selectedViolation, updateStatusHandler }
|
||||
<div className="complaint-details">
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<h5>ID: {item.id}</h5>
|
||||
<h5>COM-{item.id}</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('status')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.status}</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('date-of-creation')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">
|
||||
{item.created_at ? `${formatDate(item.created_at)}: ${formatDateTime(item.created_at)}` : '---'}
|
||||
<span className="complaint-details-title">{t('Status')}:</span> {item.status}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('date-of-update')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">
|
||||
{item.updated_at ? `${formatDate(item.updated_at)}: ${formatDateTime(item.updated_at)}` : '---'}
|
||||
<span className="complaint-details-title">{t('date-of-creation')}: {item.created_at ? `${formatDate(item.created_at)}: ${formatDateTime(item.created_at)}` : '---'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('text-of-the-complaint')}:</span>
|
||||
<span className="complaint-details-title">{t('date-of-update')}: {item.updated_at ? `${formatDate(item.updated_at)}: ${formatDateTime(item.updated_at)}` : '---'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('text-of-the-complaint')}:
|
||||
<br />
|
||||
{item.complaint_text}
|
||||
</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.complaint_text}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -149,6 +149,12 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
<section
|
||||
className="note-textarea-wrapper"
|
||||
>
|
||||
<label
|
||||
className="note-case-label"
|
||||
htmlFor="note"
|
||||
>
|
||||
{t('text-of-the-case')}
|
||||
</label>
|
||||
<textarea
|
||||
name="note"
|
||||
className="note-textarea"
|
||||
@@ -177,7 +183,7 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
className="btn-small btn-primary-small"
|
||||
className="btn-s btn-primary-small"
|
||||
disabled={isPending}
|
||||
>
|
||||
{t('submit-violation')}
|
||||
@@ -220,48 +226,41 @@ export default function CaseViolation({ selectedViolation, updateStatusHandler }
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('status')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.type}</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('date-of-creation')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">
|
||||
{item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}
|
||||
<span className="complaint-details-title">{t('Status')}: {item.type}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('date-of-update')}:</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">
|
||||
{item.updatedAt ? `${formatDate(item.updatedAt)}: ${formatDateTime(item.updatedAt)}` : '---'}
|
||||
<span className="complaint-details-title">{t('date-of-creation')}: {item.createdAt ? `${formatDate(item.createdAt)}: ${formatDateTime(item.createdAt)}` : '---'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('description')}:</span>
|
||||
<span className="complaint-details-title">{t('date-of-update')}: {item.updatedAt ? `${formatDate(item.updatedAt)}: ${formatDateTime(item.updatedAt)}` : '---'}</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.description}</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('amount-of-damage')}:</span>
|
||||
<span className="complaint-details-title">{t('amount-of-damage')}: {item.amount}</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.amount}</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('lawyer')}:</span>
|
||||
<span className="complaint-details-title">{t('lawyer')}: {item.lawyer}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="complaint-details-item">
|
||||
<div className="complaint-details-header">
|
||||
<span className="complaint-details-title">{t('description')}:
|
||||
<br />
|
||||
{item.description}
|
||||
</span>
|
||||
</div>
|
||||
<div className="complaint-details-content">{item.lawyer}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -68,13 +68,13 @@ export default function FilePageViolationInfoTabs({ selectedViolation, updateSta
|
||||
<div className="violation-info-tabs-wrapper">
|
||||
<div className="violation-info-tabs">
|
||||
<button
|
||||
className={`btn btn-primary ${activeTab === 'complaint' ? 'active' : ''}`}
|
||||
className={`btn-s btn-primary ${activeTab === 'complaint' ? 'active' : ''} ${localViolation.status === 'COMPLAINT_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? '' : 'action'}`}
|
||||
onClick={() => setActiveTab('complaint')}
|
||||
>
|
||||
{localViolation.status === 'COMPLAINT_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? 'Жалоба' : 'Подать жалобу'}
|
||||
</button>
|
||||
<button
|
||||
className={`btn btn-primary ${activeTab === 'legal' ? 'active' : ''}`}
|
||||
className={`btn-s btn-primary ${activeTab === 'legal' ? 'active' : ''} ${localViolation.status === 'LEGAL_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? '' : 'action'}`}
|
||||
onClick={() => setActiveTab('legal')}
|
||||
>
|
||||
{localViolation.status === 'LEGAL_IN_WORK' || localViolation.status === 'COMPLAINT_AND_LEGAL_IN_WORK' ? 'Претензия' : 'Подать претензию'}
|
||||
|
||||
@@ -15,6 +15,7 @@ import FilePageViolationEpmtyScreen from '@/app/ui/file-page/violation-table/fil
|
||||
import Image from 'next/image';
|
||||
import FilePageViolationInfoTabs from '@/app/ui/file-page/violation-table/file-page-violation-info-tabs';
|
||||
import { createPortal } from 'react-dom';
|
||||
import { IconContentCopy, IconFollowToLink, IconFullScreen } from '@/app/ui/icons/icons';
|
||||
|
||||
export default function FilePageViolationInfo({ selectedViolation }: { selectedViolation: ViolationFileDetail | null }) {
|
||||
const t = useTranslations('Global');
|
||||
@@ -23,6 +24,8 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
const [localViolation, setLocalViolation] = useState<ViolationFileDetail | null>(null);
|
||||
const [isUpdating, setIsUpdating] = useState(false);
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
const [isHovered, setIsHovered] = useState(false);
|
||||
const [copied, setCopied] = useState(false);
|
||||
|
||||
const openInNewTab = () => {
|
||||
if (selectedViolation?.url) {
|
||||
@@ -95,6 +98,32 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
);
|
||||
};
|
||||
|
||||
const handleCopyLink = () => {
|
||||
if (!selectedViolation?.page_url) return;
|
||||
|
||||
const linkToCopy = cleanUrlForDisplay(selectedViolation.page_url);
|
||||
|
||||
if (!navigator.clipboard) {
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = linkToCopy;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 2000);
|
||||
toast.success(`${t('copied')}: ${linkToCopy}`)
|
||||
return;
|
||||
}
|
||||
|
||||
navigator.clipboard.writeText(linkToCopy)
|
||||
.then(() => {
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 2000);
|
||||
toast.success(`${t('copied')}: ${linkToCopy}`)
|
||||
})
|
||||
.catch();
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -139,23 +168,14 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
onClick={() => setIsModalOpen(true)}
|
||||
title="Увеличить"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<circle cx="11" cy="11" r="8" />
|
||||
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
||||
<line x1="11" y1="8" x2="11" y2="14" />
|
||||
<line x1="8" y1="11" x2="14" y2="11" />
|
||||
</svg>
|
||||
<IconFullScreen />
|
||||
</button>
|
||||
<button
|
||||
className="image-btn image-btn-open"
|
||||
onClick={openInNewTab}
|
||||
title="Открыть в новой вкладке"
|
||||
>
|
||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2">
|
||||
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
|
||||
<polyline points="15 3 21 3 21 9" />
|
||||
<line x1="10" y1="14" x2="21" y2="3" />
|
||||
</svg>
|
||||
<IconFollowToLink />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -172,17 +192,34 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
className="violation-info-source"
|
||||
>
|
||||
<span>
|
||||
{t('source')}:
|
||||
{t('full-link')}:
|
||||
</span>
|
||||
<br />
|
||||
<Link
|
||||
href={selectedViolation?.page_url ? selectedViolation?.page_url : '#'}
|
||||
className="source"
|
||||
target="_blank"
|
||||
scroll={false}
|
||||
<div
|
||||
onMouseEnter={() => setIsHovered(true)}
|
||||
onMouseLeave={() => setIsHovered(false)}
|
||||
>
|
||||
{selectedViolation?.page_url ? cleanUrlForDisplay(selectedViolation?.page_url) : selectedViolation?.page_url}
|
||||
</Link>
|
||||
<span
|
||||
className="source"
|
||||
>
|
||||
{selectedViolation?.page_url ? cleanUrlForDisplay(selectedViolation?.page_url) : selectedViolation?.page_url}
|
||||
</span>
|
||||
|
||||
<span
|
||||
className={`violation-info-icon ${!isHovered ? 'hiden' : ''}`}
|
||||
onClick={handleCopyLink}
|
||||
>
|
||||
<IconContentCopy />
|
||||
</span>
|
||||
|
||||
<Link
|
||||
className={`violation-info-icon ${!isHovered ? 'hiden' : ''}`}
|
||||
href={selectedViolation?.page_url ? cleanUrlForDisplay(selectedViolation?.page_url) : '#'}
|
||||
target="_blank"
|
||||
scroll={false}
|
||||
>
|
||||
<IconFollowToLink />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div
|
||||
@@ -216,7 +253,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
className="violation-info-date"
|
||||
>
|
||||
<span>
|
||||
{t('date-of-creation')}:
|
||||
{t('date-of-discovery')}:
|
||||
</span>
|
||||
<div
|
||||
className="violation-info-date-value"
|
||||
@@ -235,7 +272,7 @@ export default function FilePageViolationInfo({ selectedViolation }: { selectedV
|
||||
className="violation-info-action"
|
||||
>
|
||||
<button
|
||||
className="btn-action btn-resolve"
|
||||
className="btn-s btn-resolve"
|
||||
onClick={() => {
|
||||
if (selectedViolation?.id) {
|
||||
updateStatusHandler(selectedViolation.id, 'AUTHORIZED_USE');
|
||||
|
||||
@@ -8,7 +8,7 @@ import FilePageViolationInfo from '@/app/ui/file-page/violation-table/file-page-
|
||||
import { useFileViolations } from '@/app/hooks/react-query/useFileViolations';
|
||||
import { ViolationFileDetail } from '@/app/hooks/react-query/useFileViolations';
|
||||
import DropDownList from '@/app/components/DropDownList';
|
||||
import { IconArrowLeft, IconArrowRight, IconDoubleArrowLeft, IconDoubleArrowRight } from '@/app/ui/icons/icons';
|
||||
import { IconArrowLeft, IconArrowRight, IconDoubleArrowLeft, IconDoubleArrowRight, IconFollowToLink } from '@/app/ui/icons/icons';
|
||||
import FilePageViolationsLoadingList from '@/app/ui/file-page/violation-table/file-page-violations-loading-list';
|
||||
import Image from 'next/image';
|
||||
|
||||
@@ -194,11 +194,10 @@ export default function FilePageViolationsList({
|
||||
<div className="source-actions">
|
||||
<Link
|
||||
href={item.page_url}
|
||||
className="btn-small btn-primary-small"
|
||||
target="_blank"
|
||||
scroll={false}
|
||||
>
|
||||
{t('open')}
|
||||
<IconFollowToLink />
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -243,3 +243,21 @@ export function IconInfoMessage() {
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" ><path d="M440-280h80v-240h-80v240Zm68.5-331.5Q520-623 520-640t-11.5-28.5Q497-680 480-680t-28.5 11.5Q440-657 440-640t11.5 28.5Q463-600 480-600t28.5-11.5ZM480-80q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" /></svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function IconContentCopy() {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" /></svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function IconFollowToLink() {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z" /></svg>
|
||||
)
|
||||
}
|
||||
|
||||
export function IconFullScreen() {
|
||||
return (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000"><path d="M120-120v-200h80v120h120v80H120Zm520 0v-80h120v-120h80v200H640ZM120-640v-200h200v80H200v120h-80Zm640 0v-120H640v-80h200v200h-80Z"/></svg>
|
||||
)
|
||||
}
|
||||
@@ -421,7 +421,10 @@
|
||||
"protected-files": "Protected files",
|
||||
"storage": "Storage",
|
||||
"Status": "Status",
|
||||
"under-moderation": "Under moderation"
|
||||
"under-moderation": "Under moderation",
|
||||
"full-link": "Full link",
|
||||
"follow-the-link": "Follow the link",
|
||||
"date-of-discovery": "Date of discovery"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "and",
|
||||
|
||||
@@ -421,7 +421,10 @@
|
||||
"protected-files": "Защищено файлов",
|
||||
"storage": "Хранилище",
|
||||
"Status": "Статус",
|
||||
"under-moderation": "На модерации"
|
||||
"under-moderation": "На модерации",
|
||||
"full-link": "Полная ссылка",
|
||||
"follow-the-link": "Перейти",
|
||||
"date-of-discovery": "Дата обнаружения"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "и",
|
||||
@@ -527,8 +530,8 @@
|
||||
"Match-status": {
|
||||
"NEW": "Новый",
|
||||
"SHOWED": "Просмотрен",
|
||||
"LEGAL_IN_WORK": "Дело в работе",
|
||||
"COMPLAINT_IN_WORK": "Претензия в работе",
|
||||
"LEGAL_IN_WORK": "Претензия в работе",
|
||||
"COMPLAINT_IN_WORK": "Жалоба в работе",
|
||||
"COMPLAINT_AND_LEGAL_IN_WORK": "Дело и претензия в работе",
|
||||
"AUTHORIZED_USE": "Разрешенное использование",
|
||||
"CREATED": "Новый"
|
||||
|
||||
Reference in New Issue
Block a user