mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01: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
|
@ -525,12 +525,12 @@ a.mention span {
|
|||
opacity: 0;
|
||||
}
|
||||
|
||||
button.carousel-button,
|
||||
:is(.button, button).carousel-button,
|
||||
button.carousel-dot {
|
||||
pointer-events: auto;
|
||||
font-weight: bold;
|
||||
}
|
||||
button.carousel-button[hidden] {
|
||||
:is(.button, button).carousel-button[hidden] {
|
||||
display: inline-block;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
|
|
|
@ -1348,13 +1348,26 @@ function Carousel({ mediaAttachments, index = 0, onClose = () => {} }) {
|
|||
</div>
|
||||
<div class="carousel-top-controls" hidden={!showControls}>
|
||||
<span />
|
||||
<button
|
||||
type="button"
|
||||
class="carousel-button plain2"
|
||||
onClick={() => onClose()}
|
||||
>
|
||||
<Icon icon="x" />
|
||||
</button>
|
||||
<span>
|
||||
<a
|
||||
href={
|
||||
mediaAttachments[currentIndex]?.remoteUrl ||
|
||||
mediaAttachments[currentIndex]?.url
|
||||
}
|
||||
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>
|
||||
{mediaAttachments?.length > 1 && (
|
||||
<div class="carousel-controls" hidden={!showControls}>
|
||||
|
|
Loading…
Reference in a new issue