);
}
renderLanguageSettings = () => {
return (
-
-
-
INTERFACE LANGUAGE
-
English
-
-
-
-
-
DEFAULT SUBTITLES LANGUAGE
-
Portugese - BR
-
-
-
+
+
+
);
}
@@ -79,15 +78,15 @@ class Settings extends Component {
render() {
return (
-
+
{Object.keys(SETTINGS_MENUS).map((menu) =>
-
this.changeSelectedMenu(SETTINGS_MENUS[menu])}>{menu}
+
this.changeSelectedMenu(SETTINGS_MENUS[menu])}>{menu}
)}
{this.renderSelectedMenu()}
- )
+ );
}
}
diff --git a/src/routes/Settings/styles.less b/src/routes/Settings/styles.less
index 297e51b55..7caab927f 100644
--- a/src/routes/Settings/styles.less
+++ b/src/routes/Settings/styles.less
@@ -1,103 +1,98 @@
@import 'stremio-colors';
-.settings {
+
+.settings-container {
height: 100%;
+ width: 100%;
display: flex;
color: @colorwhite60;
font-family: LatoLight;
+
.side-menu {
width: 240px;
padding: 20px;
display: flex;
- font-size: 14px;
flex-direction: column;
+ font-size: 14px;
background: @colordarkest;
+
.menu-option {
padding: 14px;
font-weight: 600;
- &:hover {
- cursor: pointer;
- color: @colorwhite;
- background: @colorglass;
- }
- &.menu-option-selected {
+
+ &:hover, &.selected {
cursor: pointer;
color: @colorwhite;
background: @colorglass;
}
}
}
- .player-preferences-menu {
- height: 145px;
+
+ .settings-list {
+ width: 280px;
margin: 40px 50px;
- border-bottom: 1px solid @colormedium;
- .preferences-section {
+
+ .settings-section {
display: flex;
- cursor: pointer;
- margin-bottom: 30px;
- align-items: center;
- .preference {
- width: 280px;
- }
- .default-checkbox {
- display: none;
- }
- .checkbox {
- width: 14px;
- height: 14px;
- cursor: pointer;
- border: 2px solid @colorwhite60;
- .checkmark {
- width: 10px;
- height: 10px;
- display: none;
- fill: @colorwhite;
- }
- }
- input:checked ~ .checkbox {
- background-color: @colorprimlight;
- border: 2px solid @colorprimlight;
- .checkmark {
- display: block;
- }
- }
- input:checked ~ .preference {
- color: @colorwhite;
- }
- }
- }
- .language-menu {
- margin: 40px 50px;
- .language-section {
- border-bottom: 1px solid @colormedium;
- .headline {
- font-weight: 600;
- color: @colorwhite40;
- }
- .selected-language {
- height: 40px;
- width: 280px;
- padding: 20px;
+ flex-direction: column;
+
+ .toggle-option {
display: flex;
- margin: 30px 0px;
+ cursor: pointer;
+ margin-bottom: 30px;
align-items: center;
- justify-content: space-between;
- font-weight: 600;
- color: @colorwhite;
- background-color: @colordarkest;
- border: 1px solid @colortransparent;
- .arrow-down {
- width: 8px;
- height: 10px;
- fill: @colorwhite40;
+
+ .preference {
+ flex: 1;
+ white-space: pre;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
- &:hover {
+
+ .default-checkbox {
+ display: none;
+ }
+
+ .checkbox {
+ width: 14px;
+ height: 14px;
cursor: pointer;
- border: 1px solid @colormedium;
+ border: 2px solid @colorwhite60;
+
+ .checkmark {
+ width: 10px;
+ height: 10px;
+ display: none;
+ fill: @colorwhite;
+ }
+ }
+
+ input:checked~.checkbox {
+ background-color: @colorprimlight;
+ border: 2px solid @colorprimlight;
+
+ .checkmark {
+ display: block;
+ }
+ }
+
+ input:checked~.preference {
+ color: @colorwhite;
+ }
+
+ &:hover {
+ .preference {
+ color: @colorwhite;
+ }
+
+ input:not(:checked)~.checkbox {
+ border: 2px solid @colorwhite;
+ }
}
}
+
&:not(:last-child) {
margin-bottom: 30px;
-
+ border-bottom: 1px solid @colormedium;
}
}
}
diff --git a/stories/index.stories.js b/stories/index.stories.js
index 5d5b55413..ae7b3a2ca 100644
--- a/stories/index.stories.js
+++ b/stories/index.stories.js
@@ -5,7 +5,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { linkTo } from '@storybook/addon-links';
-import { Addon, LibraryItemList, MetaItem, ShareAddon, Stream, UserPanel, Video } from 'stremio-common';
+import { Addon, Checkbox, LibraryItemList, MetaItem, ShareAddon, Stream, UserPanel, Video } from 'stremio-common';
storiesOf('Addon', module)
.add('addon', () => (
@@ -17,6 +17,16 @@ storiesOf('Addon', module)
));
+storiesOf('Checkbox', module)
+ .add('checkbox', () => (
+
+
+
+
+
+
+ ))
+
storiesOf('LibraryItemList', module)
.add('library item list', () => (