style fixes

This commit is contained in:
Sean Yesmunt 2020-04-29 10:00:48 -04:00
parent df4ff30c83
commit dd4cd9314c
3 changed files with 44 additions and 46 deletions

View file

@ -120,6 +120,9 @@ function SideNavigation(props: Props) {
...buildLink(PAGES.LIBRARY, __('Library'), ICONS.LIBRARY),
},
// @endif
{
...(expanded ? { ...buildLink(PAGES.SETTINGS, __('Settings'), ICONS.SETTINGS) } : {}),
},
].map(
linkProps =>
linkProps.navigate && (
@ -164,9 +167,6 @@ function SideNavigation(props: Props) {
{
...buildLink(PAGES.PUBLISH, __('Publish'), ICONS.PUBLISH),
},
{
...buildLink(PAGES.SETTINGS, __('Settings'), ICONS.SETTINGS),
},
{
...buildLink(PAGES.HELP, __('Help'), ICONS.HELP),
},

View file

@ -57,7 +57,6 @@ function VideoViewer(props: Props) {
} = props;
const claimId = claim && claim.claim_id;
const isAudio = contentType.includes('audio');
const forcePlayer = FORCE_CONTENT_TYPE_PLAYER.includes(contentType);
const [isPlaying, setIsPlaying] = useState(false);
const [showAutoplayCountdown, setShowAutoplayCountdown] = useState(false);
@ -85,7 +84,6 @@ function VideoViewer(props: Props) {
function doTrackingFirstPlay(e: Event, data: any) {
analytics.videoStartEvent(claimId, data.secondsToLoad);
doAnalyticsView(uri, data.secondsToLoad).then(() => {
claimRewards();
});
@ -110,7 +108,8 @@ function VideoViewer(props: Props) {
setIsPlaying(false);
}
const onPlayerReady = useCallback((player: Player) => {
const onPlayerReady = useCallback(
(player: Player) => {
if (!embedded) {
player.muted(muted);
player.volume(volume);
@ -125,17 +124,8 @@ function VideoViewer(props: Props) {
});
Promise.race([playPromise, timeoutPromise]).catch(error => {
if (error === PLAY_TIMEOUT_ERROR) {
// The player promise hung
// This is probably in firefox
// The second attempt usually works
player.play();
} else {
// Autoplay was actually blocked by the browser
// Reset everything so the user sees the thumbnail/play button and can start it on their own
setIsLoading(false);
setIsPlaying(false);
}
});
}
@ -157,7 +147,9 @@ function VideoViewer(props: Props) {
if (position) {
player.currentTime(position);
}
}, []);
},
[uri]
);
return (
<div

View file

@ -343,7 +343,6 @@
.vjs-big-play-button {
@extend .button--icon;
@extend .button--play;
background-color: rgba(0, 0, 0, 0.6);
border: none;
position: static;
z-index: 2;
@ -359,6 +358,13 @@
.video-js.vjs-paused {
.vjs-big-play-button {
display: block;
background-color: rgba(0, 0, 0, 0.6);
}
}
.video-js:hover {
.vjs-big-play-button {
background-color: var(--color-primary);
}
}
}