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;
|
pointer-events: auto;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
.carousel-top-controls .szh-menu-container {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
:is(.button, button).carousel-button[hidden] {
|
:is(.button, button).carousel-button[hidden] {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { useHotkeys } from 'react-hotkeys-hook';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import Link from './link';
|
import Link from './link';
|
||||||
import Media from './media';
|
import Media from './media';
|
||||||
|
import MenuLink from './menu-link';
|
||||||
import Modal from './modal';
|
import Modal from './modal';
|
||||||
import TranslationBlock from './translation-block';
|
import TranslationBlock from './translation-block';
|
||||||
|
|
||||||
|
@ -178,6 +179,32 @@ function MediaModal({
|
||||||
<span />
|
<span />
|
||||||
)}
|
)}
|
||||||
<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
|
<Link
|
||||||
to={instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`}
|
to={instance ? `/${instance}/s/${statusID}` : `/s/${statusID}`}
|
||||||
class="button carousel-button media-post-link plain3"
|
class="button carousel-button media-post-link plain3"
|
||||||
|
@ -191,18 +218,7 @@ function MediaModal({
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span class="button-label">See post </span>»
|
<span class="button-label">See post </span>»
|
||||||
</Link>{' '}
|
</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>{' '}
|
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{mediaAttachments?.length > 1 && (
|
{mediaAttachments?.length > 1 && (
|
||||||
|
|
|
@ -8,7 +8,7 @@ import store from '../utils/store';
|
||||||
|
|
||||||
import Avatar from './avatar';
|
import Avatar from './avatar';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import MenuLink from './MenuLink';
|
import MenuLink from './menu-link';
|
||||||
|
|
||||||
function NavMenu(props) {
|
function NavMenu(props) {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
|
|
|
@ -12,7 +12,7 @@ import states from '../utils/states';
|
||||||
import AsyncText from './AsyncText';
|
import AsyncText from './AsyncText';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import Link from './link';
|
import Link from './link';
|
||||||
import MenuLink from './MenuLink';
|
import MenuLink from './menu-link';
|
||||||
|
|
||||||
function Shortcuts() {
|
function Shortcuts() {
|
||||||
const snapStates = useSnapshot(states);
|
const snapStates = useSnapshot(states);
|
||||||
|
|
|
@ -39,7 +39,7 @@ import Avatar from './avatar';
|
||||||
import Icon from './icon';
|
import Icon from './icon';
|
||||||
import Link from './link';
|
import Link from './link';
|
||||||
import Media from './media';
|
import Media from './media';
|
||||||
import MenuLink from './MenuLink';
|
import MenuLink from './menu-link';
|
||||||
import RelativeTime from './relative-time';
|
import RelativeTime from './relative-time';
|
||||||
import TranslationBlock from './translation-block';
|
import TranslationBlock from './translation-block';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue