mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-05 16:51:01 +00:00
nav bar added to player
This commit is contained in:
parent
365c5e43f4
commit
428cb776ce
2 changed files with 47 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
|||
const React = require('react');
|
||||
const PropTypes = require('prop-types');
|
||||
const classnames = require('classnames');
|
||||
const { useDeepEqualEffect, useBinaryState } = require('stremio/common');
|
||||
const { HorizontalNavBar, useDeepEqualEffect, useBinaryState } = require('stremio/common');
|
||||
const BufferingLoader = require('./BufferingLoader');
|
||||
const ControlBar = require('./ControlBar');
|
||||
const SubtitlesPicker = require('./SubtitlesPicker');
|
||||
|
|
@ -153,6 +153,17 @@ const Player = ({ urlParams }) => {
|
|||
:
|
||||
null
|
||||
}
|
||||
<HorizontalNavBar
|
||||
className={classnames(styles['layer'], styles['nav-bar-layer'])}
|
||||
title={
|
||||
player.meta_resource !== null && player.meta_resource.content.type === 'Ready' ?
|
||||
player.meta_resource.content.content.name
|
||||
:
|
||||
null
|
||||
}
|
||||
backButton={true}
|
||||
fullscreenButton={true}
|
||||
/>
|
||||
<ControlBar
|
||||
className={classnames(styles['layer'], styles['control-bar-layer'])}
|
||||
paused={state.paused}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
@import (reference) '~stremio-colors/dist/less/stremio-colors.less';
|
||||
|
||||
:import('~stremio/common/NavBar/HorizontalNavBar/styles.less') {
|
||||
nav-bar-button-container: button-container;
|
||||
nav-bar-title: title;
|
||||
nav-bar-icon: icon;
|
||||
}
|
||||
|
||||
.player-container {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
|
|
@ -15,6 +21,35 @@
|
|||
bottom: 0;
|
||||
z-index: 0;
|
||||
|
||||
&.nav-bar-layer {
|
||||
bottom: initial;
|
||||
background: transparent;
|
||||
|
||||
&::before {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: -1;
|
||||
box-shadow: 0 0 8rem 6rem @color-background-dark5;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.nav-bar-button-container {
|
||||
&:hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.nav-bar-icon {
|
||||
fill: @color-surface-light5;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-bar-title {
|
||||
color: @color-surface-light5;
|
||||
}
|
||||
}
|
||||
|
||||
&.control-bar-layer {
|
||||
top: initial;
|
||||
overflow: visible;
|
||||
|
|
|
|||
Loading…
Reference in a new issue