FACEBOOK
diff --git a/src/common/ShareAddon/styles.less b/src/common/ShareAddon/styles.less
index 688075825..ae15605b6 100644
--- a/src/common/ShareAddon/styles.less
+++ b/src/common/ShareAddon/styles.less
@@ -1,8 +1,62 @@
+@share-addon-width: 380px;
+@spacing: floor((@share-addon-width * 0.06));
+
.share-addon {
- width: 380px;
- padding: 10px;
- // color: @colorwhite;
- // background-color: @colorwhite;
+ width: @share-addon-width;
+ padding: ceil((@spacing * 0.5));
+
+ .x-icon {
+ width: ceil((@spacing * 0.5));
+ height: ceil((@spacing * 0.5));
+ }
+
+ .info-container {
+ padding: floor((@spacing * 0.3)) ceil((@spacing * 0.9)) @spacing ceil((@spacing * 0.9));
+
+ .buttons {
+ padding: @spacing 0;
+ }
+
+ .facebook-button, .twitter-button, .gplus-button {
+ width: ceil((@share-addon-width * 0.26));
+ height: floor((@share-addon-width * 0.09));
+
+ .facebook-icon, .twitter-icon, .gplus-icon {
+ width: ceil((@spacing * 0.6));
+ height: ceil((@spacing * 0.6));
+ margin-right: floor((@spacing * 0.3));
+ }
+ }
+
+ .url-container {
+ border-radius: 4px;
+ border-width: 1px;
+
+ .url {
+ font-size: 12px;
+ border-radius: 4px;
+ padding: ceil((@spacing * 0.5));
+ }
+
+ .copy-label {
+ font-size: 14px;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ padding: ceil((@spacing * 0.5));
+
+ .copy-icon {
+ width: ceil((@spacing * 0.7));
+ height: ceil((@spacing * 0.7));
+ margin-right: floor((@spacing * 0.3));
+ }
+ }
+ }
+ }
+}
+
+.share-addon {
+ color: var(--color-surfacelighter);
+ background-color: var(--color-surfacelighter);
.x-container {
display: flex;
@@ -15,87 +69,67 @@
}
}
- .info-container {
- padding: 6px 20px 30px 20px;
+ .share-label {
+ color: var(--color-backgrounddarker);
+ font-weight: 500;
+ }
- .share-label {
-// color: @colorblack;
- font-weight: 600;
- }
+ .buttons {
+ display: flex;
+ font-size: 11px;
+ justify-content: space-between;
- .buttons {
+ .facebook-button, .twitter-button, .gplus-button {
display: flex;
- font-size: 11px;
- margin: 22px 0px;
- justify-content: space-between;
+ cursor: pointer;
+ align-items: center;
+ justify-content: center;
.facebook-icon, .twitter-icon, .gplus-icon {
- width: 14px;
- height: 14px;
- margin-right: 6px;
-// fill: @colorwhite;
- }
-
- .facebook-button {
-// background-color: @colorfb;
- }
-
- .twitter-button {
-// background-color: @coloraccent;
- }
-
- .gplus-button {
- background-color: #dd4b39;
- }
-
- .facebook-button, .twitter-button, .gplus-button {
- display: flex;
- cursor: pointer;
- width: 100px;
- height: 32px;
- align-items: center;
- justify-content: center;
+ fill: var(--color-surfacelighter);
}
}
- .url-container {
- display: flex;
- border-radius: 4px;
+ .facebook-button {
+ background-color: var(--color-secondary);
+ }
+
+ .twitter-button {
+ background-color: var(--color-secondarylighter);
+ }
+
+ .gplus-button {
+ background-color: var(--color-signal2);
+ }
+ }
+
+ .url-container {
+ display: flex;
+ border-style: solid;
+ border-color: var(--color-surface);
+
+ .url, .copy-label {
+ color: var(--color-backgrounddarker40);
+ }
+
+ .url {
+ width: 75%;
+ outline: none;
+ font-weight: 600;
text-align: center;
- // border: 1px solid @colorneutrallight;
+ text-overflow: ellipsis;
+ }
- .url, .copy-label {
- padding: 10px;
- font-weight: 600;
-// color: @colorblack40;
- }
+ .copy-label {
+ cursor: pointer;
+ width: 25%;
+ font-weight: 500;
+ display: flex;
+ justify-content: center;
+ background-color: var(--color-backgrounddarker20);
- .url {
- width: 90%;
- outline: none;
- font-size: 12px;
- text-align: center;
- border-radius: 4px;
- padding-right: 30px;
- text-overflow: ellipsis;
- }
-
- .copy-label {
- width: 30%;
- display: flex;
- align-items: center;
- justify-content: center;
- cursor: pointer;
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
- // background-color: @colorblack20;
-
- .copy-icon {
- width: 16px;
- height: 16px;
- margin-right: 4px;
-// fill: @colorblack40;
- }
+ .copy-icon {
+ fill: var(--color-backgrounddarker40);
}
}
}
diff --git a/src/common/Stream/styles.less b/src/common/Stream/styles.less
deleted file mode 100644
index bd8ac68d7..000000000
--- a/src/common/Stream/styles.less
+++ /dev/null
@@ -1,113 +0,0 @@
-@stream-width: 360px;
-@spacing: max(12px, ceil((@stream-width * 0.04)));
-@progress-height: 5px;
-
-.stream-container {
- width: @stream-width;
-
- .logo-container {
- margin: @spacing 0 @spacing @spacing;
- }
-
- .source-name {
- font-size: 13px;
- margin: @spacing 0 @spacing @spacing;
- }
-
- .text-container {
- min-height: ceil((@stream-width * 0.16));
- padding: @spacing;
-
- .title {
- font-size: 11px;
- }
-
- .subtitle {
- font-size: 11px;
- }
-
- :not(:last-child) {
- margin-bottom: (@spacing * 0.5);
- }
- }
-
- .play-container {
- width: floor((@stream-width * 0.08));
- padding: @spacing @spacing @spacing 0;
- }
-
- .progress {
- height: @progress-height;
- }
-}
-
-.stream-container {
- // background-color: @colorglass;
-
- .flex-row-container {
- display: flex;
- flex-direction: row;
- align-items: stretch;
-
- .logo-container {
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .logo {
- width: 100%;
- // fill: @colorwhite;
- }
- }
-
- .source-name {
- flex: 1;
- display: flex;
- align-items: center;
- // color: @colorwhite;
- word-break: break-all; //Firefox doesn't support { break-word }
- word-break: break-word;
- }
-
- .text-container {
- flex: 3;
- display: flex;
- flex-direction: column;
- justify-content: center;
-
- .title {
- // color: @colorwhite;
- word-break: break-word;
- }
-
- .subtitle {
- // color: @colorwhite;
- word-break: break-word;
- }
- }
-
- .play-container {
- display: flex;
- align-items: center;
-
- .play {
- width: 100%;
- // fill: @colorwhite;
- }
- }
- }
-
- .progress-container {
- // background-color: @colorprim;
-
- .progress {
- // background-color: @colorprimlight;
- }
- }
-
- &:hover {
- cursor: pointer;
-// background-color: @colorwhite20;
- }
-}
\ No newline at end of file
diff --git a/src/common/UserPanel/styles.less b/src/common/UserPanel/styles.less
index 2dcaac451..463c79bfe 100644
--- a/src/common/UserPanel/styles.less
+++ b/src/common/UserPanel/styles.less
@@ -1,39 +1,18 @@
-@user-panel-width: 260px;
-@spacing: max(16px, ceil((@user-panel-width * 0.06)));
-
.user-panel {
- width: @user-panel-width;
-
- .user-info {
- grid-template-columns: ceil((@user-panel-width * 0.2)) auto;
- grid-template-rows: ceil((@user-panel-width * 0.1)) ceil((@user-panel-width * 0.1));
- padding: @spacing;
- }
-
- .option {
- padding: @spacing;
-
- .icon {
- width: floor((@user-panel-width * 0.08));
- height: floor((@user-panel-width * 0.08));
- margin-right: @spacing;
- }
- }
-
- .label {
- padding: ceil((@spacing * 0.6)) (2 * ceil((@spacing * 0.6)));
- }
-
- .separator {
- height: 1px;
- }
+ --user-panel-width: 260px;
+ --spacing: 16px;
+ --separator-height: 1px;
}
.user-panel {
- // background-color: @colordarkest;
+ width: var(--user-panel-width);
+ background-color: var(--color-background);
.user-info {
display: grid;
+ padding: var(--spacing);
+ grid-template-columns: calc(0.2 * var(--user-panel-width)) auto;
+ grid-template-rows: calc(0.1 * var(--user-panel-width)) calc(0.1 * var(--user-panel-width));
grid-template-areas:
"avatar email"
"avatar login-logout";
@@ -50,8 +29,8 @@
grid-area: email;
display: flex;
align-items: center;
- // color: @colorwhite;
- padding-left: @spacing;
+ color: var(--color-surfacelighter);
+ padding-left: var(--spacing);
overflow: hidden;
white-space: pre;
text-overflow: ellipsis;
@@ -61,15 +40,15 @@
grid-area: login-logout;
display: flex;
align-items: center;
- // color: @colorneutral;
- padding-left: @spacing;
+ color: var(--color-surface);
+ padding-left: var(--spacing);
overflow: hidden;
white-space: pre;
text-overflow: ellipsis;
&:hover {
cursor: pointer;
-// color: @colorwhite;
+ color: var(--color-surfacelighter);
}
}
}
@@ -77,20 +56,25 @@
.option {
display: flex;
align-items: center;
- // color: @colorwhite80;
+ padding: var(--spacing);
+ color: var(--color-surfacelighter80);
.icon {
- // fill: @coloraccent;
+ width: calc(var(--user-panel-width) * 0.08);
+ height: calc(var(--user-panel-width) * 0.08);
+ margin-right: var(--spacing);
+ fill: var(--color-secondarylighter);
}
&:hover {
cursor: pointer;
-// color: @colorwhite;
-// background-color: @coloraccent20;
+ color: var(--color-surfacelighter);
+ background-color: var(--color-secondarylighter20);
}
}
.separator {
- // background-color: @colorneutral;
+ height: var(--separator-height);
+ background-color: var(--color-surface);
}
}
\ No newline at end of file
diff --git a/src/common/Video/styles.less b/src/common/Video/styles.less
deleted file mode 100644
index b6092c8d8..000000000
--- a/src/common/Video/styles.less
+++ /dev/null
@@ -1,121 +0,0 @@
-@video-width: 360px;
-@spacing: max(8px, ceil((@video-width * 0.02)));
-@progress-height: 5px;
-
-.video-container {
- width: @video-width;
-
- .poster {
- margin: @spacing 0 @spacing @spacing;
- }
-
- .info-container {
- min-height: ceil((@video-width * 0.2));
- padding: @spacing;
-
- .title {
- font-size: 12px;
- }
-
- .released-date {
- font-size: 11px;
- }
-
- .upcoming-label, .watched-label {
- font-size: 10px;
- border-radius: 2px;
- }
-
- .upcoming-label {
- margin-right: @spacing;
- }
-
- >:not(:last-child) {
- margin-bottom: (@spacing * 0.5);
- }
- }
-
- .arrow-container {
- width: floor((@video-width * 0.07));
- padding: @spacing @spacing @spacing 0;
- }
-
- .progress {
- height: @progress-height;
- }
-}
-
-.video-container {
- // background-color: @colorglass;
-
- .flex-row-container {
- display: flex;
- flex-direction: row;
- align-items: stretch;
-
- .poster {
- flex: 1;
- background-position: center;
- background-size: cover, auto;
- background-repeat: no-repeat;
- }
-
- .info-container {
- flex: 3;
- display: flex;
- flex-direction: column;
- justify-content: center;
-
- .title {
- // color: @colorwhite;
- word-break: break-all; //Firefox doesn't support { break-word }
- word-break: break-word;
- }
-
- .released-date {
- // color: @colorwhite60;
- }
-
- .label-container {
- display: flex;
-
- .upcoming-label, .watched-label {
- padding: 0 0.6em;
- font-weight: 600;
- // color: @colorwhite;
- }
-
- .upcoming-label {
- // background-color: @colorsignal5;
- }
-
- .watched-label {
- // background-color: @colorprimlight;
- }
- }
- }
-
- .arrow-container {
- display: flex;
- align-items: center;
-
- .arrow {
- width: 100%;
- // fill: @colorwhite;
- }
- }
- }
-
- .progress-container {
- // background-color: @colorprim;
-
- .progress {
- // background-color: @colorprimlight;
- }
- }
-
- &:hover {
- cursor: pointer;
-// background-color: @colorwhite20;
- }
-}
\ No newline at end of file
diff --git a/src/common/index.js b/src/common/index.js
index 088e91c77..0853dc433 100644
--- a/src/common/index.js
+++ b/src/common/index.js
@@ -4,8 +4,6 @@ import NavBar from './NavBar';
import Modal from './Modal';
import MetadataItem from './MetadataItem';
import Router from './Router';
-import Stream from './Stream';
-import Video from './Video';
import LibraryItemList from './LibraryItemList';
import MetaItem from './MetaItem';
import Addon from './Addon';
@@ -20,8 +18,6 @@ export {
Modal,
MetadataItem,
Router,
- Stream,
- Video,
LibraryItemList,
MetaItem,
Addon,
diff --git a/src/routes/Detail/Detail.js b/src/routes/Detail/Detail.js
new file mode 100644
index 000000000..ff647ded3
--- /dev/null
+++ b/src/routes/Detail/Detail.js
@@ -0,0 +1,9 @@
+import React, { Component } from 'react';
+
+class Detail extends Component {
+ render() {
+ return null;
+ }
+}
+
+export default Detail;
diff --git a/src/common/Stream/Stream.js b/src/routes/Detail/StreamsList/Stream/Stream.js
similarity index 100%
rename from src/common/Stream/Stream.js
rename to src/routes/Detail/StreamsList/Stream/Stream.js
diff --git a/src/common/Stream/index.js b/src/routes/Detail/StreamsList/Stream/index.js
similarity index 100%
rename from src/common/Stream/index.js
rename to src/routes/Detail/StreamsList/Stream/index.js
diff --git a/src/routes/Detail/StreamsList/Stream/styles.less b/src/routes/Detail/StreamsList/Stream/styles.less
new file mode 100644
index 000000000..31ee039d8
--- /dev/null
+++ b/src/routes/Detail/StreamsList/Stream/styles.less
@@ -0,0 +1,96 @@
+.stream-container {
+ --stream-width: 360px;
+ --spacing: 8px;
+ --source-name-font-size: 13px;
+ --title-font-size: 11px;
+ --subtitle-font-size: 11px;
+}
+
+.stream-container {
+ width: var(--stream-width);
+ background-color: var(--color-backgroundlight);
+
+ .flex-row-container {
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+
+ .logo-container {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ margin: var(--spacing) 0 var(--spacing) var(--spacing);
+
+ .logo {
+ width: 100%;
+ fill: var(--color-surfacelighter);
+ }
+ }
+
+ .source-name {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ margin: var(--spacing) 0 var(--spacing) var(--spacing);
+ font-size: var(--source-name-font-size);
+ color: var(--color-surfacelighter);
+ word-break: break-all; //Firefox doesn't support { break-word }
+ word-break: break-word;
+ }
+
+ .text-container {
+ flex: 3;
+ min-height: calc(0.2 * var(--stream-width));
+ padding: var(--spacing);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ .title {
+ font-size: var(--title-font-size);
+ color: var(--color-surfacelighter);
+ word-break: break-all;
+ word-break: break-word;
+ }
+
+ .subtitle {
+ font-size: var(--subtitle-font-size);
+ color: var(--color-surfacelighter);
+ word-break: break-all;
+ word-break: break-word;
+ }
+
+ :not(:last-child) {
+ margin-bottom: calc(0.5 * var(--spacing));
+ }
+ }
+
+ .play-container {
+ width: calc(0.07 * var(--stream-width));
+ display: flex;
+ align-items: center;
+ padding: var(--spacing) var(--spacing) var(--spacing) 0;
+
+ .play {
+ width: 100%;
+ fill: var(--color-surfacelighter);
+ }
+ }
+ }
+
+ .progress-container {
+ height: calc(0.5 * var(--spacing));
+ background-color: var(--color-primarydark);
+
+ .progress {
+ height: 100%;
+ background-color: var(--color-primarylight);
+ }
+ }
+
+ &:hover {
+ cursor: pointer;
+ background-color: var(--color-surfacelighter20);
+ }
+}
\ No newline at end of file
diff --git a/src/routes/Detail/StreamsList/StreamsList.js b/src/routes/Detail/StreamsList/StreamsList.js
new file mode 100644
index 000000000..c590e09c9
--- /dev/null
+++ b/src/routes/Detail/StreamsList/StreamsList.js
@@ -0,0 +1,39 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import Icon from 'stremio-icons/dom';
+import Stream from './Stream';
+import styles from './styles';
+
+const StreamsList = (props) => {
+ return (
+
+
+ {props.streams
+ .map((stream) =>
+
+ )}
+
+
+
+ );
+}
+
+StreamsList.propTypes = {
+ streams: PropTypes.arrayOf(PropTypes.object).isRequired,
+ onMoreAddonsClicked: PropTypes.func
+};
+StreamsList.defaultProps = {
+ streams: []
+};
+
+export default StreamsList;
diff --git a/src/routes/Detail/StreamsList/index.js b/src/routes/Detail/StreamsList/index.js
new file mode 100644
index 000000000..0c7fdb10c
--- /dev/null
+++ b/src/routes/Detail/StreamsList/index.js
@@ -0,0 +1,3 @@
+import StreamsList from './StreamsList';
+
+export default StreamsList;
diff --git a/src/routes/Detail/StreamsList/styles.less b/src/routes/Detail/StreamsList/styles.less
new file mode 100644
index 000000000..afc323479
--- /dev/null
+++ b/src/routes/Detail/StreamsList/styles.less
@@ -0,0 +1,59 @@
+.streams-list-container {
+ --scroll-container-width: 392px;
+ --stream-width: 360px;
+ --spacing: 8px;
+ --button-label-font-size: 18px;
+}
+
+.streams-list-container {
+ height: 100%;
+ display: inline-flex;
+ flex-direction: column;
+ background: var(--color-background);
+
+ .scroll-container {
+ flex: 1;
+ width: var(--scroll-container-width);
+ padding: 0 calc(2 * var(--spacing));
+ margin: var(--spacing);
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ >:not(:first-child) {
+ margin-top: var(--spacing);
+ }
+
+ .button {
+ width: var(--stream-width);
+ height: calc(0.2 * var(--stream-width));
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ color: var(--color-primary);
+ background-color: var(--color-surfacelighter);
+
+ .button-icon {
+ height: 44%;
+ margin-right: var(--spacing);
+ fill: var(--color-primary);
+ }
+
+ .button-label {
+ font-size: var(--button-label-font-size);
+ }
+ }
+ }
+
+ .scroll-container::-webkit-scrollbar {
+ width: var(--spacing);
+ }
+
+ .scroll-container::-webkit-scrollbar-thumb {
+ background-color: var(--color-secondarylighter80);
+ }
+
+ .scroll-container::-webkit-scrollbar-track {
+ background-color: var(--color-backgroundlight);
+ }
+}
\ No newline at end of file
diff --git a/src/common/Video/Video.js b/src/routes/Detail/VideosList/Video/Video.js
similarity index 81%
rename from src/common/Video/Video.js
rename to src/routes/Detail/VideosList/Video/Video.js
index 1964a9b93..e516fbf31 100644
--- a/src/common/Video/Video.js
+++ b/src/routes/Detail/VideosList/Video/Video.js
@@ -1,8 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
-import Icon, { dataUrl as iconDataUrl } from 'stremio-icons/dom';
-import colors from 'stremio-colors';
+import Icon from 'stremio-icons/dom';
import styles from './styles';
const MAX_TITLE_SYMBOLS = 100;
@@ -12,23 +11,20 @@ const renderPoster = (poster) => {
return null;
}
- const placeholderIconUrl = iconDataUrl({ icon: 'ic_channels', fill: colors.accent });
- const imageStyle = {
- backgroundImage: `url('${poster}'), url('${placeholderIconUrl}')`
- };
-
return (
-
+
+

+
);
}
-const renderTitle = (number, title) => {
+const renderTitle = (episode, title) => {
if (title.length === 0) {
return null;
}
return (
-
{number}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}
+
{episode}. {title.length > MAX_TITLE_SYMBOLS ? title.slice(0, MAX_TITLE_SYMBOLS) + '...' : title}
);
}
@@ -95,7 +91,7 @@ const Video = (props) => {
{renderPoster(props.poster)}
- {renderTitle(props.number, props.title)}
+ {renderTitle(props.episode, props.title)}
{renderReleasedDate(props.released)}
{renderLabels(props.isUpcoming, props.isWatched)}
@@ -111,7 +107,7 @@ const Video = (props) => {
Video.propTypes = {
className: PropTypes.string,
poster: PropTypes.string.isRequired,
- number: PropTypes.number.isRequired,
+ episode: PropTypes.number.isRequired,
title: PropTypes.string.isRequired,
released: PropTypes.instanceOf(Date).isRequired,
isWatched: PropTypes.bool.isRequired,
@@ -121,7 +117,7 @@ Video.propTypes = {
};
Video.defaultProps = {
poster: '',
- number: 0,
+ episode: 0,
title: '',
released: new Date(''), //Invalid Date
isWatched: false,
diff --git a/src/common/Video/index.js b/src/routes/Detail/VideosList/Video/index.js
similarity index 100%
rename from src/common/Video/index.js
rename to src/routes/Detail/VideosList/Video/index.js
diff --git a/src/routes/Detail/VideosList/Video/styles.less b/src/routes/Detail/VideosList/Video/styles.less
new file mode 100644
index 000000000..1c4b6719a
--- /dev/null
+++ b/src/routes/Detail/VideosList/Video/styles.less
@@ -0,0 +1,116 @@
+.video-container {
+ --video-width: 360px;
+ --spacing: 8px;
+ --title-font-size: 12px;
+ --released-date-font-size: 11px;
+ --label-font-size: 10px;
+ --label-border-width: 2px;
+}
+
+.video-container {
+ width: var(--video-width);
+ background-color: var(--color-backgroundlight);
+
+ .flex-row-container {
+ display: flex;
+ flex-direction: row;
+ align-items: stretch;
+
+ .poster-container {
+ flex: 1;
+ margin: var(--spacing) 0 var(--spacing) var(--spacing);
+
+ .poster {
+ display: block;
+ width: 100%;
+ height: 100%;
+ object-fit: contain;
+
+ &[alt]:after {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-image: url("data:image/svg+xml;utf8,
");
+ background-repeat: no-repeat;
+ background-position: center;
+ content: "";
+ }
+ }
+ }
+
+ .info-container {
+ flex: 3;
+ min-height: calc(0.2 * var(--video-width));
+ padding: var(--spacing);
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+
+ .title {
+ font-size: var(--title-font-size);
+ color: var(--color-surfacelighter);
+ word-break: break-all; //Firefox doesn't support { break-word }
+ word-break: break-word;
+ }
+
+ .released-date {
+ font-size: var(--released-date-font-size);
+ color: var(--color-surface);
+ }
+
+ .label-container {
+ display: flex;
+
+ .upcoming-label, .watched-label {
+ font-size: var(--label-font-size);
+ font-weight: 600;
+ line-height: 1.5;
+ border-width: var(--label-border-width);
+ border-style: solid;
+ padding: 0 0.6em;
+ color: var(--color-surfacelighter);
+ }
+
+ .upcoming-label {
+ margin-right: var(--spacing);
+ border-color: var(--color-signal5);
+ }
+
+ .watched-label {
+ border-color: var(--color-primarylight);
+ }
+ }
+
+ >:not(:last-child) {
+ margin-bottom: calc(0.5 * var(--spacing));
+ }
+ }
+
+ .arrow-container {
+ width: calc(0.07 * var(--video-width));
+ display: flex;
+ align-items: center;
+ padding: var(--spacing) var(--spacing) var(--spacing) 0;
+
+ .arrow {
+ width: 100%;
+ fill: var(--color-surfacelighter);
+ }
+ }
+ }
+
+ .progress-container {
+ height: calc(0.5 * var(--spacing));
+ background-color: var(--color-primarydark);
+
+ .progress {
+ height: 100%;
+ background-color: var(--color-primarylight);
+ }
+ }
+
+ &:hover {
+ cursor: pointer;
+ background-color: var(--color-surfacelighter20);
+ }
+}
\ No newline at end of file
diff --git a/src/routes/Detail/VideosList/VideosList.js b/src/routes/Detail/VideosList/VideosList.js
new file mode 100644
index 000000000..3cc1be171
--- /dev/null
+++ b/src/routes/Detail/VideosList/VideosList.js
@@ -0,0 +1,83 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+import Icon from 'stremio-icons/dom';
+import Video from './Video';
+import styles from './styles';
+
+class VideosList extends Component {
+ constructor(props) {
+ super(props);
+
+ this.seasons = this.props.videos.map((video) => video.season)
+ .filter((season, index, seasons) => seasons.indexOf(season) === index);
+
+ this.state = {
+ selectedSeason: this.seasons[0]
+ }
+ }
+
+ changeSeason = (event) => {
+ this.setState({ selectedSeason: parseInt(event.target.value) });
+ }
+
+ shouldComponentUpdate(nextProps, nextState) {
+ return nextState.selectedSeason !== this.state.selectedSeason;
+ }
+
+ onPrevButtonClicked = () => {
+ const prevSeasonIndex = Math.max(this.seasons.indexOf(this.state.selectedSeason) - 1, 0);
+ this.setState({ selectedSeason: this.seasons[prevSeasonIndex] });
+ }
+
+ onNextButtonClicked = () => {
+ const nextSeasonIndex = Math.min(this.seasons.indexOf(this.state.selectedSeason) + 1, this.seasons.length - 1);
+ this.setState({ selectedSeason: this.seasons[nextSeasonIndex] });
+ }
+
+ render() {
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {this.props.videos
+ .filter((video) => video.season === this.state.selectedSeason)
+ .map((video) =>
+
+ )}
+
+
+ );
+ }
+}
+
+VideosList.propTypes = {
+ videos: PropTypes.arrayOf(PropTypes.object).isRequired
+};
+VideosList.defaultProps = {
+ videos: []
+};
+
+export default VideosList;
diff --git a/src/routes/Detail/VideosList/index.js b/src/routes/Detail/VideosList/index.js
new file mode 100644
index 000000000..bea9d6457
--- /dev/null
+++ b/src/routes/Detail/VideosList/index.js
@@ -0,0 +1,3 @@
+import VideosList from './VideosList';
+
+export default VideosList;
diff --git a/src/routes/Detail/VideosList/styles.less b/src/routes/Detail/VideosList/styles.less
new file mode 100644
index 000000000..41f242d3b
--- /dev/null
+++ b/src/routes/Detail/VideosList/styles.less
@@ -0,0 +1,62 @@
+.videos-list-container {
+ --scroll-container-width: 392px;
+ --seasons-bar-height: 50px;
+ --spacing: 8px;
+}
+
+.videos-list-container {
+ height: 100%;
+ display: inline-flex;
+ flex-direction: column;
+ background: var(--color-background);
+
+ .seasons-bar {
+ height: var(--seasons-bar-height);
+ display: flex;
+ justify-content: space-between;
+ margin-bottom: var(--spacing);
+
+ .button-container {
+ width: calc(1.5 * var(--seasons-bar-height));
+ cursor: pointer;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .button-icon {
+ width: 60%;
+ height: 60%;
+ fill: var(--color-surfacelighter);
+ }
+
+ &:hover {
+ background-color: var(--color-surfacelighter20);
+ }
+ }
+ }
+
+ .scroll-container {
+ flex: 1;
+ width: var(--scroll-container-width);
+ padding: 0 calc(2 * var(--spacing));
+ margin: 0 var(--spacing);
+ overflow-y: auto;
+ overflow-x: hidden;
+
+ >:not(:first-child) {
+ margin-top: var(--spacing);
+ }
+ }
+
+ .scroll-container::-webkit-scrollbar {
+ width: var(--spacing);
+ }
+
+ .scroll-container::-webkit-scrollbar-thumb {
+ background-color: var(--color-secondarylighter80);
+ }
+
+ .scroll-container::-webkit-scrollbar-track {
+ background-color: var(--color-backgroundlight);
+ }
+}
\ No newline at end of file
diff --git a/src/routes/Detail/index.js b/src/routes/Detail/index.js
new file mode 100644
index 000000000..ccf95e690
--- /dev/null
+++ b/src/routes/Detail/index.js
@@ -0,0 +1,3 @@
+import Detail from './Detail';
+
+export default Detail;
diff --git a/src/routes/Settings/styles.less b/src/routes/Settings/styles.less
index a9c8601fb..ddbcf29b4 100644
--- a/src/routes/Settings/styles.less
+++ b/src/routes/Settings/styles.less
@@ -2,7 +2,7 @@
height: 100%;
width: 100%;
display: flex;
- // color: @colorwhite60;
+ color: var(--color-surfacelighter60);
.side-menu {
width: 240px;
@@ -10,7 +10,7 @@
display: flex;
flex-direction: column;
font-size: 14px;
- // background: @colordarkest;
+ background: var(--color-backgrounddark);
.menu-option {
padding: 14px;
@@ -18,8 +18,8 @@
&:hover, &.selected {
cursor: pointer;
-// color: @colorwhite;
-// background: @colorglass;
+ color: var(--color-surfacelighter);
+ background: var(--color-background);
}
}
}
@@ -52,14 +52,14 @@
&:hover {
.preference {
- // color: @colorwhite;
+ color: var(--color-surfacelighter);
}
}
}
&:not(:last-child) {
margin-bottom: 30px;
- // border-bottom: 1px solid @colormedium;
+ border-bottom: 1px solid var(--color-primary);
}
}
}
diff --git a/src/routes/index.js b/src/routes/index.js
index b54b42c8b..f931b9c08 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -7,6 +7,7 @@ import Calendar from './Calendar';
import Search from './Search';
import Settings from './Settings';
import Player from './Player';
+import Detail from './Detail';
export {
Addons,
@@ -17,5 +18,6 @@ export {
Calendar,
Search,
Settings,
- Player
+ Player,
+ Detail
};
diff --git a/stories/index.stories.js b/stories/index.stories.js
index 8d26e8fbe..996e11312 100644
--- a/stories/index.stories.js
+++ b/stories/index.stories.js
@@ -1,6 +1,11 @@
import React from 'react';
import { storiesOf } from '@storybook/react';
-import { Addon, Checkbox, LibraryItemList, MetaItem, ShareAddon, Stream, UserPanel, Video } from 'stremio-common';
+import { Addon, Checkbox, LibraryItemList, MetaItem, ShareAddon, UserPanel } from 'stremio-common';
+import Stream from '../src/routes/Detail/StreamsList/Stream';
+import Video from '../src/routes/Detail/VideosList/Video';
+import VideosList from '../src/routes/Detail/VideosList';
+import StreamsList from '../src/routes/Detail/StreamsList';
+import colors from 'stremio-colors';
import appStyles from '../src/app/styles';
import styles from './styles';
@@ -10,6 +15,22 @@ const storyStyle = {
minHeight: 'initial'
};
+const videosListStyle = {
+ position: 'absolute',
+ height: '100%',
+ padding: '10px',
+ minHeight: 'initial',
+ background: colors.backgroundlighter
+}
+
+const streamsListStyle = {
+ position: 'absolute',
+ height: '100%',
+ padding: '10px',
+ minHeight: 'initial',
+ background: colors.backgroundlighter
+}
+
storiesOf('Addon', module)
.add('not-installed', () => (
@@ -242,7 +263,7 @@ storiesOf('Video', module)