mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-04-06 16:43:40 +03:00
Add link to media in carousel modal
This commit is contained in:
parent
842db90f9c
commit
951c93a070
2 changed files with 22 additions and 9 deletions
src
|
@ -525,12 +525,12 @@ a.mention span {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
button.carousel-button,
|
:is(.button, button).carousel-button,
|
||||||
button.carousel-dot {
|
button.carousel-dot {
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
button.carousel-button[hidden] {
|
:is(.button, button).carousel-button[hidden] {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
|
@ -1348,13 +1348,26 @@ function Carousel({ mediaAttachments, index = 0, onClose = () => {} }) {
|
||||||
</div>
|
</div>
|
||||||
<div class="carousel-top-controls" hidden={!showControls}>
|
<div class="carousel-top-controls" hidden={!showControls}>
|
||||||
<span />
|
<span />
|
||||||
<button
|
<span>
|
||||||
type="button"
|
<a
|
||||||
class="carousel-button plain2"
|
href={
|
||||||
onClick={() => onClose()}
|
mediaAttachments[currentIndex]?.remoteUrl ||
|
||||||
>
|
mediaAttachments[currentIndex]?.url
|
||||||
<Icon icon="x" />
|
}
|
||||||
</button>
|
target="_blank"
|
||||||
|
class="button carousel-button plain2"
|
||||||
|
title="Open original media in new window"
|
||||||
|
>
|
||||||
|
<Icon icon="popout" alt="Open original media in new window" />
|
||||||
|
</a>{' '}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="carousel-button plain2"
|
||||||
|
onClick={() => onClose()}
|
||||||
|
>
|
||||||
|
<Icon icon="x" />
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{mediaAttachments?.length > 1 && (
|
{mediaAttachments?.length > 1 && (
|
||||||
<div class="carousel-controls" hidden={!showControls}>
|
<div class="carousel-controls" hidden={!showControls}>
|
||||||
|
|
Loading…
Add table
Reference in a new issue