diff options
author | Eric Bailey <git@esb.lol> | 2024-10-14 16:06:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-14 16:06:23 -0500 |
commit | 4c3c10d7f892777e48faccd534441ac7d88df042 (patch) | |
tree | 1d33ddaea5f4a7365325c5c951344dd994d1c8b4 /src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx | |
parent | 2d88463453abfad1e9e45bbd6cdbcd5824a7e770 (diff) | |
download | voidsky-4c3c10d7f892777e48faccd534441ac7d88df042.tar.zst |
Link cards (#5677)
* New link card styles * Cleanup of consituent parts, add hover state * Fix gif alt text view * Fix alt text view more * Remove dupe * Update remove button * Remove added margin on gif
Diffstat (limited to 'src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx')
-rw-r--r-- | src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx | 55 |
1 files changed, 3 insertions, 52 deletions
diff --git a/src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx b/src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx index 6d5eacd1a..8ac7ee499 100644 --- a/src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx +++ b/src/view/com/util/post-embeds/ExternalPlayerEmbed.tsx @@ -29,7 +29,6 @@ import {atoms as a, useTheme} from '#/alf' import {useDialogControl} from '#/components/Dialog' import {EmbedConsentDialog} from '#/components/dialogs/EmbedConsent' import {Fill} from '#/components/Fill' -import {MediaInsetBorder} from '#/components/MediaInsetBorder' import {PlayButtonIcon} from '#/components/video/PlayButtonIcon' import {EventStopper} from '../EventStopper' @@ -59,7 +58,7 @@ function PlaceholderOverlay({ accessibilityLabel={_(msg`Play Video`)} accessibilityHint={_(msg`Play Video`)} onPress={onPress} - style={[styles.overlayContainer, styles.topRadius]}> + style={[styles.overlayContainer]}> {!isPlayerActive ? ( <PlayButtonIcon /> ) : ( @@ -108,16 +107,6 @@ function Player({ style={styles.webview} setSupportMultipleWindows={false} // Prevent any redirects from opening a new window (ads) /> - - <MediaInsetBorder - opaque - style={[ - { - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, - }, - ]} - /> </EventStopper> ) } @@ -227,66 +216,34 @@ export function ExternalPlayer({ <Animated.View ref={viewRef} collapsable={false} - style={[ - aspect, - a.rounded_md, - a.overflow_hidden, - { - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, - }, - ]}> + style={[aspect, a.overflow_hidden]}> {link.thumb && (!isPlayerActive || isLoading) ? ( <> <Image - style={[a.flex_1, styles.topRadius]} + style={[a.flex_1]} source={{uri: link.thumb}} accessibilityIgnoresInvertColors /> <Fill style={[ - a.rounded_md, t.name === 'light' ? t.atoms.bg_contrast_975 : t.atoms.bg, { - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, opacity: 0.3, }, ]} /> - <MediaInsetBorder - opaque - style={[ - { - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, - }, - ]} - /> </> ) : ( <Fill style={[ - a.rounded_md, { backgroundColor: t.name === 'light' ? t.palette.contrast_975 : 'black', - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, opacity: 0.3, }, ]} /> )} - <MediaInsetBorder - opaque - style={[ - { - borderBottomLeftRadius: 0, - borderBottomRightRadius: 0, - }, - ]} - /> <PlaceholderOverlay isLoading={isLoading} isPlayerActive={isPlayerActive} @@ -303,10 +260,6 @@ export function ExternalPlayer({ } const styles = StyleSheet.create({ - topRadius: { - borderTopLeftRadius: a.rounded_md.borderRadius, - borderTopRightRadius: a.rounded_md.borderRadius, - }, overlayContainer: { flex: 1, justifyContent: 'center', @@ -319,8 +272,6 @@ const styles = StyleSheet.create({ zIndex: 3, }, webview: { - borderTopRightRadius: a.rounded_md.borderRadius, - borderTopLeftRadius: a.rounded_md.borderRadius, backgroundColor: 'transparent', }, gifContainer: { |