Skip to content

Commit

Permalink
Pull request: 4815 fix query log modal on tablet
Browse files Browse the repository at this point in the history
Updates AdguardTeam#4815

Squashed commit of the following:

commit 148c39a
Merge: 3447611 ab6da05
Author: Ildar Kamalov <[email protected]>
Date:   Tue Sep 20 13:21:06 2022 +0300

    Merge branch 'master' into 4815-tablet-view

commit 3447611
Author: Ildar Kamalov <[email protected]>
Date:   Fri Sep 16 17:01:05 2022 +0300

    client: fix query log modal on tablet
  • Loading branch information
IldarKamalov authored and annguyen0 committed Sep 21, 2022
1 parent 0c66a78 commit f7dcf18
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 27 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Logs/Cells/ClientCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const ClientCell = ({
'white-space--nowrap': isDetailed,
});

const hintClass = classNames('icons mr-4 icon--24 icon--lightgray', {
const hintClass = classNames('icons mr-4 icon--24 logs__question icon--lightgray', {
'my-3': isDetailed,
});

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Logs/Cells/DomainCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const DomainCell = ({
'my-3': isDetailed,
});

const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block', {
const privacyIconClass = classNames('icons mx-2 icon--24 d-none d-sm-block logs__question', {
'icon--green': hasTracker,
'icon--disabled': !hasTracker,
'my-3': isDetailed,
Expand Down
10 changes: 6 additions & 4 deletions client/src/components/Logs/Cells/IconTooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
padding-top: 1rem;
}

@media (max-width: 1024px) {
.grid .key-colon, .grid .title--border {
font-weight: 600;
}
}

@media (max-width: 767.98px) {
.grid {
grid-template-columns: 35% 55%;
Expand All @@ -70,10 +76,6 @@
grid-column: 2 / span 1;
margin: 0 !important;
}

.grid .key-colon, .grid .title--border {
font-weight: 600;
}
}

.grid .key-colon:nth-child(odd)::after {
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/Logs/Cells/ResponseCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const ResponseCell = ({
return (
<div className="logs__cell logs__cell--response" role="gridcell">
<IconTooltip
className={classNames('icons mr-4 icon--24 icon--lightgray', { 'my-3': isDetailed })}
className={classNames('icons mr-4 icon--24 icon--lightgray logs__question', { 'my-3': isDetailed })}
columnClass='grid grid--limited'
tooltipClass='px-5 pb-5 pt-4 mw-75 custom-tooltip__response-details'
contentItemClass='text-truncate key-colon o-hidden'
Expand Down
10 changes: 10 additions & 0 deletions client/src/components/Logs/Logs.css
Original file line number Diff line number Diff line change
Expand Up @@ -485,3 +485,13 @@
.bg--green {
color: var(--green79);
}

@media (max-width: 1024px) {
.logs__question {
display: none;
}
}

.logs__modal {
max-width: 720px;
}
47 changes: 27 additions & 20 deletions client/src/components/Logs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,27 +184,34 @@ const Logs = () => {
setButtonType={setButtonType}
setModalOpened={setModalOpened}
/>
<Modal portalClassName='grid' isOpen={isSmallScreen && isModalOpened}
onRequestClose={closeModal}
style={{
content: {
width: '100%',
height: 'fit-content',
left: 0,
top: 47,
padding: '1rem 1.5rem 1rem',
},
overlay: {
backgroundColor: 'rgba(0,0,0,0.5)',
},
}}
<Modal
portalClassName='grid'
isOpen={isSmallScreen && isModalOpened}
onRequestClose={closeModal}
style={{
content: {
width: '100%',
height: 'fit-content',
left: '50%',
top: 47,
padding: '1rem 1.5rem 1rem',
maxWidth: '720px',
transform: 'translateX(-50%)',
},
overlay: {
backgroundColor: 'rgba(0,0,0,0.5)',
},
}}
>
<svg
className="icon icon--24 icon-cross d-block d-md-none cursor--pointer"
onClick={closeModal}>
<use xlinkHref="#cross" />
</svg>
{processContent(detailedDataCurrent, buttonType)}
<div className="logs__modal-wrap">
<svg
className="icon icon--24 icon-cross d-block cursor--pointer"
onClick={closeModal}
>
<use xlinkHref="#cross" />
</svg>
{processContent(detailedDataCurrent, buttonType)}
</div>
</Modal>
</>;

Expand Down

0 comments on commit f7dcf18

Please sign in to comment.