mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-21 03:22:11 +00:00
user-notifications removed
This commit is contained in:
parent
e2a44f1e7c
commit
189d246a19
6 changed files with 0 additions and 156 deletions
|
|
@ -2,7 +2,6 @@ import React, { PureComponent } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import NavTab from './NavTab';
|
import NavTab from './NavTab';
|
||||||
import SearchInput from './SearchInput';
|
import SearchInput from './SearchInput';
|
||||||
import UserNotifications from './UserNotifications';
|
|
||||||
import UserMenu from './UserMenu';
|
import UserMenu from './UserMenu';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
|
|
||||||
|
|
@ -13,7 +12,6 @@ class NavBar extends PureComponent {
|
||||||
{this.props.tabs.map(tab => <NavTab key={tab.to} {...tab} />)}
|
{this.props.tabs.map(tab => <NavTab key={tab.to} {...tab} />)}
|
||||||
{this.props.title.length > 0 ? <h2 className={styles['nav-title']}>{this.props.title}</h2> : null}
|
{this.props.title.length > 0 ? <h2 className={styles['nav-title']}>{this.props.title}</h2> : null}
|
||||||
{this.props.searchInput ? <SearchInput className={styles['search-input']} /> : null}
|
{this.props.searchInput ? <SearchInput className={styles['search-input']} /> : null}
|
||||||
{this.props.userNotifications ? <UserNotifications className={styles['user-notifications']} /> : null}
|
|
||||||
{this.props.userMenu ? <UserMenu className={styles['user-menu']} /> : null}
|
{this.props.userMenu ? <UserMenu className={styles['user-menu']} /> : null}
|
||||||
</nav>
|
</nav>
|
||||||
);
|
);
|
||||||
|
|
@ -30,7 +28,6 @@ NavBar.propTypes = {
|
||||||
})).isRequired,
|
})).isRequired,
|
||||||
title: PropTypes.string.isRequired,
|
title: PropTypes.string.isRequired,
|
||||||
searchInput: PropTypes.bool.isRequired,
|
searchInput: PropTypes.bool.isRequired,
|
||||||
userNotifications: PropTypes.bool.isRequired,
|
|
||||||
userMenu: PropTypes.bool.isRequired
|
userMenu: PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -38,7 +35,6 @@ NavBar.defaultProps = {
|
||||||
tabs: [],
|
tabs: [],
|
||||||
title: '',
|
title: '',
|
||||||
searchInput: false,
|
searchInput: false,
|
||||||
userNotifications: false,
|
|
||||||
userMenu: false
|
userMenu: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,77 +0,0 @@
|
||||||
import React, { PureComponent } from 'react';
|
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import classnames from 'classnames';
|
|
||||||
import Icon from 'stremio-icons/dom';
|
|
||||||
import { Popup } from 'stremio-common';
|
|
||||||
import styles from './styles';
|
|
||||||
|
|
||||||
class UserNotifications extends PureComponent {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<Popup>
|
|
||||||
<Popup.Label>
|
|
||||||
<button className={classnames(this.props.className, styles['popup-label-container'])}>
|
|
||||||
<Icon className={classnames(styles['notifications-icon'], styles['icon'])} icon={'ic_cloud'} />
|
|
||||||
</button>
|
|
||||||
</Popup.Label>
|
|
||||||
<Popup.Menu>
|
|
||||||
<div className={styles['popup-content']}>
|
|
||||||
{this.props.metaItems.map((metaItem) =>
|
|
||||||
<div className={styles['meta-item']} key={metaItem.metaItem.videos.map((video) => video.id)}>
|
|
||||||
<div className={styles['poster']} style={{ backgroundImage: `url(${metaItem.metaItem.poster})` }}></div>
|
|
||||||
<div className={styles['info-container']}>
|
|
||||||
<div className={styles['name']}>{metaItem.metaItem.videos.map((video) => video.name)}</div>
|
|
||||||
<div className={styles['released']}>{metaItem.metaItem.videos.map((video) => video.released.getDate() + '.' + video.released.getMonth() + '.' + video.released.getFullYear())}</div>
|
|
||||||
</div>
|
|
||||||
<div className={styles['video-poster']} style={{ backgroundImage: `url(${metaItem.metaItem.videos.map((video) => video.poster)})` }}></div>
|
|
||||||
<Icon className={styles['icon']} icon={'ic_more'} />
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</Popup.Menu>
|
|
||||||
</Popup>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UserNotifications.propTypes = {
|
|
||||||
inLibrary: PropTypes.bool.isRequired,
|
|
||||||
metaItems: PropTypes.arrayOf(PropTypes.object).isRequired
|
|
||||||
};
|
|
||||||
UserNotifications.defaultProps = {
|
|
||||||
inLibrary: false,
|
|
||||||
metaItems: [
|
|
||||||
{
|
|
||||||
metaItem: {
|
|
||||||
poster: 'https://www.stremio.com/website/home-stremio.png',
|
|
||||||
released: new Date(2019, 1, 9),
|
|
||||||
name: 'Fantastic Beasts and Where to Find Them: The Original Screenplay',
|
|
||||||
videos: [
|
|
||||||
{ id: '1', poster: 'https://www.stremio.com/website/home-testimonials.jpg', episode: 1, name: 'Katy Perry - Cozy Little Christmas', released: new Date(2019, 1, 9), isUpcoming: true, isWatched: false, season: 1 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
metaItem: {
|
|
||||||
poster: 'https://www.stremio.com/website/home-stremio.png',
|
|
||||||
released: new Date(2019, 1, 7),
|
|
||||||
name: 'Fantastic Beasts and Where to Find Them: The Original Screenplay',
|
|
||||||
videos: [
|
|
||||||
{ id: '2', poster: 'https://www.stremio.com/website/home-testimonials.jpg', episode: 1, name: 'Hefty Shades of Gray', description: 'dasdasda', released: new Date(2019, 1, 7), isUpcoming: true, isWatched: true, season: 1 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
metaItem: {
|
|
||||||
poster: 'https://www.stremio.com/website/home-stremio.png',
|
|
||||||
released: new Date(2019, 1, 13),
|
|
||||||
name: 'Fantastic Beasts and Where to Find Them: The Original Screenplay',
|
|
||||||
videos: [
|
|
||||||
{ id: '3', poster: 'https://www.stremio.com/website/home-testimonials.jpg', episode: 1, name: 'Evolution', description: 'dasdasda', released: new Date(2019, 1, 12), isUpcoming: true, isWatched: true, season: 1 }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
|
|
||||||
export default UserNotifications;
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
import UserNotifications from './UserNotifications';
|
|
||||||
|
|
||||||
export default UserNotifications;
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
@import 'constants';
|
|
||||||
|
|
||||||
.popup-label-container {
|
|
||||||
cursor: pointer;
|
|
||||||
outline: none;
|
|
||||||
background-color: transparent;
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
height: @nav-bar-height;
|
|
||||||
fill: var(--color-surfacelighter80)
|
|
||||||
}
|
|
||||||
|
|
||||||
.notifications-icon {
|
|
||||||
width: 40%;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover, &.active {
|
|
||||||
background-color: var(--color-backgrounddark20);
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
fill: var(--color-surfacelighter);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup-content {
|
|
||||||
background-color: var(--color-surfacelighter);
|
|
||||||
|
|
||||||
.meta-item {
|
|
||||||
display: flex;
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 16px;
|
|
||||||
|
|
||||||
.poster {
|
|
||||||
width: 50px;
|
|
||||||
height: 50px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-position: center;
|
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-container {
|
|
||||||
.name {
|
|
||||||
font-size: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.released {
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--color-surfacedarker);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.video-poster {
|
|
||||||
width: 100px;
|
|
||||||
height: 50px;
|
|
||||||
background-position: center;
|
|
||||||
background-size: cover;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
fill: var(--color-surfacedarker);
|
|
||||||
width: 4px;
|
|
||||||
height: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -12,9 +12,6 @@
|
||||||
.search-input {
|
.search-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
.user-notifications {
|
|
||||||
width: @nav-bar-height;
|
|
||||||
}
|
|
||||||
.user-menu {
|
.user-menu {
|
||||||
width: @nav-bar-height;
|
width: @nav-bar-height;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@ class Main extends Component {
|
||||||
{ icon: 'ic_calendar', label: 'Calendar', to: '/calendar', replace: true }
|
{ icon: 'ic_calendar', label: 'Calendar', to: '/calendar', replace: true }
|
||||||
]}
|
]}
|
||||||
searchInput={true}
|
searchInput={true}
|
||||||
userNotificatons={true}
|
|
||||||
userMenu={true}
|
userMenu={true}
|
||||||
/>
|
/>
|
||||||
<Switch>
|
<Switch>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue