mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-24 00:38:49 +01:00
Hide open media file in More button
This commit is contained in:
parent
2680601bc6
commit
1d1bb1de61
6 changed files with 34 additions and 15 deletions
|
@ -900,6 +900,9 @@ button.carousel-dot {
|
|||
pointer-events: auto;
|
||||
font-weight: bold;
|
||||
}
|
||||
.carousel-top-controls .szh-menu-container {
|
||||
pointer-events: auto;
|
||||
}
|
||||
:is(.button, button).carousel-button[hidden] {
|
||||
display: inline-block;
|
||||
opacity: 0;
|
||||
|
|
|
@ -6,6 +6,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
|
|||
import Icon from './icon';
|
||||
import Link from './link';
|
||||
import Media from './media';
|
||||
import MenuLink from './menu-link';
|
||||
import Modal from './modal';
|
||||
import TranslationBlock from './translation-block';
|
||||
|
||||
|
@ -178,6 +179,32 @@ function MediaModal({
|
|||
<span />
|
||||
)}
|
||||
<span>
|
||||
<Menu
|
||||
overflow="auto"
|
||||
align="end"
|
||||
position="anchor"
|
||||
boundingBoxPadding="8 8 8 8"
|
||||
offsetY={4}
|
||||
menuClassName="glass-menu"
|
||||
menuButton={
|
||||
<button type="button" class="carousel-button plain3">
|
||||
<Icon icon="more" alt="More" />
|
||||
</button>
|
||||
}
|
||||
>
|
||||
<MenuLink
|
||||
href={
|
||||
mediaAttachments[currentIndex]?.remoteUrl ||
|
||||
mediaAttachments[currentIndex]?.url
|
||||
}
|
||||
class="carousel-button plain3"
|
||||
target="_blank"
|
||||
title="Open original media in new window"
|
||||
>
|
||||
<Icon icon="popout" />
|
||||
<span>Open original media</span>
|
||||
</MenuLink>
|
||||
</Menu>{' '}
|
||||
<Link
|
||||
to={instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`}
|
||||
class="button carousel-button media-post-link plain3"
|
||||
|
@ -191,18 +218,7 @@ function MediaModal({
|
|||
}}
|
||||
>
|
||||
<span class="button-label">See post </span>»
|
||||
</Link>{' '}
|
||||
<a
|
||||
href={
|
||||
mediaAttachments[currentIndex]?.remoteUrl ||
|
||||
mediaAttachments[currentIndex]?.url
|
||||
}
|
||||
target="_blank"
|
||||
class="button carousel-button plain3"
|
||||
title="Open original media in new window"
|
||||
>
|
||||
<Icon icon="popout" alt="Open original media in new window" />
|
||||
</a>{' '}
|
||||
</Link>
|
||||
</span>
|
||||
</div>
|
||||
{mediaAttachments?.length > 1 && (
|
||||
|
|
|
@ -8,7 +8,7 @@ import store from '../utils/store';
|
|||
|
||||
import Avatar from './avatar';
|
||||
import Icon from './icon';
|
||||
import MenuLink from './MenuLink';
|
||||
import MenuLink from './menu-link';
|
||||
|
||||
function NavMenu(props) {
|
||||
const snapStates = useSnapshot(states);
|
||||
|
|
|
@ -12,7 +12,7 @@ import states from '../utils/states';
|
|||
import AsyncText from './AsyncText';
|
||||
import Icon from './icon';
|
||||
import Link from './link';
|
||||
import MenuLink from './MenuLink';
|
||||
import MenuLink from './menu-link';
|
||||
|
||||
function Shortcuts() {
|
||||
const snapStates = useSnapshot(states);
|
||||
|
|
|
@ -39,7 +39,7 @@ import Avatar from './avatar';
|
|||
import Icon from './icon';
|
||||
import Link from './link';
|
||||
import Media from './media';
|
||||
import MenuLink from './MenuLink';
|
||||
import MenuLink from './menu-link';
|
||||
import RelativeTime from './relative-time';
|
||||
import TranslationBlock from './translation-block';
|
||||
|
||||
|
|
Loading…
Reference in a new issue