From 02234d6e0898750660a54fcd5c42ecf46e46eb12 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 26 Dec 2017 20:09:31 +0000 Subject: [PATCH 01/63] Upgraded all the package and fixed auto fixable linting errors --- app/src/js/actions/fetch.js | 4 +- app/src/js/components/auth/login.js | 3 +- app/src/js/components/columns/column.js | 6 +- .../js/components/columns/column_topbar.js | 6 +- app/src/js/components/comments/comments.js | 4 +- .../components/emoji_picker/emoji_picker.js | 3 +- app/src/js/components/item/item.js | 8 +- app/src/js/components/navigation/items.js | 4 +- app/src/js/components/navigation/sidenav.js | 14 +- app/src/js/components/notifs/notif_bubbles.js | 3 +- app/src/js/components/notifs/notifs.js | 7 +- app/src/js/components/search/search.js | 19 +- app/src/js/components/settings/button.js | 3 +- app/src/js/components/settings/general.js | 22 +- app/src/js/components/user/user_badge.js | 6 +- app/src/js/components/user/user_card.js | 12 +- app/src/js/components/utilities/post_rant.js | 34 +- app/src/js/components/utilities/rant_type.js | 31 +- .../js/components/utilities/release_info.js | 3 +- app/src/js/components/utilities/smart_area.js | 9 +- app/src/js/components/weekly/weekly.js | 5 +- app/src/js/store.js | 4 +- package-lock.json | 4168 ++++++++--------- package.json | 60 +- 24 files changed, 2045 insertions(+), 2393 deletions(-) diff --git a/app/src/js/actions/fetch.js b/app/src/js/actions/fetch.js index 8b6fde3c..6804bd29 100644 --- a/app/src/js/actions/fetch.js +++ b/app/src/js/actions/fetch.js @@ -241,7 +241,9 @@ const fetchFeed = if (page === 0) { dispatch({ type: COLUMN.FETCH, - column: { ...currentColumn, items: [], page: 0, state: STATE.LOADING }, + column: { + ...currentColumn, items: [], page: 0, state: STATE.LOADING, + }, }); } else { dispatch({ diff --git a/app/src/js/components/auth/login.js b/app/src/js/components/auth/login.js index bfdd0ab5..6dfe03b9 100644 --- a/app/src/js/components/auth/login.js +++ b/app/src/js/components/auth/login.js @@ -71,7 +71,8 @@ class Login extends Component { this.state.password, )} disabled={auth.state === 'STATE_LOADING'} - >Login + >Login +

noLogin(true)}>Not now

diff --git a/app/src/js/components/columns/column.js b/app/src/js/components/columns/column.js index 0630d4ed..2e5ce71d 100644 --- a/app/src/js/components/columns/column.js +++ b/app/src/js/components/columns/column.js @@ -75,7 +75,8 @@ class Column extends Component { } getItemsContainer() { const { - column, theme, vote, fetch, open, itemType, auth, showToast, custom, modal } = this.props; + column, theme, vote, fetch, open, itemType, auth, showToast, custom, modal, + } = this.props; const { divID } = this.state; if (column.items.length === 0 && column.state === STATE.SUCCESS && !custom) { return ( @@ -115,7 +116,8 @@ class Column extends Component { } render() { const { - column, theme, fetch, filters, removeColumn } = this.props; + column, theme, fetch, filters, removeColumn, + } = this.props; const { divID } = this.state; return (
this.handlePri(primaryFilters[key])} onMouseOver={() => this.handleHover(primaryFilters[key])} - >{primaryFilters[key]} + >{primaryFilters[key]} + ); })}
@@ -243,7 +244,8 @@ class ColumnTopBar extends Component { key={key} className={`${isActive}`} onClick={() => this.handleSec(secondaryFilters[key])} - >{secondaryFilters[key]} + >{secondaryFilters[key]} + ); })} diff --git a/app/src/js/components/comments/comments.js b/app/src/js/components/comments/comments.js index 92504cf5..f2f5562f 100644 --- a/app/src/js/components/comments/comments.js +++ b/app/src/js/components/comments/comments.js @@ -15,7 +15,9 @@ class Comments extends Component { }; } render() { - const { theme, vote, comments, auth, open, addMention, showToast, fetchitem } = this.props; + const { + theme, vote, comments, auth, open, addMention, showToast, fetchitem, + } = this.props; return (
{ this.setState({ activeTab: object.name }); }} key={object.name} className="category" - >{object.icon} + >{object.icon} + ))}
diff --git a/app/src/js/components/item/item.js b/app/src/js/components/item/item.js index 9bda0887..340ef4f6 100644 --- a/app/src/js/components/item/item.js +++ b/app/src/js/components/item/item.js @@ -135,7 +135,9 @@ class Item extends Component { } getItemCard() { const { item } = this.state; - const { theme, vote, cardItem, auth, open, showToast } = this.props; + const { + theme, vote, cardItem, auth, open, showToast, + } = this.props; return ( ( +const Items = ({ + item, onClick, className, active, +}) => (
onClick()} > { item.name }
diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index 1dfbed07..3fa598da 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -23,7 +23,9 @@ class SideNav extends Component { }); } getUserCard() { - const { user, logout, login, fetchUser, open } = this.props; + const { + user, logout, login, fetchUser, open, + } = this.props; return (); } render() { - const { sideNavItems, history, location, resetColumn, open, settings } = this.props; + const { + sideNavItems, history, location, resetColumn, open, settings, + } = this.props; return (
@@ -58,10 +62,10 @@ class SideNav extends Component { { settings.general.update.value && { open(ITEM.RELEASE_INFO.NAME); }} diff --git a/app/src/js/components/notifs/notif_bubbles.js b/app/src/js/components/notifs/notif_bubbles.js index 347f9de5..109dab3c 100644 --- a/app/src/js/components/notifs/notif_bubbles.js +++ b/app/src/js/components/notifs/notif_bubbles.js @@ -19,8 +19,7 @@ class NotifBubbles extends PureComponent { unread={data.num_unread} key={`${notif.uid}_${notif.created_time}_${notif.comment_id}_${notif.type}_${notif.rant_id}`} //eslint-disable-line user={data.username_map[notif.uid]} - />), - ) + />)) }
); diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index e161aa5e..0cd3ee7b 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -62,7 +62,9 @@ class Notifs extends Component { } } render() { - const { notifs, auth, open, clearNotifs } = this.props; + const { + notifs, auth, open, clearNotifs, + } = this.props; /* Wondering why there is notifs.notifs? * If you look at the default state, it looks like this: @@ -97,7 +99,8 @@ class Notifs extends Component { + >Clear All +
diff --git a/app/src/js/components/search/search.js b/app/src/js/components/search/search.js index d2492f13..938e9ffb 100644 --- a/app/src/js/components/search/search.js +++ b/app/src/js/components/search/search.js @@ -117,19 +117,18 @@ class Search extends Component { :
{ - this.state.freqTerms.map( - term => ( -
this.onSearch(term.name)} - style={{ + this.state.freqTerms.map(term => ( +
this.onSearch(term.name)} + style={{ flex: `0 1 ${term.flex}%`, transform: term.flex > 31 ? 'scale(0.9)' : 'scale(1.1)', }} - >{term.name}
- ), - ) + >{term.name} +
+ )) }
} diff --git a/app/src/js/components/settings/button.js b/app/src/js/components/settings/button.js index e5fd8eaf..3850c459 100644 --- a/app/src/js/components/settings/button.js +++ b/app/src/js/components/settings/button.js @@ -8,7 +8,8 @@ const Button = props => ( + >{props.setting.buttonText} +
); diff --git a/app/src/js/components/settings/general.js b/app/src/js/components/settings/general.js index 94ed44f9..c1cbe843 100644 --- a/app/src/js/components/settings/general.js +++ b/app/src/js/components/settings/general.js @@ -78,23 +78,19 @@ class General extends Component { ); subSettings.push(settingComponent); }); - settings.push( -
- { Header } -
- { + settings.push(
+ { Header } +
+ { subSettings.map(s => s) } -
-
, - ); +
+
); } else { const component = this.getSettingComponent(setting, key); - settings.push( -
- { component } -
, - ); + settings.push(
+ { component } +
); } }); return settings; diff --git a/app/src/js/components/user/user_badge.js b/app/src/js/components/user/user_badge.js index 85119b1e..64e1f7cb 100644 --- a/app/src/js/components/user/user_badge.js +++ b/app/src/js/components/user/user_badge.js @@ -44,11 +44,13 @@ class UserBadge extends Component { {user.score} + >{user.score} + {user.dpp === 1 && Supporter} + >Supporter + } ); diff --git a/app/src/js/components/user/user_card.js b/app/src/js/components/user/user_card.js index 50910857..fcb32e88 100644 --- a/app/src/js/components/user/user_card.js +++ b/app/src/js/components/user/user_card.js @@ -64,11 +64,13 @@ class UserCard extends Component { {user.score} + >{user.score} + {user.dpp === 1 && Supporter} + >Supporter + } @@ -96,7 +98,8 @@ class UserCard extends Component { className="user_openprofile" style={{ backgroundColor: `#${user.avatar.b}` }} onClick={() => this.openProfile()} - >Open Profile + >Open Profile + ); } @@ -109,7 +112,8 @@ class UserCard extends Component {
this.props.closeCard()} - >

+ >

+ { this.getUser() } diff --git a/app/src/js/components/utilities/post_rant.js b/app/src/js/components/utilities/post_rant.js index 7cc99bd9..322985b6 100644 --- a/app/src/js/components/utilities/post_rant.js +++ b/app/src/js/components/utilities/post_rant.js @@ -8,11 +8,21 @@ import Popup from '../utilities/popup'; import Dropdown from '../utilities/dropdown/dropdown'; const RANT_TYPES = [ - { id: 1, color: '#d55063', icon: 'icon ion-chatbubble-working', header: 'Rant / Story' }, - { id: 3, color: '#2b8a9c', icon: 'icon ion-image', header: 'Joke / Meme' }, - { id: 4, color: '#ab73a2', icon: 'icon ion-help', header: 'Question' }, - { id: 5, color: '#fa9a67', icon: 'icon ion-heart', header: 'devRant' }, - { id: 6, color: '#7ac8a6', icon: 'icon ion-ios-game-controller-a', header: 'Random' }, + { + id: 1, color: '#d55063', icon: 'icon ion-chatbubble-working', header: 'Rant / Story', + }, + { + id: 3, color: '#2b8a9c', icon: 'icon ion-image', header: 'Joke / Meme', + }, + { + id: 4, color: '#ab73a2', icon: 'icon ion-help', header: 'Question', + }, + { + id: 5, color: '#fa9a67', icon: 'icon ion-heart', header: 'devRant', + }, + { + id: 6, color: '#7ac8a6', icon: 'icon ion-ios-game-controller-a', header: 'Random', + }, ]; class PostRant extends Component { @@ -89,8 +99,11 @@ class PostRant extends Component { .editRant(text, this.state.tags, item.id, auth.user.authToken) .then((res) => { if (!res.success) { - this.setState({ popup: - { ...this.state.popup, body: res.error, visible: true, className: '' }, + this.setState({ + popup: + { + ...this.state.popup, body: res.error, visible: true, className: '', + }, }); return; } @@ -118,8 +131,11 @@ class PostRant extends Component { .postRant(text, this.state.tags, this.state.type, auth.user.authToken, image) .then((res) => { if (!res.success) { - this.setState({ popup: - { ...this.state.popup, body: res.error, visible: true, className: '' }, + this.setState({ + popup: + { + ...this.state.popup, body: res.error, visible: true, className: '', + }, }); return; } diff --git a/app/src/js/components/utilities/rant_type.js b/app/src/js/components/utilities/rant_type.js index 81e9a22f..831a2411 100644 --- a/app/src/js/components/utilities/rant_type.js +++ b/app/src/js/components/utilities/rant_type.js @@ -5,16 +5,30 @@ class RantType extends Component { constructor() { super(); this.types = [ - { id: 1, color: '#d55063', icon: 'icon ion-chatbubble-working', text: 'Rant / Story' }, - { id: 2, color: '#e1c871', icon: 'ion-android-people', text: 'Collab' }, - { id: 3, color: '#2b8a9c', icon: 'icon ion-image', text: 'Joke / Meme' }, - { id: 4, color: '#ab73a2', icon: 'icon ion-help', text: 'Question' }, - { id: 5, color: '#fa9a67', icon: 'icon ion-heart', text: 'devRant' }, - { id: 6, color: '#7ac8a6', icon: 'icon ion-ios-game-controller-a', text: 'Random' }, + { + id: 1, color: '#d55063', icon: 'icon ion-chatbubble-working', text: 'Rant / Story', + }, + { + id: 2, color: '#e1c871', icon: 'ion-android-people', text: 'Collab', + }, + { + id: 3, color: '#2b8a9c', icon: 'icon ion-image', text: 'Joke / Meme', + }, + { + id: 4, color: '#ab73a2', icon: 'icon ion-help', text: 'Question', + }, + { + id: 5, color: '#fa9a67', icon: 'icon ion-heart', text: 'devRant', + }, + { + id: 6, color: '#7ac8a6', icon: 'icon ion-ios-game-controller-a', text: 'Random', + }, ]; this.state = { open: false, - selected: { id: 1, color: '#d55063', icon: 'ion-chatbubble-working', text: 'Rant / Story' }, + selected: { + id: 1, color: '#d55063', icon: 'ion-chatbubble-working', text: 'Rant / Story', + }, }; } @@ -51,8 +65,7 @@ class RantType extends Component { {type.text} - ), - ) + )) } diff --git a/app/src/js/components/utilities/release_info.js b/app/src/js/components/utilities/release_info.js index 47dfd500..8e81bd22 100644 --- a/app/src/js/components/utilities/release_info.js +++ b/app/src/js/components/utilities/release_info.js @@ -53,7 +53,8 @@ class ReleaseInfo extends Component {
* On Windows: Update will be installed after you click update * On MacOS and Linux: Clicking update will take you to our website. - You have to download the latest update from there. + You have to download the latest update from there. +
diff --git a/app/src/js/components/utilities/smart_area.js b/app/src/js/components/utilities/smart_area.js index 2e5a8cf3..a326fff7 100644 --- a/app/src/js/components/utilities/smart_area.js +++ b/app/src/js/components/utilities/smart_area.js @@ -280,7 +280,8 @@ class SmartArea extends Component {

{this.props.users[mention]}

+ >

{this.props.users[mention]}

+ ))} { this.charLeft = node; }} - >{this.props.maxChar - this.props.value.length}

+ >{this.props.maxChar - this.props.value.length} +

: null }
@@ -314,7 +316,8 @@ class SmartArea extends Component { + >{btnText} +
); diff --git a/app/src/js/components/weekly/weekly.js b/app/src/js/components/weekly/weekly.js index f3f04737..6149abba 100644 --- a/app/src/js/components/weekly/weekly.js +++ b/app/src/js/components/weekly/weekly.js @@ -77,12 +77,11 @@ class Weekly extends Component { width: `${theme.column.width}px`, }} > -
+
{`wk${week.week}`} {`${week.prompt}`}
- ), - )} + ))} Date: Thu, 28 Dec 2017 18:56:13 +0000 Subject: [PATCH 02/63] Setup the structure of the theme --- .eslintrc.json | 1 + app/src/js/actions/settings.js | 10 +++- app/src/js/components/settings/settings.js | 7 ++- app/src/js/components/settings/theme.js | 69 ++++++++++++++++++++-- app/src/js/consts/default_states.js | 22 +------ app/src/js/consts/types.js | 44 ++++++++++++++ app/src/js/containers/settings/settings.js | 6 +- app/src/js/reducers/settings.js | 11 +++- app/src/res/sass/modules/settings.sass | 16 ++++- 9 files changed, 152 insertions(+), 34 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8ca44e5d..985bc0cb 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -33,6 +33,7 @@ "jsx-a11y/no-static-element-interactions": 0, "jsx-a11y/no-noninteractive-element-interactions": 0, "jsx-a11y/href-no-hash": "off", + "jsx-a11y/click-events-have-key-events": "off", "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }], "import/no-dynamic-require": 0, "import/no-extraneous-dependencies": "off", diff --git a/app/src/js/actions/settings.js b/app/src/js/actions/settings.js index 5b0947b6..ae920b43 100644 --- a/app/src/js/actions/settings.js +++ b/app/src/js/actions/settings.js @@ -1,4 +1,4 @@ -import { SETTINGS, ITEM } from '../consts/types'; +import { SETTINGS, ITEM, THEMES } from '../consts/types'; import { fetchUser } from './user'; import { fetchNotifs } from './notifs'; import { openModal } from './modal'; @@ -187,8 +187,12 @@ const changeGeneral = (primaryKey, secondaryKey, value) => (dispatch) => { * We will use this for theming in future * */ -const changeTheme = () => () => { - +const changeTheme = (key, values = null) => (dispatch) => { + dispatch({ + type: SETTINGS.ACTION.CHANGE_THEME, + key: values ? null : key, + values, + }); }; diff --git a/app/src/js/components/settings/settings.js b/app/src/js/components/settings/settings.js index 7a421248..47c05bb3 100644 --- a/app/src/js/components/settings/settings.js +++ b/app/src/js/components/settings/settings.js @@ -17,13 +17,15 @@ class Items extends Component { } getSettings() { const { activeNav } = this.state; - const { settings, changeGeneral, theme } = this.props; + const { + settings, changeGeneral, theme, + } = this.props; if (activeNav === SETTINGS_NAV[0]) { return ( ); } else if (activeNav === SETTINGS_NAV[1]) { - return ; + return ; } return ; } @@ -53,6 +55,7 @@ Items.propTypes = { settings: PropTypes.object.isRequired, changeGeneral: PropTypes.func.isRequired, theme: PropTypes.object.isRequired, + auth: PropTypes.object.isRequired, }; export default Items; diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index 05e30729..eb43cf30 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -1,22 +1,79 @@ import React, { Component } from 'react'; +import PropTypes from 'prop-types'; +import Twemoji from 'react-twemoji'; +import { timeSince } from '../../consts/utils'; +import { THEMES } from '../../consts/types'; class Theme extends Component { - constructor(props) { - super(props); - this.state = { - Hel: '', - }; + getTheme(key) { + const { theme } = this.props; + const selectedTheme = THEMES[key]; + if (key === theme.id.toUpperCase()) { + // selectedTheme = THEMES[theme.id.toUpperCase()]; + } + return ( +
{ this.props.changeTheme(key); }} + > +
+ {timeSince(1514319457 * 1000)} + +
this.open()} + > +
+ + + Bro ipsum dolor sit amet sucker hole heli granny gear, newschooler McTwist cruiser wheelie drop taco mitt. Bomb hole Skate avie carve grind line. Bro clipless table top whip glades pow pow poaching avie wack. 180 wheelie corduroy table top schwag shred. + Chillax flow pow pow steeps granny gear. Crank grind rigid sketching. Manny hero stomp bowl rock roll, pinner granny gear dust on crust reverse camber hardtail. Clean air avie euro death cookies, face shots japan air brain bucket sketching presta. + Death cookies first tracks ski bum T-bar 360. Wheelie deck afterbang rail table top gapers. Whistler nose dust on crust stoked pipe endo. Heli pow rock roll, schwag sketching gaper noodle road rash laps free ride gnar gnar frozen chicken heads rigid avie. + + +
+
+
+
+ ); + } + getThemes() { + return Object.keys(THEMES).map(key => this.getTheme(key)); } render() { return (
- Coming soon! +
+ { this.getThemes() } +
+
+

Global

+
); } } Theme.propTypes = { + theme: PropTypes.object.isRequired, + changeTheme: PropTypes.func.isRequired, }; export default Theme; diff --git a/app/src/js/consts/default_states.js b/app/src/js/consts/default_states.js index 3880e304..9ded4b7b 100644 --- a/app/src/js/consts/default_states.js +++ b/app/src/js/consts/default_states.js @@ -1,4 +1,4 @@ -import { STATE, FEED, SETTINGS } from './types'; +import { STATE, FEED, SETTINGS, THEMES } from './types'; import { getUID } from './utils'; /* @@ -16,25 +16,7 @@ export default { }, notifs: null, settings: { - theme: { - name: 'Dark Theme', - backgroundColor: '#54556E', - item_card: { - backgroundColor: '#40415A', - color: 'white', - }, - comment_card: { - backgroundColor: '#40415A', - color: 'white', - }, - column: { - backgroundColor: '#54556E', - width: '450', - }, - user_badge: { - details_back: '#54556E', - }, - }, + theme: THEMES.DARK_THEME, general: { filterRants: { title: 'Filter Rants', diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index a053e231..4e382188 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -41,6 +41,50 @@ export const SETTINGS = { }, ACTION: { CHANGE_GENERAL: 'CHANGE_GENERAL', + CHANGE_THEME: 'CHANGE_THEME', + }, +}; + +export const THEMES = { + DARK_THEME: { + name: 'Dark Theme', + id: 'dark_theme', + backgroundColor: '#54556E', + item_card: { + backgroundColor: '#40415A', + color: 'white', + }, + comment_card: { + backgroundColor: '#40415A', + color: 'white', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + }, + LIGHT_THEME: { + name: 'Light Theme', + id: 'light_theme', + backgroundColor: '#94556E', + item_card: { + backgroundColor: '#40415A', + color: 'white', + }, + comment_card: { + backgroundColor: '#40415A', + color: 'white', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, }, }; diff --git a/app/src/js/containers/settings/settings.js b/app/src/js/containers/settings/settings.js index 22d775c2..db55b4ea 100644 --- a/app/src/js/containers/settings/settings.js +++ b/app/src/js/containers/settings/settings.js @@ -1,17 +1,21 @@ import { connect } from 'react-redux'; import Settings from '../../components/settings/settings'; -import { changeGeneral } from '../../actions/settings'; +import { changeGeneral, changeTheme } from '../../actions/settings'; const mapDispatchToProps = dispatch => ({ changeGeneral: (primarykey, secondaryKey, value) => { dispatch(changeGeneral(primarykey, secondaryKey, value)); }, + changeTheme: (key, value = null) => { + dispatch(changeTheme(key, value)); + }, }); const mapStateToProps = state => ({ settings: state.settings, theme: state.settings.theme, + auth: state.auth, }); diff --git a/app/src/js/reducers/settings.js b/app/src/js/reducers/settings.js index 1777bc6b..3f9985a5 100644 --- a/app/src/js/reducers/settings.js +++ b/app/src/js/reducers/settings.js @@ -1,5 +1,5 @@ import DEFAULT_STATES from '../consts/default_states'; -import { SETTINGS } from '../consts/types'; +import { SETTINGS, THEMES } from '../consts/types'; export default (state = DEFAULT_STATES.settings, action) => { switch (action.type) { @@ -20,6 +20,15 @@ export default (state = DEFAULT_STATES.settings, action) => { general, }; } + case SETTINGS.ACTION.CHANGE_THEME: { + const { key, values } = action; + let theme = { ...state.general }; + theme = THEMES[key]; + return { + ...state, + theme, + }; + } default: return state; } diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 60492d9b..da1db2f3 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -29,8 +29,22 @@ .theme_container color: white display: flex - justify-content: center margin-top: 2rem + position: relative + .custom_theme + flex: 1 + .items_container + flex: 1 + display: flex + flex-direction: column + .item_container + cursor: pointer + margin: 0.5rem 0 + padding: 1rem + .item_card + pointer-events: none + margin: 0 + width: auto !important .general_container .version_number display: flex From 1129c9039919ea4eb105349aa04f2ddda021986a Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 15:13:40 +0100 Subject: [PATCH 03/63] Fixed #224 --- app/src/js/components/item/bottom_bar.js | 2 +- package-lock.json | 918 +++++++++++++++++++++++ 2 files changed, 919 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index 781633c0..787be7f9 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -117,7 +117,7 @@ class BottomBar extends Component {
this.setState({ triggerActive: true })} + onClick={() => this.setState({ triggerActive: true })} >

diff --git a/package-lock.json b/package-lock.json index 765eb6ca..5712c94c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,9 +15,23 @@ "integrity": "sha512-+rr4OgeTNrLuJAf09o3USdttEYiXvZshWMkhD6wR9v1ieXH0JM1Q2yT41/cJuJcqiPpSXlM/g3aR+Y5MWQdr0Q==", "dev": true, "requires": { + "7zip-bin-linux": "1.2.0", + "7zip-bin-mac": "1.0.1", "7zip-bin-win": "2.1.1" } }, + "7zip-bin-linux": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.2.0.tgz", + "integrity": "sha512-umB98LN18XBGKPw4EKET2zPDqVhEU1mxXA1Gx0BM+DoBt4hnlZPNkpSMNzmuNbQshi9SzLhqlTAyKcAgNrbV3Q==", + "optional": true + }, + "7zip-bin-mac": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", + "integrity": "sha1-Pmh3i78JJq3GgVlCcHRQXUdVXAI=", + "optional": true + }, "7zip-bin-win": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.1.tgz", @@ -2497,6 +2511,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -5178,6 +5193,909 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.7.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "extsprintf": "1.0.2" + } + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "1.0.2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true + } + } + }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", From 66b95d65ccdb128e8d18219725e8a5c038affa88 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 15:21:54 +0100 Subject: [PATCH 04/63] Made settings more readable --- app/src/res/sass/modules/settings.sass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 60492d9b..01bd6b88 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -39,6 +39,9 @@ color: white .multi_settings margin-bottom: 18px + background: #40415a + padding: 0.8rem + box-shadow: 2px 2px 5px rgba(0,0,0,0.2) .header color: white padding: 0.3rem 0 @@ -47,7 +50,9 @@ margin-bottom: 0.6rem padding-left: 1rem .single_settings - padding-bottom: 0.6rem + background: #40415a + padding: 0.1rem 1rem 0.6rem 1rem + box-shadow: 2px 2px 5px rgba(0,0,0,0.2) .setting display: flex justify-content: space-between From 2ee79572a7e021852dcaedf2bd713171163f3057 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 15:26:14 +0100 Subject: [PATCH 05/63] Modified searchbar to have more contrast and match colors. --- app/src/res/sass/modules/search.sass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/res/sass/modules/search.sass b/app/src/res/sass/modules/search.sass index 3f3f1048..be139ee2 100644 --- a/app/src/res/sass/modules/search.sass +++ b/app/src/res/sass/modules/search.sass @@ -33,3 +33,7 @@ input font-size: 1.2rem padding: 0.2rem 0.2rem + &:focus + border-bottom: 0.12rem solid #C14857 + &::-webkit-input-placeholder + color: #e6e6e6 \ No newline at end of file From b34f0965472d2a3bc8cc80af83d3202dd5488f29 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 15:28:41 +0100 Subject: [PATCH 06/63] Fixed overflow bug --- app/src/res/sass/modules/comments.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/res/sass/modules/comments.sass b/app/src/res/sass/modules/comments.sass index e8329bf8..e1b64a99 100644 --- a/app/src/res/sass/modules/comments.sass +++ b/app/src/res/sass/modules/comments.sass @@ -16,6 +16,7 @@ flex: 2 .comments_container overflow-y: scroll + overflow-x: hidden height: calc(100% - (#{$post_comment_height} + 1rem)) h4 text-align: center From 69df5e32249ab2aff448ec02caa2a6267d0075b9 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 15:48:30 +0100 Subject: [PATCH 07/63] Added notif sort button --- app/src/js/components/notifs/notifs.js | 8 ++++++++ app/src/res/sass/modules/notifs.sass | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index e161aa5e..eebb283d 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -12,6 +12,7 @@ class Notifs extends Component { notifTimestamp: 1, active: false, firstFetch: true, + sort: false, }; } componentDidMount() { @@ -61,6 +62,9 @@ class Notifs extends Component { this.setState({ active: !this.state.active }); } } + toggleSort() { + this.setState({ sort: !this.state.sort }); + } render() { const { notifs, auth, open, clearNotifs } = this.props; @@ -98,6 +102,10 @@ class Notifs extends Component { className="notifs_clear" onClick={() => { clearNotifs(); }} >Clear All +
diff --git a/app/src/res/sass/modules/notifs.sass b/app/src/res/sass/modules/notifs.sass index cf37e34a..92c95fb8 100644 --- a/app/src/res/sass/modules/notifs.sass +++ b/app/src/res/sass/modules/notifs.sass @@ -87,11 +87,13 @@ animation: notif_bubbles_out 0.3s forwards .notifs_clear z-index: 299 - width: 6.2rem + width: 9.5rem height: 2.3rem position: fixed top: 0px left: 15px + .notifs_sort + top: 48px .notif_bubble_container display: flex width: 100% From 983f3a7dabcade579045fdc47c8fb7f1773dd0e0 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 16:58:58 +0100 Subject: [PATCH 08/63] Started work on notif sorting --- app/src/js/actions/notifs.js | 12 ++++++++++++ app/src/js/components/notifs/notifs.js | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/app/src/js/actions/notifs.js b/app/src/js/actions/notifs.js index 963972f2..9b8a6c89 100644 --- a/app/src/js/actions/notifs.js +++ b/app/src/js/actions/notifs.js @@ -10,6 +10,18 @@ const currentWindow = require('electron').remote.getCurrentWindow(); let clearingNotifs = false; let fetching = false; +/* function calculateQuality(a, b) { + let worth = { + comment_discuss: 0, + comment_vote: 1, + content_vote: 2, + comment_content: 3, + comment_mention: 4, + } + + return worth[a] > worth[b]; +} */ + /** * Fetches notifications * diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index eebb283d..0a72fac1 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -23,6 +23,11 @@ class Notifs extends Component { */ const { fetchNotifs } = this.props; + if (localStorage.getItem('notifsort') === null) { localStorage.setItem('notifsort', false); } + + // eslint-disable-next-line + this.setState({ sort: localStorage.getItem('notifsort') }); + fetchNotifs(); setInterval(() => { @@ -64,6 +69,7 @@ class Notifs extends Component { } toggleSort() { this.setState({ sort: !this.state.sort }); + localStorage.setItem('notifsort', this.state.sort); } render() { const { notifs, auth, open, clearNotifs } = this.props; From 17abfd0913e72d8484f472fcc688e6a7d79b1b06 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Sun, 31 Dec 2017 17:26:43 +0100 Subject: [PATCH 09/63] Almost working --- app/src/js/actions/notifs.js | 12 ------- app/src/js/components/notifs/notif_bubbles.js | 33 +++++++++++++++++++ app/src/js/components/notifs/notifs.js | 4 +-- 3 files changed, 35 insertions(+), 14 deletions(-) diff --git a/app/src/js/actions/notifs.js b/app/src/js/actions/notifs.js index 9b8a6c89..963972f2 100644 --- a/app/src/js/actions/notifs.js +++ b/app/src/js/actions/notifs.js @@ -10,18 +10,6 @@ const currentWindow = require('electron').remote.getCurrentWindow(); let clearingNotifs = false; let fetching = false; -/* function calculateQuality(a, b) { - let worth = { - comment_discuss: 0, - comment_vote: 1, - content_vote: 2, - comment_content: 3, - comment_mention: 4, - } - - return worth[a] > worth[b]; -} */ - /** * Fetches notifications * diff --git a/app/src/js/components/notifs/notif_bubbles.js b/app/src/js/components/notifs/notif_bubbles.js index 347f9de5..6713abfc 100644 --- a/app/src/js/components/notifs/notif_bubbles.js +++ b/app/src/js/components/notifs/notif_bubbles.js @@ -5,9 +5,41 @@ import Notification from './notif_bubble'; class NotifBubbles extends PureComponent { render() { const { data, open } = this.props; + + console.log('render'); + if (!data) { return
; } + + if (this.props.sort) { + console.time('qualitySort'); + const worth = { + comment_discuss: 0, + comment_vote: 1, + content_vote: 2, + comment_content: 3, + comment_mention: 4, + }; + const tempItems = data.items; + tempItems.sort((a, b) => { + if (a.read === 1) { return 1; } + console.log(a.type, worth[a.type] >= worth[b.type], worth[a.type], worth[b.type]) + if (worth[a.type] >= worth[b.type]) { return -1; } + return -1; + }); + data.items = tempItems; + console.timeEnd('qualitySort'); + } else { + console.time('timeSort'); + const tempItems = data.items; + tempItems.sort((a, b) => { + return b.created_time - a.created_time; + }); + data.items = tempItems; + console.timeEnd('timeSort'); + } + return (
{ @@ -29,6 +61,7 @@ class NotifBubbles extends PureComponent { NotifBubbles.propTypes = { data: PropTypes.object.isRequired, + sort: PropTypes.object.isRequired, open: PropTypes.func.isRequired, }; diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index 0a72fac1..0b9deb05 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -111,8 +111,8 @@ class Notifs extends Component { - + >{this.state.sort ? 'Sort by Time' : 'Sort by Quality'} +
From 55f500ea2e881c7e0a6aee1d81dfa2d94444ecca Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 00:46:30 +0600 Subject: [PATCH 10/63] Made sure the small icons are also shown on mouse enter --- app/src/js/components/item/bottom_bar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index 787be7f9..efa10c2b 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -118,6 +118,7 @@ class BottomBar extends Component {
this.setState({ triggerActive: true })} + onMouseEnter={() => this.setState({ triggerActive: true })} >

From 37f82c9c00a291de1e4931bcbdbfa2ce204669a7 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 00:54:44 +0600 Subject: [PATCH 11/63] Removed custom from the nav :( --- app/src/js/containers/navigation/sidenav.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/containers/navigation/sidenav.js b/app/src/js/containers/navigation/sidenav.js index 61bb56a4..8b0d6be6 100644 --- a/app/src/js/containers/navigation/sidenav.js +++ b/app/src/js/containers/navigation/sidenav.js @@ -13,7 +13,7 @@ const SIDE_NAV_ITEMS = [ { name: 'Collabs', route: ROUTES.collabs, icon: 'ion-person-stalker' }, { name: 'Stories', route: ROUTES.stories, icon: 'ion-ios-bookmarks' }, { name: 'Weekly', route: ROUTES.weekly, icon: 'ion-android-calendar' }, - { name: 'Custom', route: ROUTES.custom, icon: 'ion-edit' }, + // { name: 'Custom', route: ROUTES.custom, icon: 'ion-edit' }, { name: 'Search', route: ROUTES.search, icon: 'ion-android-search' }, { name: 'Settings', route: ROUTES.settings, icon: 'ion-gear-a' }, ]; From 17dd828cda46e6f6ee18a0110757a7cf845b523a Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 00:57:18 +0600 Subject: [PATCH 12/63] Removed subscribe button --- app/src/js/components/item/bottom_bar.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index efa10c2b..33bfbfdc 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -135,7 +135,7 @@ class BottomBar extends Component {
: null } - { + {/* { !this.props.isUser ?

: null - } + } */} { !item.rant_id && !item.c_type ?
Date: Tue, 2 Jan 2018 01:16:58 +0600 Subject: [PATCH 13/63] Settings is now saved correctly --- app/src/js/components/settings/settings.js | 4 ++++ app/src/js/containers/settings/settings.js | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/settings/settings.js b/app/src/js/components/settings/settings.js index 7a421248..e098aaf5 100644 --- a/app/src/js/components/settings/settings.js +++ b/app/src/js/components/settings/settings.js @@ -15,6 +15,9 @@ class Items extends Component { activeNav: SETTINGS_NAV[0], }; } + componentDidUpdate() { + this.props.saveUserState(); + } getSettings() { const { activeNav } = this.state; const { settings, changeGeneral, theme } = this.props; @@ -52,6 +55,7 @@ class Items extends Component { Items.propTypes = { settings: PropTypes.object.isRequired, changeGeneral: PropTypes.func.isRequired, + saveUserState: PropTypes.func.isRequired, theme: PropTypes.object.isRequired, }; diff --git a/app/src/js/containers/settings/settings.js b/app/src/js/containers/settings/settings.js index 22d775c2..183ee1f4 100644 --- a/app/src/js/containers/settings/settings.js +++ b/app/src/js/containers/settings/settings.js @@ -1,12 +1,15 @@ import { connect } from 'react-redux'; import Settings from '../../components/settings/settings'; -import { changeGeneral } from '../../actions/settings'; +import { changeGeneral, saveUserState } from '../../actions/settings'; const mapDispatchToProps = dispatch => ({ changeGeneral: (primarykey, secondaryKey, value) => { dispatch(changeGeneral(primarykey, secondaryKey, value)); }, + saveUserState: () => { + dispatch(saveUserState()); + }, }); const mapStateToProps = state => ({ From 1e5a74ce779b3ee2f9a6485f91f9fc64664a5d36 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 02:34:32 +0600 Subject: [PATCH 14/63] Custom theme working pretty well. Just need to all the bits --- app/src/js/components/settings/theme.js | 66 +- app/src/js/consts/types.js | 40 + app/src/js/reducers/settings.js | 2 +- app/src/res/sass/modules/settings.sass | 16 +- package-lock.json | 1377 +++++++++++++++++++---- package.json | 1 + 6 files changed, 1276 insertions(+), 226 deletions(-) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index eb43cf30..a29d0d8e 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -1,10 +1,35 @@ import React, { Component } from 'react'; +import { SketchPicker, CompactPicker, SliderPicker } from 'react-color'; import PropTypes from 'prop-types'; import Twemoji from 'react-twemoji'; -import { timeSince } from '../../consts/utils'; import { THEMES } from '../../consts/types'; class Theme extends Component { + constructor() { + super(); + this.state = { + theme: { + name: 'Custom Theme', + id: 'custom_theme', + backgroundColor: '#54556E', + item_card: { + backgroundColor: '#40415A', + color: 'white', + }, + comment_card: { + backgroundColor: '#40415A', + color: 'white', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + }, + }; + } getTheme(key) { const { theme } = this.props; const selectedTheme = THEMES[key]; @@ -28,10 +53,6 @@ class Theme extends Component { width: `${selectedTheme.column.width}px`, }} > - {timeSince(1514319457 * 1000)} -
this.open()} @@ -43,9 +64,7 @@ class Theme extends Component { - Bro ipsum dolor sit amet sucker hole heli granny gear, newschooler McTwist cruiser wheelie drop taco mitt. Bomb hole Skate avie carve grind line. Bro clipless table top whip glades pow pow poaching avie wack. 180 wheelie corduroy table top schwag shred. - Chillax flow pow pow steeps granny gear. Crank grind rigid sketching. Manny hero stomp bowl rock roll, pinner granny gear dust on crust reverse camber hardtail. Clean air avie euro death cookies, face shots japan air brain bucket sketching presta. - Death cookies first tracks ski bum T-bar 360. Wheelie deck afterbang rail table top gapers. Whistler nose dust on crust stoked pipe endo. Heli pow rock roll, schwag sketching gaper noodle road rash laps free ride gnar gnar frozen chicken heads rigid avie. + Select Me Please!
@@ -57,14 +76,43 @@ class Theme extends Component { getThemes() { return Object.keys(THEMES).map(key => this.getTheme(key)); } + changeTheme() { + this.props.changeTheme(null, this.state.theme); + } render() { + const { theme } = this.state; return (
{ this.getThemes() }
-

Global

+
+

Global

+
+
+

Custom

+
+
+ Background Color + { + this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.changeTheme(); + }} + /> + { + this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.changeTheme(); + }} + value={theme.backgroundColor} + /> +
+ +
+
); diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index 4e382188..b2980fcf 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -86,6 +86,46 @@ export const THEMES = { details_back: '#54556E', }, }, + SOLARIZED_DARK: { + name: 'Solarized Dark', + id: 'solarized_dark', + backgroundColor: '#342345', + item_card: { + backgroundColor: '#40415A', + color: 'white', + }, + comment_card: { + backgroundColor: '#40415A', + color: 'white', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + }, + SOLARIZED_LIGHT: { + name: 'Solarized Light', + id: 'solarized_light', + backgroundColor: '#230923', + item_card: { + backgroundColor: '#40415A', + color: 'white', + }, + comment_card: { + backgroundColor: '#40415A', + color: 'white', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + }, }; export const STATE = { diff --git a/app/src/js/reducers/settings.js b/app/src/js/reducers/settings.js index 3f9985a5..1c84235f 100644 --- a/app/src/js/reducers/settings.js +++ b/app/src/js/reducers/settings.js @@ -23,7 +23,7 @@ export default (state = DEFAULT_STATES.settings, action) => { case SETTINGS.ACTION.CHANGE_THEME: { const { key, values } = action; let theme = { ...state.general }; - theme = THEMES[key]; + theme = values || THEMES[key]; return { ...state, theme, diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index da1db2f3..d1c820df 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -31,15 +31,27 @@ display: flex margin-top: 2rem position: relative + flex-direction: column .custom_theme flex: 1 + .theme_settings + .custom_colors + padding-left: 1rem + margin-left: 1.5rem + display: flex + .custom_color + flex: 0 0 25% + span + display: block + margin-bottom: 1rem + input + width: 98.5% .items_container flex: 1 display: flex - flex-direction: column .item_container cursor: pointer - margin: 0.5rem 0 + margin: 0.5rem padding: 1rem .item_card pointer-events: none diff --git a/package-lock.json b/package-lock.json index 9ae59b81..5d34c19e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,40 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "7zip": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz", + "integrity": "sha1-nK+xca+CMpSQNTtIFvAzR6oVCjA=" + }, + "7zip-bin": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-2.3.4.tgz", + "integrity": "sha512-s2ZfgRWXeNUQTQE3O85CDDrU2Uo90pMlMkTxkz85wQOuzVxB8t4cubMPup3WlTPFKHQgb6lDkAHS3ljkUSFO6A==", + "dev": true, + "requires": { + "7zip-bin-linux": "1.2.0", + "7zip-bin-mac": "1.0.1", + "7zip-bin-win": "2.1.1" + } + }, + "7zip-bin-linux": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/7zip-bin-linux/-/7zip-bin-linux-1.2.0.tgz", + "integrity": "sha512-umB98LN18XBGKPw4EKET2zPDqVhEU1mxXA1Gx0BM+DoBt4hnlZPNkpSMNzmuNbQshi9SzLhqlTAyKcAgNrbV3Q==", + "optional": true + }, + "7zip-bin-mac": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/7zip-bin-mac/-/7zip-bin-mac-1.0.1.tgz", + "integrity": "sha1-Pmh3i78JJq3GgVlCcHRQXUdVXAI=", + "optional": true + }, + "7zip-bin-win": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.1.tgz", + "integrity": "sha512-6VGEW7PXGroTsoI2QW3b0ea95HJmbVBHvfANKLLMzSzFA1zKqVX5ybNuhmeGpf6vA0x8FJTt6twpprDANsY5WQ==", + "optional": true + }, "@babel/code-frame": { "version": "7.0.0-beta.31", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz", @@ -142,26 +176,6 @@ "integrity": "sha512-h5u7FnEnG+Fn44HfknTTvu199FzFWVSo97ToSRWvXl1F11UfN6wGnE7exUy23pFfDn+CeluvEoCoe4l2eCVC3g==", "dev": true }, - "7zip": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/7zip/-/7zip-0.0.6.tgz", - "integrity": "sha1-nK+xca+CMpSQNTtIFvAzR6oVCjA=" - }, - "7zip-bin": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-2.3.4.tgz", - "integrity": "sha512-s2ZfgRWXeNUQTQE3O85CDDrU2Uo90pMlMkTxkz85wQOuzVxB8t4cubMPup3WlTPFKHQgb6lDkAHS3ljkUSFO6A==", - "dev": true, - "requires": { - "7zip-bin-win": "2.1.1" - } - }, - "7zip-bin-win": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/7zip-bin-win/-/7zip-bin-win-2.1.1.tgz", - "integrity": "sha512-6VGEW7PXGroTsoI2QW3b0ea95HJmbVBHvfANKLLMzSzFA1zKqVX5ybNuhmeGpf6vA0x8FJTt6twpprDANsY5WQ==", - "optional": true - }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -2350,6 +2364,7 @@ "requires": { "anymatch": "1.3.2", "async-each": "1.0.1", + "fsevents": "1.1.3", "glob-parent": "2.0.0", "inherits": "2.0.3", "is-binary-path": "1.0.1", @@ -4855,200 +4870,1104 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "finalhandler": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", + "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", + "dev": true, + "requires": { + "debug": "2.6.9", + "encodeurl": "1.0.1", + "escape-html": "1.0.3", + "on-finished": "2.3.0", + "parseurl": "1.3.2", + "statuses": "1.3.1", + "unpipe": "1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, + "find-cache-dir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", + "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", + "dev": true, + "requires": { + "commondir": "1.0.1", + "make-dir": "1.1.0", + "pkg-dir": "2.0.0" + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "2.0.0" + } + }, + "flat-cache": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", + "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", + "dev": true, + "requires": { + "circular-json": "0.3.3", + "del": "2.2.2", + "graceful-fs": "4.1.11", + "write": "0.2.1" + } + }, + "flatten": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", + "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", + "dev": true + }, + "flush-write-stream": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", + "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "1.0.2" + } + }, + "foreach": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", + "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.17" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", + "dev": true + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "dev": true + }, + "from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", + "dev": true + }, + "from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", + "dev": true, + "requires": { + "inherits": "2.0.3", + "readable-stream": "2.3.3" + } + }, + "front-matter": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-2.1.2.tgz", + "integrity": "sha1-91mDufL0E75ljJPf172M5AePXNs=", + "dev": true, + "requires": { + "js-yaml": "3.10.0" + } + }, + "fs-extra": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", + "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "requires": { + "graceful-fs": "4.1.11", + "jsonfile": "4.0.0", + "universalify": "0.1.1" + } + }, + "fs-extra-p": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-4.5.0.tgz", + "integrity": "sha512-V/sdZmV+Yx3+nfXmjRTdBP4mVWCt7hZ0+ZOv+IZo+6fdkBxafaGsI7mYeNv/J3rWyz+mIToCFQORFSwt1bZw8Q==", + "requires": { + "bluebird-lst": "1.0.5", + "fs-extra": "5.0.0" + } + }, + "fs-write-stream-atomic": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", + "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "iferr": "0.1.5", + "imurmurhash": "0.1.4", + "readable-stream": "2.3.3" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fsevents": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.1.3.tgz", + "integrity": "sha512-WIr7iDkdmdbxu/Gh6eKEZJL6KPE74/5MEsf2whTOFNxbIoIixogroLdKYqB6FDav4Wavh/lZdzzd3b2KxIXC5Q==", + "dev": true, + "optional": true, + "requires": { + "nan": "2.8.0", + "node-pre-gyp": "0.6.39" + }, + "dependencies": { + "abbrev": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "ajv": { + "version": "4.11.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "co": "4.6.0", + "json-stable-stringify": "1.0.1" + } + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true + }, + "aproba": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "1.0.0", + "readable-stream": "2.2.9" + } + }, + "asn1": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "assert-plus": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws-sign2": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "aws4": { + "version": "1.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "balanced-match": { + "version": "0.4.2", + "bundled": true, + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "tweetnacl": "0.14.5" + } + }, + "block-stream": { + "version": "0.0.9", + "bundled": true, + "dev": true, + "requires": { + "inherits": "2.0.3" + } + }, + "boom": { + "version": "2.10.1", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "brace-expansion": { + "version": "1.1.7", + "bundled": true, + "dev": true, + "requires": { + "balanced-match": "0.4.2", + "concat-map": "0.0.1" + } + }, + "buffer-shims": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "caseless": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true + }, + "co": { + "version": "4.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "combined-stream": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "requires": { + "delayed-stream": "1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "cryptiles": { + "version": "2.0.5", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1" + } + }, + "dashdash": { + "version": "1.14.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "debug": { + "version": "2.6.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.4.2", + "bundled": true, + "dev": true, + "optional": true + }, + "delayed-stream": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "ecc-jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "extend": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "extsprintf": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "bundled": true, + "dev": true, + "optional": true + }, + "form-data": { + "version": "2.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asynckit": "0.4.0", + "combined-stream": "1.0.5", + "mime-types": "2.1.15" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "fstream": { + "version": "1.0.11", + "bundled": true, + "dev": true, + "requires": { + "graceful-fs": "4.1.11", + "inherits": "2.0.3", + "mkdirp": "0.5.1", + "rimraf": "2.6.1" + } + }, + "fstream-ignore": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fstream": "1.0.11", + "inherits": "2.0.3", + "minimatch": "3.0.4" + } + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "1.1.1", + "console-control-strings": "1.1.0", + "has-unicode": "2.0.1", + "object-assign": "4.1.1", + "signal-exit": "3.0.2", + "string-width": "1.0.2", + "strip-ansi": "3.0.1", + "wide-align": "1.1.2" + } + }, + "getpass": { + "version": "0.1.7", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "glob": { + "version": "7.1.2", + "bundled": true, + "dev": true, + "requires": { + "fs.realpath": "1.0.0", + "inflight": "1.0.6", + "inherits": "2.0.3", + "minimatch": "3.0.4", + "once": "1.4.0", + "path-is-absolute": "1.0.1" + } + }, + "graceful-fs": { + "version": "4.1.11", + "bundled": true, + "dev": true + }, + "har-schema": { + "version": "1.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "har-validator": { + "version": "4.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ajv": "4.11.8", + "har-schema": "1.0.5" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "hawk": { + "version": "3.1.3", + "bundled": true, + "dev": true, + "requires": { + "boom": "2.10.1", + "cryptiles": "2.0.5", + "hoek": "2.16.3", + "sntp": "1.0.9" + } + }, + "hoek": { + "version": "2.16.3", + "bundled": true, + "dev": true + }, + "http-signature": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "0.2.0", + "jsprim": "1.4.0", + "sshpk": "1.13.0" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "requires": { + "once": "1.4.0", + "wrappy": "1.0.2" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true + }, + "ini": { + "version": "1.3.4", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "requires": { + "number-is-nan": "1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true + }, + "isstream": { + "version": "0.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "jodid25519": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsbn": "0.1.1" + } + }, + "jsbn": { + "version": "0.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "bundled": true, + "dev": true, + "optional": true + }, + "json-stable-stringify": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "jsonify": "0.0.0" + } + }, + "json-stringify-safe": { + "version": "5.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "jsonify": { + "version": "0.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "jsprim": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.0.2", + "json-schema": "0.2.3", + "verror": "1.3.6" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "mime-db": { + "version": "1.27.0", + "bundled": true, + "dev": true + }, + "mime-types": { + "version": "2.1.15", + "bundled": true, + "dev": true, + "requires": { + "mime-db": "1.27.0" + } + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "requires": { + "brace-expansion": "1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "node-pre-gyp": { + "version": "0.6.39", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "1.0.2", + "hawk": "3.1.3", + "mkdirp": "0.5.1", + "nopt": "4.0.1", + "npmlog": "4.1.0", + "rc": "1.2.1", + "request": "2.81.0", + "rimraf": "2.6.1", + "semver": "5.3.0", + "tar": "2.2.1", + "tar-pack": "3.4.0" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1.1.0", + "osenv": "0.1.4" + } + }, + "npmlog": { + "version": "4.1.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "1.1.4", + "console-control-strings": "1.1.0", + "gauge": "2.7.4", + "set-blocking": "2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "oauth-sign": { + "version": "0.8.2", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "requires": { + "wrappy": "1.0.2" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "1.0.2", + "os-tmpdir": "1.0.2" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true + }, + "performance-now": { + "version": "0.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "1.0.7", + "bundled": true, + "dev": true + }, + "punycode": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true + }, + "qs": { + "version": "6.4.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "0.4.2", + "ini": "1.3.4", + "minimist": "1.2.0", + "strip-json-comments": "2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.2.9", + "bundled": true, + "dev": true, + "requires": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "isarray": "1.0.0", + "process-nextick-args": "1.0.7", + "string_decoder": "1.0.1", + "util-deprecate": "1.0.2" + } + }, + "request": { + "version": "2.81.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aws-sign2": "0.6.0", + "aws4": "1.6.0", + "caseless": "0.12.0", + "combined-stream": "1.0.5", + "extend": "3.0.1", + "forever-agent": "0.6.1", + "form-data": "2.1.4", + "har-validator": "4.2.1", + "hawk": "3.1.3", + "http-signature": "1.1.1", + "is-typedarray": "1.0.0", + "isstream": "0.1.2", + "json-stringify-safe": "5.0.1", + "mime-types": "2.1.15", + "oauth-sign": "0.8.2", + "performance-now": "0.2.0", + "qs": "6.4.0", + "safe-buffer": "5.0.1", + "stringstream": "0.0.5", + "tough-cookie": "2.3.2", + "tunnel-agent": "0.6.0", + "uuid": "3.0.1" + } + }, + "rimraf": { + "version": "2.6.1", + "bundled": true, + "dev": true, + "requires": { + "glob": "7.1.2" + } + }, + "safe-buffer": { + "version": "5.0.1", + "bundled": true, + "dev": true + }, + "semver": { + "version": "5.3.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sntp": { + "version": "1.0.9", + "bundled": true, + "dev": true, + "requires": { + "hoek": "2.16.3" + } + }, + "sshpk": { + "version": "1.13.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "asn1": "0.2.3", + "assert-plus": "1.0.0", + "bcrypt-pbkdf": "1.0.1", + "dashdash": "1.14.1", + "ecc-jsbn": "0.1.1", + "getpass": "0.1.7", + "jodid25519": "1.0.2", + "jsbn": "0.1.1", + "tweetnacl": "0.14.5" + }, + "dependencies": { + "assert-plus": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "requires": { + "code-point-at": "1.1.0", + "is-fullwidth-code-point": "1.0.0", + "strip-ansi": "3.0.1" + } + }, + "string_decoder": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "stringstream": { + "version": "0.0.5", + "bundled": true, + "dev": true, + "optional": true + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "requires": { + "ansi-regex": "2.1.1" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "2.2.1", + "bundled": true, + "dev": true, + "requires": { + "block-stream": "0.0.9", + "fstream": "1.0.11", + "inherits": "2.0.3" + } + }, + "tar-pack": { + "version": "3.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "2.6.8", + "fstream": "1.0.11", + "fstream-ignore": "1.0.5", + "once": "1.4.0", + "readable-stream": "2.2.9", + "rimraf": "2.6.1", + "tar": "2.2.1", + "uid-number": "0.0.6" + } + }, + "tough-cookie": { + "version": "2.3.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "punycode": "1.4.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "bundled": true, + "dev": true, + "optional": true + }, + "uid-number": { + "version": "0.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true + }, + "uuid": { + "version": "3.0.1", + "bundled": true, "dev": true, + "optional": true + }, + "verror": { + "version": "1.3.6", + "bundled": true, + "dev": true, + "optional": true, "requires": { - "isarray": "1.0.0" + "extsprintf": "1.0.2" } - } - } - }, - "finalhandler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.0.tgz", - "integrity": "sha1-zgtoVbRYU+eRsvzGgARtiCU91/U=", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "1.0.1", - "escape-html": "1.0.3", - "on-finished": "2.3.0", - "parseurl": "1.3.2", - "statuses": "1.3.1", - "unpipe": "1.0.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "wide-align": { + "version": "1.1.2", + "bundled": true, "dev": true, + "optional": true, "requires": { - "ms": "2.0.0" + "string-width": "1.0.2" } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true } } }, - "find-cache-dir": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", - "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", - "dev": true, - "requires": { - "commondir": "1.0.1", - "make-dir": "1.1.0", - "pkg-dir": "2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "requires": { - "locate-path": "2.0.0" - } - }, - "flat-cache": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.0.tgz", - "integrity": "sha1-0wMLMrOBVPTjt+nHCfSQ9++XxIE=", - "dev": true, - "requires": { - "circular-json": "0.3.3", - "del": "2.2.2", - "graceful-fs": "4.1.11", - "write": "0.2.1" - } - }, - "flatten": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flatten/-/flatten-1.0.2.tgz", - "integrity": "sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=", - "dev": true - }, - "flush-write-stream": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", - "integrity": "sha1-yBuQ2HRnZvGmCaRoCZRsRd2K5Bc=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", - "dev": true, - "requires": { - "for-in": "1.0.2" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.5", - "mime-types": "2.1.17" - } - }, - "forwarded": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", - "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=", - "dev": true - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true - }, - "from": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", - "integrity": "sha1-g8YK/Fi5xWmXAH7Rp2izqzA6RP4=", - "dev": true - }, - "from2": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", - "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=", - "dev": true, - "requires": { - "inherits": "2.0.3", - "readable-stream": "2.3.3" - } - }, - "front-matter": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/front-matter/-/front-matter-2.1.2.tgz", - "integrity": "sha1-91mDufL0E75ljJPf172M5AePXNs=", - "dev": true, - "requires": { - "js-yaml": "3.10.0" - } - }, - "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", - "requires": { - "graceful-fs": "4.1.11", - "jsonfile": "4.0.0", - "universalify": "0.1.1" - } - }, - "fs-extra-p": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/fs-extra-p/-/fs-extra-p-4.5.0.tgz", - "integrity": "sha512-V/sdZmV+Yx3+nfXmjRTdBP4mVWCt7hZ0+ZOv+IZo+6fdkBxafaGsI7mYeNv/J3rWyz+mIToCFQORFSwt1bZw8Q==", - "requires": { - "bluebird-lst": "1.0.5", - "fs-extra": "5.0.0" - } - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", - "integrity": "sha1-tH31NJPvkR33VzHnCp3tAYnbQMk=", - "dev": true, - "requires": { - "graceful-fs": "4.1.11", - "iferr": "0.1.5", - "imurmurhash": "0.1.4", - "readable-stream": "2.3.3" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, "fstream": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.11.tgz", @@ -6684,6 +7603,11 @@ "integrity": "sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=", "dev": true }, + "material-colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/material-colors/-/material-colors-1.2.5.tgz", + "integrity": "sha1-UpJZPmdUyxvMK5gDDk4Najr8nqE=" + }, "math-expression-evaluator": { "version": "1.2.17", "resolved": "https://registry.npmjs.org/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz", @@ -8903,6 +9827,18 @@ "prop-types": "15.6.0" } }, + "react-color": { + "version": "2.13.8", + "resolved": "https://registry.npmjs.org/react-color/-/react-color-2.13.8.tgz", + "integrity": "sha1-vMWPeaciub/DfEAuaM0Y8mlwruQ=", + "requires": { + "lodash": "4.17.4", + "material-colors": "1.2.5", + "prop-types": "15.6.0", + "reactcss": "1.2.3", + "tinycolor2": "1.4.1" + } + }, "react-deep-force-update": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz", @@ -9004,6 +9940,14 @@ "twemoji": "2.5.0" } }, + "reactcss": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz", + "integrity": "sha512-KiwVUcFu1RErkI97ywr8nvx8dNOpT03rbnma0SSalTYjkrPYaEajR4a/MRt6DZ46K6arDRbWMNHF+xH7G7n/8A==", + "requires": { + "lodash": "4.17.4" + } + }, "read-config-file": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-1.2.1.tgz", @@ -10553,15 +11497,6 @@ "integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM=", "dev": true }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "dev": true, - "requires": { - "safe-buffer": "5.1.1" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -10602,6 +11537,15 @@ "function-bind": "1.1.1" } }, + "string_decoder": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", + "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", + "dev": true, + "requires": { + "safe-buffer": "5.1.1" + } + }, "stringstream": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", @@ -10882,6 +11826,11 @@ "setimmediate": "1.0.5" } }, + "tinycolor2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz", + "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" + }, "tmp": { "version": "0.0.33", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", diff --git a/package.json b/package.json index 3f65b2a3..8e45794d 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "prop-types": "^15.6.0", "rantscript": "^1.4.0", "react": "^16.2.0", + "react-color": "^2.13.8", "react-dom": "^16.2.0", "react-redux": "^5.0.6", "react-router": "^4.2.0", From dcc7d8014be53d422ab0189b15134a7b5dbb6ddf Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 02:57:57 +0600 Subject: [PATCH 15/63] Color picker for some parts is working, the sidenav and bottom bar will follow the theme --- app/src/js/components/item/bottom_bar.js | 10 ++- app/src/js/components/item/item_card.js | 3 +- app/src/js/components/navigation/items.js | 9 ++- app/src/js/components/navigation/sidenav.js | 9 ++- app/src/js/components/settings/theme.js | 78 +++++++++++++++++++++ app/src/js/containers/navigation/sidenav.js | 2 +- app/src/res/sass/modules/settings.sass | 6 +- 7 files changed, 106 insertions(+), 11 deletions(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index 781633c0..0cb3a350 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -84,11 +84,16 @@ class BottomBar extends Component { return
; } render() { - const { type, item, onDelete } = this.props; + const { + type, item, onDelete, theme, + } = this.props; const { favorited, subscribed } = this.state; const disabled = this.props.isUser ? 'disabled' : ''; return ( -
+
0 ? 'upvoted' : ''}`} @@ -203,6 +208,7 @@ BottomBar.propTypes = { onCommentsClick: PropTypes.func, copyToClip: PropTypes.func.isRequired, item: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, onFavorite: PropTypes.func.isRequired, onSubscribe: PropTypes.func.isRequired, }; diff --git a/app/src/js/components/item/item_card.js b/app/src/js/components/item/item_card.js index c2e972d2..2ecb6cec 100644 --- a/app/src/js/components/item/item_card.js +++ b/app/src/js/components/item/item_card.js @@ -172,7 +172,7 @@ class ItemCard extends Component { >{object} ))} -
} +
}
); } @@ -306,6 +306,7 @@ class ItemCard extends Component {
{this.getTags()} ( -
onClick()} > +
onClick()} + style={{ backgroundColor: theme.item_card.backgroundColor }} + > { item.name }
); Items.propTypes = { item: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, onClick: PropTypes.func.isRequired, className: PropTypes.string, active: PropTypes.string, diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index 3fa598da..b102be98 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -36,10 +36,13 @@ class SideNav extends Component { } render() { const { - sideNavItems, history, location, resetColumn, open, settings, + sideNavItems, history, location, resetColumn, open, settings, theme, } = this.props; return ( -
+
{ this.getUserCard() } @@ -47,6 +50,7 @@ class SideNav extends Component { { sideNavItems.map(item => (
+
+ Rant Card Background Color + { + this.setState({ + theme: { + ...theme, + item_card: { ...theme.item_card, backgroundColor: color.hex }, + }, + }); + this.changeTheme(); + }} + /> + { + this.setState({ + theme: { + ...theme, + item_card: { ...theme.item_card, backgroundColor: e.target.value }, + }, + }); + this.changeTheme(); + }} + value={theme.item_card.backgroundColor} + /> +
+
+ Rant Card Text Color + { + this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.changeTheme(); + }} + /> + { + this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.changeTheme(); + }} + value={theme.backgroundColor} + /> +
+
+ Background Color + { + this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.changeTheme(); + }} + /> + { + this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.changeTheme(); + }} + value={theme.backgroundColor} + /> +
+
+ Background Color + { + this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.changeTheme(); + }} + /> + { + this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.changeTheme(); + }} + value={theme.backgroundColor} + /> +
diff --git a/app/src/js/containers/navigation/sidenav.js b/app/src/js/containers/navigation/sidenav.js index 61bb56a4..2edf2532 100644 --- a/app/src/js/containers/navigation/sidenav.js +++ b/app/src/js/containers/navigation/sidenav.js @@ -37,7 +37,7 @@ const mapDispatchToProps = dispatch => ({ }); const mapStateToProps = state => ({ - theme: state.theme, + theme: state.settings.theme, auth: state.auth, user: state.user, sideNavItems: SIDE_NAV_ITEMS, diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index d1c820df..e24b98b0 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -36,11 +36,11 @@ flex: 1 .theme_settings .custom_colors - padding-left: 1rem - margin-left: 1.5rem display: flex + flex-wrap: wrap .custom_color - flex: 0 0 25% + margin: 0.5rem + flex: 1 0 20% span display: block margin-bottom: 1rem From aa411704599847b284bebcc1c2e25df34efd1ad4 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 22:15:18 +0100 Subject: [PATCH 16/63] Made presets show names --- app/src/js/components/settings/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index da8ed84e..aba828a5 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -64,7 +64,7 @@ class Theme extends Component { - Select Me Please! + {selectedTheme.name}
From 8a94578f1fffb57da0c3ff7fdbac04d551c91424 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 22:15:48 +0100 Subject: [PATCH 17/63] Added shadow to preset cards to stand out from background --- app/src/res/sass/modules/settings.sass | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index e24b98b0..57dac235 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -53,6 +53,7 @@ cursor: pointer margin: 0.5rem padding: 1rem + box-shadow: 1px 1px 6px rgba(0,0,0,0.33) .item_card pointer-events: none margin: 0 From 7a67a4a750abe433bd1b81e174a02eb7f08546d2 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 22:32:00 +0100 Subject: [PATCH 18/63] Added background color to the settings card to match changes in dec31 --- app/src/js/components/settings/theme.js | 3 ++- app/src/res/sass/modules/settings.sass | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index aba828a5..46d5dca8 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -81,8 +81,9 @@ class Theme extends Component { } render() { const { theme } = this.state; + console.log(theme) return ( -
+
{ this.getThemes() }
diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 57dac235..359fa994 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -28,6 +28,7 @@ overflow-y: scroll .theme_container color: white + padding: 0.8rem display: flex margin-top: 2rem position: relative From 0d59d479cfc92b1d4159a33807f951545579fe09 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 22:40:37 +0100 Subject: [PATCH 19/63] Added sharable theme string (WIP) and changed input focus color. --- app/src/js/components/settings/theme.js | 7 +++++++ app/src/res/sass/modules/settings.sass | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index 46d5dca8..563f64fc 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -189,8 +189,15 @@ class Theme extends Component { value={theme.backgroundColor} />
+
+
+ Sharable theme string +
+
diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 359fa994..2d770589 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -35,7 +35,13 @@ flex-direction: column .custom_theme flex: 1 + input:focus + border-bottom: 0.12rem solid #c14857 .theme_settings + .sharable_string + padding: 0.5rem + input + width: 98.5% .custom_colors display: flex flex-wrap: wrap From da7c11ff2155750e776a6480e84e992df58a3df2 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 22:47:16 +0100 Subject: [PATCH 20/63] Changed sharable theme placeholder --- app/src/js/components/settings/theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index 563f64fc..9644e028 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -194,7 +194,7 @@ class Theme extends Component {
Sharable theme string
From 20b319ca7f13d90bbd1668636e1933b30dfa7a97 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Mon, 1 Jan 2018 23:05:20 +0100 Subject: [PATCH 21/63] notif sort working now! (a bit slow, can be optimized) --- app/src/js/components/notifs/notif_bubbles.js | 40 ++++++++++++------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/app/src/js/components/notifs/notif_bubbles.js b/app/src/js/components/notifs/notif_bubbles.js index 6713abfc..44efc2b2 100644 --- a/app/src/js/components/notifs/notif_bubbles.js +++ b/app/src/js/components/notifs/notif_bubbles.js @@ -14,21 +14,33 @@ class NotifBubbles extends PureComponent { if (this.props.sort) { console.time('qualitySort'); - const worth = { - comment_discuss: 0, - comment_vote: 1, - content_vote: 2, - comment_content: 3, - comment_mention: 4, - }; + const tempItems = data.items; - tempItems.sort((a, b) => { - if (a.read === 1) { return 1; } - console.log(a.type, worth[a.type] >= worth[b.type], worth[a.type], worth[b.type]) - if (worth[a.type] >= worth[b.type]) { return -1; } - return -1; + const commentDiscuss = []; + const commentVote = []; + const contentVote = []; + const commentContent = []; + const commentMention = []; + const alreadyRead = []; + + tempItems.forEach((notif) => { + if (notif.read === 1) { alreadyRead.push(notif); return; } + if (notif.type === 'comment_discuss') { commentDiscuss.push(notif); } + if (notif.type === 'comment_vote') { commentVote.push(notif); } + if (notif.type === 'content_vote') { contentVote.push(notif); } + if (notif.type === 'comment_content') { commentContent.push(notif); } + if (notif.type === 'comment_mention') { commentMention.push(notif); } }); - data.items = tempItems; + + data.items = [ + ...commentMention, + ...commentContent, + ...contentVote, + ...commentVote, + ...commentDiscuss, + ...alreadyRead, + ]; + console.timeEnd('qualitySort'); } else { console.time('timeSort'); @@ -37,7 +49,7 @@ class NotifBubbles extends PureComponent { return b.created_time - a.created_time; }); data.items = tempItems; - console.timeEnd('timeSort'); + console.timeEnd('timeSort'); } return ( From 9d6627f0d6bb19e70a76f2d08b128da4769f6e2e Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 22:47:22 +0600 Subject: [PATCH 22/63] Theme is pretty much working --- app/src/js/components/item/bottom_bar.js | 6 +- app/src/js/components/item/item_card.js | 10 +- app/src/js/components/navigation/sidenav.js | 6 +- app/src/js/components/notifs/notifs.js | 8 +- app/src/js/components/settings/theme.js | 161 +++++++++++++++++--- app/src/js/components/user/user_badge.js | 6 +- app/src/js/consts/types.js | 28 +++- app/src/js/containers/notifs/notifs.js | 1 + app/src/res/sass/modules/settings.sass | 7 +- 9 files changed, 188 insertions(+), 45 deletions(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index 0cb3a350..9da9f229 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -89,10 +89,14 @@ class BottomBar extends Component { } = this.props; const { favorited, subscribed } = this.state; const disabled = this.props.isUser ? 'disabled' : ''; + const backgroundColor = type === ITEM.COMMENT.NAME ? + theme.comment_card.backgroundColor : theme.item_card.backgroundColor; + const color = type === ITEM.COMMENT.NAME ? + theme.comment_card.color : theme.item_card.color; return (
{object} ))} -
} +
}
); } @@ -260,13 +260,17 @@ class ItemCard extends Component { } // If there is any image with this rant const image = item.attached_image || ''; + const backgroundColor = isComment ? + theme.comment_card.backgroundColor : theme.item_card.backgroundColor; + const color = isComment ? + theme.comment_card.color : theme.item_card.color; return (
diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index b102be98..9b4361f0 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -77,7 +77,11 @@ class SideNav extends Component { }
-
diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index 0cd3ee7b..d825fcba 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -63,7 +63,7 @@ class Notifs extends Component { } render() { const { - notifs, auth, open, clearNotifs, + notifs, auth, open, clearNotifs, theme, } = this.props; /* Wondering why there is notifs.notifs? @@ -88,10 +88,13 @@ class Notifs extends Component { > @@ -111,6 +114,7 @@ class Notifs extends Component { Notifs.propTypes = { auth: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, fetchNotifs: PropTypes.func.isRequired, notifs: PropTypes.object, openNotif: PropTypes.func.isRequired, diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index 9644e028..ba753b54 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -8,17 +8,18 @@ class Theme extends Component { constructor() { super(); this.state = { + sharableTheme: '', theme: { name: 'Custom Theme', id: 'custom_theme', backgroundColor: '#54556E', item_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, comment_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, column: { backgroundColor: '#54556E', @@ -27,9 +28,61 @@ class Theme extends Component { user_badge: { details_back: '#54556E', }, + plus_notif: { + backgroundColor: '#D55161', + }, }, }; } + componentWillMount() { + const { theme } = this.props; + const sharableTheme = `${theme.backgroundColor}, ${theme.item_card.backgroundColor}, ${theme.item_card.color}, ${theme.comment_card.backgroundColor}, ${theme.comment_card.color}, ${theme.plus_notif.backgroundColor}`; + this.setState({ theme, sharableTheme }); + } + componentDidUpdate(prevProps) { + if (prevProps.theme !== this.props.theme) { + const { theme } = this.props; + const sharableTheme = `${theme.backgroundColor}, ${theme.item_card.backgroundColor}, ${theme.item_card.color}, ${theme.comment_card.backgroundColor}, ${theme.comment_card.color}, ${theme.plus_notif.backgroundColor}`; + this.setState({ sharableTheme, theme: this.props.theme }); + } + } + handleSharableTheme(values) { + this.setState({ sharableTheme: values }); + const themeVals = values.replace(' ', '').split(','); + if (themeVals.length !== 6) { + return; + } + for (let i = 0; i < themeVals.length; i += 1) { + const isCorrect = /[#]\S{6}/g.test(themeVals[i]); + if (!isCorrect) { + return; + } + } + console.log(themeVals); + this.props.changeTheme(null, { + name: 'Custom Theme', + id: 'custom_theme', + backgroundColor: themeVals[0].replace(' ', ''), + item_card: { + backgroundColor: themeVals[1].replace(' ', ''), + color: themeVals[2].replace(' ', ''), + }, + comment_card: { + backgroundColor: themeVals[3].replace(' ', ''), + color: themeVals[4].replace(' ', ''), + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + plus_notif: { + backgroundColor: themeVals[5].replace(' ', ''), + }, + }); + } getTheme(key) { const { theme } = this.props; const selectedTheme = THEMES[key]; @@ -43,6 +96,7 @@ class Theme extends Component { backgroundColor: selectedTheme.backgroundColor, }} onClick={() => { this.props.changeTheme(key); }} + key={key} >
@@ -94,8 +147,8 @@ class Theme extends Component {

Custom

-
- Background Color +
+ Background { @@ -111,8 +164,8 @@ class Theme extends Component { value={theme.backgroundColor} />
-
- Rant Card Background Color +
+ Rant Card Background { @@ -138,55 +191,112 @@ class Theme extends Component { value={theme.item_card.backgroundColor} />
-
- Rant Card Text Color +
+ Rant Card Text { - this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.setState({ + theme: { + ...theme, + item_card: { ...theme.item_card, color: color.hex }, + }, + }); this.changeTheme(); }} /> { - this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.setState({ + theme: { + ...theme, + item_card: { ...theme.item_card, color: e.target.value }, + }, + }); this.changeTheme(); }} - value={theme.backgroundColor} + value={theme.item_card.color} />
-
- Background Color +
+ Comment Card Background { - this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.setState({ + theme: { + ...theme, + comment_card: { ...theme.comment_card, backgroundColor: color.hex }, + }, + }); this.changeTheme(); }} /> { - this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.setState({ + theme: { + ...theme, + comment_card: { ...theme.comment_card, backgroundColor: e.target.value }, + }, + }); this.changeTheme(); }} - value={theme.backgroundColor} + value={theme.comment_card.backgroundColor} + /> +
+
+ Comment Card Text + { + this.setState({ + theme: { + ...theme, + comment_card: { ...theme.comment_card, color: color.hex }, + }, + }); + this.changeTheme(); + }} + /> + { + this.setState({ + theme: { + ...theme, + comment_card: { ...theme.comment_card, color: e.target.value }, + }, + }); + this.changeTheme(); + }} + value={theme.comment_card.color} />
- Background Color + PlusPlus and Notifs { - this.setState({ theme: { ...theme, backgroundColor: color.hex } }); + this.setState({ + theme: { + ...theme, + plus_notif: { ...theme.plus_notif, backgroundColor: color.hex }, + }, + }); this.changeTheme(); }} /> { - this.setState({ theme: { ...theme, backgroundColor: e.target.value } }); + this.setState({ + theme: { + ...theme, + plus_notif: { ...theme.plus_notif, backgroundColor: e.target.value }, + }, + }); this.changeTheme(); }} - value={theme.backgroundColor} + value={theme.plus_notif.backgroundColor} />
@@ -194,7 +304,8 @@ class Theme extends Component {
Sharable theme string this.handleSharableTheme(e.target.value)} + value={this.state.sharableTheme} />
diff --git a/app/src/js/components/user/user_badge.js b/app/src/js/components/user/user_badge.js index 64e1f7cb..53ba169c 100644 --- a/app/src/js/components/user/user_badge.js +++ b/app/src/js/components/user/user_badge.js @@ -40,17 +40,17 @@ class UserBadge extends Component { open={open} /> : null}
this.openCard()}> -

{user.username}

+

{user.username}

{user.score} {user.dpp === 1 && Supporter - } + }
); diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index b2980fcf..1b044502 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -52,11 +52,11 @@ export const THEMES = { backgroundColor: '#54556E', item_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, comment_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, column: { backgroundColor: '#54556E', @@ -65,6 +65,9 @@ export const THEMES = { user_badge: { details_back: '#54556E', }, + plus_notif: { + backgroundColor: '#D55161', + }, }, LIGHT_THEME: { name: 'Light Theme', @@ -72,11 +75,11 @@ export const THEMES = { backgroundColor: '#94556E', item_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, comment_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, column: { backgroundColor: '#54556E', @@ -85,6 +88,9 @@ export const THEMES = { user_badge: { details_back: '#54556E', }, + plus_notif: { + backgroundColor: '#D55161', + }, }, SOLARIZED_DARK: { name: 'Solarized Dark', @@ -92,11 +98,11 @@ export const THEMES = { backgroundColor: '#342345', item_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, comment_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, column: { backgroundColor: '#54556E', @@ -105,6 +111,9 @@ export const THEMES = { user_badge: { details_back: '#54556E', }, + plus_notif: { + backgroundColor: '#D55161', + }, }, SOLARIZED_LIGHT: { name: 'Solarized Light', @@ -112,11 +121,11 @@ export const THEMES = { backgroundColor: '#230923', item_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, comment_card: { backgroundColor: '#40415A', - color: 'white', + color: '#FFFFFF', }, column: { backgroundColor: '#54556E', @@ -125,6 +134,9 @@ export const THEMES = { user_badge: { details_back: '#54556E', }, + plus_notif: { + backgroundColor: '#D55161', + }, }, }; diff --git a/app/src/js/containers/notifs/notifs.js b/app/src/js/containers/notifs/notifs.js index fea0ce79..156aad03 100644 --- a/app/src/js/containers/notifs/notifs.js +++ b/app/src/js/containers/notifs/notifs.js @@ -10,6 +10,7 @@ import { ITEM } from '../../consts/types'; const mapStateToProps = state => ({ auth: state.auth, notifs: state.notifs, + theme: state.settings.theme, }); /* Here we use dispatch to dispatch actions to redux store diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 2d770589..4ce82933 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -47,7 +47,7 @@ flex-wrap: wrap .custom_color margin: 0.5rem - flex: 1 0 20% + flex: 1 0 30% span display: block margin-bottom: 1rem @@ -56,11 +56,14 @@ .items_container flex: 1 display: flex + flex-wrap: wrap + justify-content: center .item_container + flex: 0 0 25% cursor: pointer margin: 0.5rem padding: 1rem - box-shadow: 1px 1px 6px rgba(0,0,0,0.33) + box-shadow: 1px 1px 6px rgba(0,0,0,0.33) .item_card pointer-events: none margin: 0 From 127283fac1b9127e689f6bb6fcdbdfd9be85b504 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Tue, 2 Jan 2018 22:53:39 +0600 Subject: [PATCH 23/63] fixed a bug for new states --- app/src/js/components/navigation/sidenav.js | 2 +- app/src/js/components/notifs/notifs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index 9b4361f0..8e5b4ef0 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -80,7 +80,7 @@ class SideNav extends Component { diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index d825fcba..fa087bbe 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -88,7 +88,7 @@ class Notifs extends Component { > - - +
From ee070fcb1c961c3e5a6f6a59ac54b106f4edf812 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 18:11:29 +0100 Subject: [PATCH 27/63] Fixed tags color --- app/src/js/components/item/item_card.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/js/components/item/item_card.js b/app/src/js/components/item/item_card.js index b9150262..703c9f6c 100644 --- a/app/src/js/components/item/item_card.js +++ b/app/src/js/components/item/item_card.js @@ -157,7 +157,7 @@ class ItemCard extends Component { this.props.history.replace(`/search/${term}`); } getTags() { - const { item } = this.props; + const { item, theme } = this.props; if (!item.tags) { return
; } @@ -168,6 +168,7 @@ class ItemCard extends Component { this.handleTagClick(object)} >{object} From 20df631c6ebc1c17c19d8022da7f388693c4d977 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 18:13:16 +0100 Subject: [PATCH 28/63] Fixed sidebar items color --- app/src/js/components/navigation/items.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/components/navigation/items.js b/app/src/js/components/navigation/items.js index 0b198e1a..d98803bd 100644 --- a/app/src/js/components/navigation/items.js +++ b/app/src/js/components/navigation/items.js @@ -7,7 +7,7 @@ const Items = ({
onClick()} - style={{ backgroundColor: theme.item_card.backgroundColor }} + style={{ backgroundColor: theme.item_card.backgroundColor, color: theme.item_card.color }} > { item.name }
From dcb106576e5d853ae4819aef2dd0899a02421200 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 18:53:28 +0100 Subject: [PATCH 29/63] Vote buttons now match theme --- app/src/js/components/item/bottom_bar.js | 17 ++++++++++++++ app/src/res/sass/modules/bottom_bar.sass | 29 +++++++++--------------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index 8d4b7ba0..e17e5d75 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -93,6 +93,7 @@ class BottomBar extends Component { theme.comment_card.backgroundColor : theme.item_card.backgroundColor; const color = type === ITEM.COMMENT.NAME ? theme.comment_card.color : theme.item_card.color; + const voteColor = theme.plus_notif.backgroundColor; return (
this.vote(1)} > +
0 ? 'votebefore' : ''}`} + /> + + +
0 ? `${voteColor}` : 'rgba(0,0,0,0)' }} + className={`${this.state.isVoted > 0 ? 'voteafter' : ''} after`} + />
{ this.state.score } @@ -115,8 +124,16 @@ class BottomBar extends Component { disabled={disabled} className={`downvote ${disabled} ${this.state.isVoted < 0 ? 'downvoted' : ''}`} > +
- - +
Date: Wed, 3 Jan 2018 00:05:26 +0600 Subject: [PATCH 30/63] fixed some theme bugs --- app/src/js/components/settings/general.js | 29 ++++++++++++++++------ app/src/js/components/settings/settings.js | 2 +- app/src/js/components/settings/theme.js | 5 +++- app/src/res/sass/modules/item_card.sass | 2 +- app/src/res/sass/modules/settings.sass | 5 ---- 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/app/src/js/components/settings/general.js b/app/src/js/components/settings/general.js index c1cbe843..bd787e7c 100644 --- a/app/src/js/components/settings/general.js +++ b/app/src/js/components/settings/general.js @@ -63,7 +63,7 @@ class General extends Component { } } getSettings() { - const { general } = this.props; + const { general, theme } = this.props; const settings = []; Object.keys(general).forEach((key) => { const setting = general[key]; @@ -78,19 +78,33 @@ class General extends Component { ); subSettings.push(settingComponent); }); - settings.push(
+ settings.push(
{ Header }
{ - subSettings.map(s => s) - } + subSettings.map(s => s) + }
-
); +
); } else { const component = this.getSettingComponent(setting, key); - settings.push(
+ settings.push(
{ component } -
); +
); } }); return settings; @@ -110,6 +124,7 @@ class General extends Component { General.propTypes = { general: PropTypes.object.isRequired, changeGeneral: PropTypes.func.isRequired, + theme: PropTypes.object.isRequired, }; export default General; diff --git a/app/src/js/components/settings/settings.js b/app/src/js/components/settings/settings.js index 0f43f0ff..9240b35a 100644 --- a/app/src/js/components/settings/settings.js +++ b/app/src/js/components/settings/settings.js @@ -25,7 +25,7 @@ class Items extends Component { } = this.props; if (activeNav === SETTINGS_NAV[0]) { return ( - + ); } else if (activeNav === SETTINGS_NAV[1]) { return ; diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index ba753b54..9077562a 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -136,7 +136,10 @@ class Theme extends Component { render() { const { theme } = this.state; return ( -
+
{ this.getThemes() }
diff --git a/app/src/res/sass/modules/item_card.sass b/app/src/res/sass/modules/item_card.sass index 901b0ce0..288dccba 100644 --- a/app/src/res/sass/modules/item_card.sass +++ b/app/src/res/sass/modules/item_card.sass @@ -14,7 +14,7 @@ padding: 0.2rem 0 display: block a - color: white + color: inherit span.title font-size: 0.9rem color: grey diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index 0607f453..6a511095 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -27,7 +27,6 @@ height: calc(100vh - 2.8rem) overflow-y: scroll .theme_container - color: white padding: 0.8rem display: flex margin-top: 2rem @@ -73,14 +72,12 @@ display: flex justify-content: center margin: 4rem 0 1rem 0 - color: white .multi_settings margin-bottom: 18px background: #40415a padding: 0.8rem box-shadow: 2px 2px 5px rgba(0,0,0,0.2) .header - color: white padding: 0.3rem 0 .options margin-left: 1.5rem @@ -94,7 +91,6 @@ display: flex justify-content: space-between align-items: center - color: white margin: 0.6rem 0 0 0 ::-webkit-input-placeholder color: #bbb @@ -109,7 +105,6 @@ margin: 0.6rem 0 0 0 cursor: pointer .setting_label - color: white user-select: none .setting_option display: flex From 9d5c392b7e94ced81fe67f3eea05ee0ef6eb5fca Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 00:11:24 +0600 Subject: [PATCH 31/63] fixed topbar color --- app/src/js/components/columns/column_topbar.js | 5 ++++- app/src/res/sass/modules/column.sass | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/js/components/columns/column_topbar.js b/app/src/js/components/columns/column_topbar.js index be824a7d..44c5132b 100644 --- a/app/src/js/components/columns/column_topbar.js +++ b/app/src/js/components/columns/column_topbar.js @@ -212,7 +212,10 @@ class ColumnTopBar extends Component {
this.handleHoverLeave()} - style={{ width: `${theme.column.width}px` }} + style={{ + width: `${theme.column.width}px`, + color: theme.item_card.color, + }} >
Date: Wed, 3 Jan 2018 00:13:17 +0600 Subject: [PATCH 32/63] fixed right navs --- app/src/res/sass/modules/column.sass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/res/sass/modules/column.sass b/app/src/res/sass/modules/column.sass index 08799d80..cf6a30b4 100644 --- a/app/src/res/sass/modules/column.sass +++ b/app/src/res/sass/modules/column.sass @@ -60,7 +60,7 @@ .right_navs flex: 2 padding: 3px 0 0 0 - color: white + color: inherit display: flex justify-content: flex-end span From aa028c28c274d99f6947407217386618acc98ac2 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 19:17:31 +0100 Subject: [PATCH 33/63] Fixed vote hover color --- app/src/js/components/item/bottom_bar.js | 14 ++++++++++++++ app/src/res/sass/modules/bottom_bar.sass | 2 -- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index e17e5d75..59155e20 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -16,6 +16,8 @@ class BottomBar extends Component { triggerActive: false, favorited: false, subscribed: false, + plusHover: false, + minusHover: false, }; } componentWillMount() { @@ -83,6 +85,12 @@ class BottomBar extends Component { } return
; } + togglePlusHover() { + this.setState({ plusHover: !this.state.plusHover }); + } + toggleMinusHover() { + this.setState({ minusHover: !this.state.minusHover }); + } render() { const { type, item, onDelete, theme, @@ -103,6 +111,9 @@ class BottomBar extends Component {
0 ? 'upvoted' : ''}`} disabled={disabled} + style={{ backgroundColor: this.state.plusHover ? theme.backgroundColor : '' }} + onMouseEnter={this.togglePlusHover.bind(this)} + onMouseLeave={this.togglePlusHover.bind(this)} onClick={() => this.vote(1)} >
this.vote(-1)} disabled={disabled} className={`downvote ${disabled} ${this.state.isVoted < 0 ? 'downvoted' : ''}`} + style={{ backgroundColor: this.state.minusHover ? theme.backgroundColor : '' }} + onMouseEnter={this.toggleMinusHover.bind(this)} + onMouseLeave={this.toggleMinusHover.bind(this)} >
Date: Tue, 2 Jan 2018 19:21:48 +0100 Subject: [PATCH 34/63] Fixed supporter badge color --- app/src/js/components/user/user_badge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/js/components/user/user_badge.js b/app/src/js/components/user/user_badge.js index 53ba169c..003e99e3 100644 --- a/app/src/js/components/user/user_badge.js +++ b/app/src/js/components/user/user_badge.js @@ -48,7 +48,7 @@ class UserBadge extends Component { {user.dpp === 1 && Supporter }
From 409a32f023f94232449bc0d30d99c843c1b978e5 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 19:31:22 +0100 Subject: [PATCH 35/63] More themes :tada: --- app/src/js/consts/types.js | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index 1b044502..1f46a0e3 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -69,6 +69,52 @@ export const THEMES = { backgroundColor: '#D55161', }, }, + BLACK_THEME: { + name: 'Black Theme', + id: 'white_theme', + backgroundColor: '#000000', + item_card: { + backgroundColor: '#111111', + color: '#FFFFFF', + }, + comment_card: { + backgroundColor: '#111111', + color: '#FFFFFF', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + plus_notif: { + backgroundColor: '#FFFFFF', + }, + }, + WHITE_THEME: { + name: 'White Theme', + id: 'white_theme', + backgroundColor: '#F5F5F5', + item_card: { + backgroundColor: '#FFFFFF', + color: '#000000', + }, + comment_card: { + backgroundColor: '#FFFFFF', + color: '#00000', + }, + column: { + backgroundColor: '#54556E', + width: '450', + }, + user_badge: { + details_back: '#54556E', + }, + plus_notif: { + backgroundColor: '#000000', + }, + }, LIGHT_THEME: { name: 'Light Theme', id: 'light_theme', From 71bf697a93026ab6c52853e4db620607263d4fe0 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 00:33:38 +0600 Subject: [PATCH 36/63] fixed all linting errors --- .eslintrc.json | 6 ++-- app/src/js/actions/settings.js | 2 +- app/src/js/components/comments/comments.js | 1 + .../components/emoji_picker/emoji_picker.js | 2 +- app/src/js/components/item/bottom_bar.js | 2 +- app/src/js/components/item/item_card.js | 6 ++-- app/src/js/components/navigation/sidenav.js | 7 ---- app/src/js/components/notifs/notif_bubble.js | 6 ---- app/src/js/components/notifs/notifs.js | 2 -- app/src/js/components/settings/general.js | 34 +++++++++++-------- app/src/js/components/settings/theme.js | 6 +++- app/src/js/components/user/user_badge.js | 7 ++-- app/src/js/components/user/user_card.js | 21 ++++++++---- app/src/js/components/user/user_profile.js | 28 ++++++++++----- app/src/js/components/utilities/post_rant.js | 31 +++++++---------- app/src/js/index.js | 1 + 16 files changed, 86 insertions(+), 76 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 985bc0cb..67e42bba 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -26,14 +26,16 @@ "everything-else", "render" ] - }], + }], + "prefer-destructuring": 0, "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] - }], + }], "jsx-a11y/no-static-element-interactions": 0, "jsx-a11y/no-noninteractive-element-interactions": 0, "jsx-a11y/href-no-hash": "off", "jsx-a11y/click-events-have-key-events": "off", + "jsx-a11y/mouse-events-have-key-events": "off", "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }], "import/no-dynamic-require": 0, "import/no-extraneous-dependencies": "off", diff --git a/app/src/js/actions/settings.js b/app/src/js/actions/settings.js index ae920b43..e9b88f24 100644 --- a/app/src/js/actions/settings.js +++ b/app/src/js/actions/settings.js @@ -1,4 +1,4 @@ -import { SETTINGS, ITEM, THEMES } from '../consts/types'; +import { SETTINGS, ITEM } from '../consts/types'; import { fetchUser } from './user'; import { fetchNotifs } from './notifs'; import { openModal } from './modal'; diff --git a/app/src/js/components/comments/comments.js b/app/src/js/components/comments/comments.js index f2f5562f..aa2f4410 100644 --- a/app/src/js/components/comments/comments.js +++ b/app/src/js/components/comments/comments.js @@ -11,6 +11,7 @@ class Comments extends Component { constructor() { super(); this.state = { + // eslint-disable-next-line item: null, }; } diff --git a/app/src/js/components/emoji_picker/emoji_picker.js b/app/src/js/components/emoji_picker/emoji_picker.js index 04808913..6d52b0b5 100644 --- a/app/src/js/components/emoji_picker/emoji_picker.js +++ b/app/src/js/components/emoji_picker/emoji_picker.js @@ -23,7 +23,7 @@ const allEmojis = []; class EmojiPicker extends Component { constructor(props) { super(props); - this.state = { activeTab: 'people', search: '' }; + this.state = { activeTab: 'people' }; } componentWillMount() { emojiData.categories = []; diff --git a/app/src/js/components/item/bottom_bar.js b/app/src/js/components/item/bottom_bar.js index e17e5d75..2c66d1cb 100644 --- a/app/src/js/components/item/bottom_bar.js +++ b/app/src/js/components/item/bottom_bar.js @@ -87,7 +87,7 @@ class BottomBar extends Component { const { type, item, onDelete, theme, } = this.props; - const { favorited, subscribed } = this.state; + const { favorited } = this.state; const disabled = this.props.isUser ? 'disabled' : ''; const backgroundColor = type === ITEM.COMMENT.NAME ? theme.comment_card.backgroundColor : theme.item_card.backgroundColor; diff --git a/app/src/js/components/item/item_card.js b/app/src/js/components/item/item_card.js index 703c9f6c..1dfc5423 100644 --- a/app/src/js/components/item/item_card.js +++ b/app/src/js/components/item/item_card.js @@ -163,7 +163,8 @@ class ItemCard extends Component { } return (
- {item.tags.length !== 0 &&
+ {item.tags.length !== 0 && +
{item.tags.map(object => ( {object} ))} -
} +
+ }
); } diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index 8e5b4ef0..4e79779b 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -7,13 +7,6 @@ import { ITEM } from '../../consts/types'; const { ipcRenderer } = require('electron'); class SideNav extends Component { - constructor(props) { - super(props); - this.state = { - username: '', - password: '', - }; - } componentDidMount() { ipcRenderer.on('compose_rant', () => { this.props.open(); }); document.addEventListener('keydown', (e) => { diff --git a/app/src/js/components/notifs/notif_bubble.js b/app/src/js/components/notifs/notif_bubble.js index 509a6534..979efb07 100644 --- a/app/src/js/components/notifs/notif_bubble.js +++ b/app/src/js/components/notifs/notif_bubble.js @@ -3,12 +3,6 @@ import PropTypes from 'prop-types'; import { getNotifText } from '../../consts/utils'; class Notification extends Component { - constructor(props) { - super(props); - this.state = { - visable: false, - }; - } shouldComponentUpdate(nextProps) { const { notif } = this.props; if (nextProps.unread === 0 && (notif.read === 1)) { diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index fa087bbe..9aa81bf6 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -9,9 +9,7 @@ class Notifs extends Component { constructor() { super(); this.state = { - notifTimestamp: 1, active: false, - firstFetch: true, }; } componentDidMount() { diff --git a/app/src/js/components/settings/general.js b/app/src/js/components/settings/general.js index bd787e7c..48b7b734 100644 --- a/app/src/js/components/settings/general.js +++ b/app/src/js/components/settings/general.js @@ -78,21 +78,24 @@ class General extends Component { ); subSettings.push(settingComponent); }); - settings.push(
- { Header } -
- { - subSettings.map(s => s) - } -
-
); + /* eslint-disable */ + settings.push( +
+ { Header } +
+ { + subSettings.map(s => s) + } +
+
, + ); } else { const component = this.getSettingComponent(setting, key); settings.push(
{ component }
); + /* eslint-enable */ } }); return settings; diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index 9077562a..05b9c400 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { SketchPicker, CompactPicker, SliderPicker } from 'react-color'; +import { SliderPicker } from 'react-color'; import PropTypes from 'prop-types'; import Twemoji from 'react-twemoji'; import { THEMES } from '../../consts/types'; @@ -43,6 +43,10 @@ class Theme extends Component { if (prevProps.theme !== this.props.theme) { const { theme } = this.props; const sharableTheme = `${theme.backgroundColor}, ${theme.item_card.backgroundColor}, ${theme.item_card.color}, ${theme.comment_card.backgroundColor}, ${theme.comment_card.color}, ${theme.plus_notif.backgroundColor}`; + /** + * Under if statement so it's okay to use + */ + // eslint-disable-next-line this.setState({ sharableTheme, theme: this.props.theme }); } } diff --git a/app/src/js/components/user/user_badge.js b/app/src/js/components/user/user_badge.js index 53ba169c..33d0da6f 100644 --- a/app/src/js/components/user/user_badge.js +++ b/app/src/js/components/user/user_badge.js @@ -25,7 +25,6 @@ class UserBadge extends Component { // const c = // ['dGFobmlr', 'RGFjZXhp', 'ZGZveA==', 'dHJvZ3Vz'].indexOf(btoa(user.username)) > -1 ? // `#${user.avatar.b}` : '#ffffff'; - const c = '#ffffff'; return (
@@ -46,11 +45,13 @@ class UserBadge extends Component { style={{ backgroundColor: theme.backgroundColor }} >{user.score} - {user.dpp === 1 && Supporter - } + + }
); diff --git a/app/src/js/components/user/user_card.js b/app/src/js/components/user/user_card.js index fcb32e88..4a4f1047 100644 --- a/app/src/js/components/user/user_card.js +++ b/app/src/js/components/user/user_card.js @@ -66,11 +66,14 @@ class UserCard extends Component { style={{ backgroundColor: 'rgb(84, 85, 110)' }} >{user.score} - {user.dpp === 1 && Supporter - } + > + Supporter + + }
@@ -80,16 +83,20 @@ class UserCard extends Component { { user.about !== '' &&
  • {user.about}

  • } { user.skills !== '' &&
  • {user.skills}

  • } { user.location !== '' &&
  • {user.location}

  • } - { user.github !== '' &&
  • + { user.github !== '' && +
  • shell.openExternal(`https://www.github.com/${user.github}`)}> {user.github}

    -
  • } - { user.website !== '' &&
  • +
  • + } + { user.website !== '' && +
  • UserCard.openLink(user.website)}> {user.website}

    -
  • } + + }
    diff --git a/app/src/js/components/user/user_profile.js b/app/src/js/components/user/user_profile.js index 734609ec..4bf4be3e 100644 --- a/app/src/js/components/user/user_profile.js +++ b/app/src/js/components/user/user_profile.js @@ -208,23 +208,33 @@ class UserProfile extends Component {
      - { user.about !== '' &&
    • + { user.about !== '' && +
    • {user.about}

      -
    • } - { user.skills !== '' &&
    • +
    • + } + { user.skills !== '' && +
    • {user.skills}

      -
    • } - { user.location !== '' &&
    • {user.location}

    • } - { user.github !== '' &&
    • +
    • + } + { user.location !== '' && +
    • {user.location}

    • + } + { user.github !== '' && +
    • shell.openExternal(`https://www.github.com/${user.github}`)}> {user.github}

      -
    • } - { user.website !== '' &&
    • +
    • + } + { user.website !== '' && +
    • UserProfile.openLink(user.website)}> {user.website}

      -
    • } + + }
    diff --git a/app/src/js/components/utilities/post_rant.js b/app/src/js/components/utilities/post_rant.js index 322985b6..d4b783bb 100644 --- a/app/src/js/components/utilities/post_rant.js +++ b/app/src/js/components/utilities/post_rant.js @@ -29,9 +29,8 @@ class PostRant extends Component { constructor() { super(); this.state = { - rant_content: '', + rantContent: '', tags: '', - limitCrossed: null, disabled: false, type: 1, draftName: '', @@ -47,7 +46,7 @@ class PostRant extends Component { componentWillMount() { const { postRant } = this.props; if (postRant.autoSave.content) { - this.setState({ rant_content: postRant.autoSave.content, tags: postRant.autoSave.tags }); + this.setState({ rantContent: postRant.autoSave.content, tags: postRant.autoSave.tags }); } } @@ -61,20 +60,20 @@ class PostRant extends Component { .then((res) => { const rant = res.rant; this.setState({ - rant_content: rant.text, + rantContent: rant.text, tags: rant.tags.join(), }); }); } componentWillUnmount() { - this.props.saveAutoSave({ content: this.state.rant_content, tags: this.state.tags }); + this.props.saveAutoSave({ content: this.state.rantContent, tags: this.state.tags }); } saveDraft() { - const { draftName, rant_content, tags } = this.state; + const { draftName, rantContent, tags } = this.state; if (draftName !== '') { - this.props.addDraft(draftName, { content: rant_content, tags }); + this.props.addDraft(draftName, { content: rantContent, tags }); } } @@ -83,7 +82,7 @@ class PostRant extends Component { const draft = postRant.drafts[index]; if (draft.name && draft.rant) { this.setState({ - draftName: draft.name, rant_content: draft.rant.content, tags: draft.rant.tags, + draftName: draft.name, rantContent: draft.rant.content, tags: draft.rant.tags, }); } } @@ -109,15 +108,12 @@ class PostRant extends Component { } this.props.clearAutoSave(); this.setState({ - posting: false, - rant_content: '', + rantContent: '', tags: '', - limitCrossed: null, }); this.props.open(ITEM.RANT.NAME, item.id); }) .catch(() => { - this.setState({ posting: false }); }); } @@ -141,23 +137,20 @@ class PostRant extends Component { } this.props.clearAutoSave(); this.setState({ - posting: false, - rant_content: '', + rantContent: '', tags: '', - limitCrossed: null, disabled: true, }); this.props.open(ITEM.RANT.NAME, res.rant_id); }) .catch(() => { - this.setState({ posting: false }); }); } render() { const { auth, item, postRant } = this.props; const { popup } = this.state; - if (item.id !== 0 && this.state.rant_content === '') { + if (item.id !== 0 && this.state.rantContent === '') { return (
    @@ -181,8 +174,8 @@ class PostRant extends Component {
    this.onPost(text, image)} - value={this.state.rant_content} - onChange={text => this.setState({ rant_content: text })} + value={this.state.rantContent} + onChange={text => this.setState({ rantContent: text })} disabled={this.state.disabled || auth.user === null} placeholder="The rant starts here..." tags={this.state.tags} diff --git a/app/src/js/index.js b/app/src/js/index.js index 5b5f316c..f76ded8c 100644 --- a/app/src/js/index.js +++ b/app/src/js/index.js @@ -28,6 +28,7 @@ document.addEventListener('keydown', (e) => { // eslint-disable-next-line require('electron').remote.getCurrentWindow().toggleDevTools(); } else if (e.which === 116) { + // eslint-disable-next-line location.reload(); } }); From c36d34322616cd660a66179b9f57ec03431dfe92 Mon Sep 17 00:00:00 2001 From: RekkyRek Date: Tue, 2 Jan 2018 19:35:56 +0100 Subject: [PATCH 37/63] Changed some default themes --- app/src/js/consts/types.js | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index 1f46a0e3..a23c9411 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -115,10 +115,10 @@ export const THEMES = { backgroundColor: '#000000', }, }, - LIGHT_THEME: { - name: 'Light Theme', - id: 'light_theme', - backgroundColor: '#94556E', + SOLARIZED_LIGHT: { + name: 'Solarized Light', + id: 'solarized_light', + backgroundColor: '#342345', item_card: { backgroundColor: '#40415A', color: '#FFFFFF', @@ -141,29 +141,6 @@ export const THEMES = { SOLARIZED_DARK: { name: 'Solarized Dark', id: 'solarized_dark', - backgroundColor: '#342345', - item_card: { - backgroundColor: '#40415A', - color: '#FFFFFF', - }, - comment_card: { - backgroundColor: '#40415A', - color: '#FFFFFF', - }, - column: { - backgroundColor: '#54556E', - width: '450', - }, - user_badge: { - details_back: '#54556E', - }, - plus_notif: { - backgroundColor: '#D55161', - }, - }, - SOLARIZED_LIGHT: { - name: 'Solarized Light', - id: 'solarized_light', backgroundColor: '#230923', item_card: { backgroundColor: '#40415A', From 741c676dfc1f1eb76157682b5f52761ec2e4ce64 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 00:37:50 +0600 Subject: [PATCH 38/63] fixed settings top_nav --- app/src/js/components/settings/settings.js | 5 ++++- app/src/res/sass/modules/settings.sass | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/settings/settings.js b/app/src/js/components/settings/settings.js index 9240b35a..f531b1b2 100644 --- a/app/src/js/components/settings/settings.js +++ b/app/src/js/components/settings/settings.js @@ -36,7 +36,10 @@ class Items extends Component { const { activeNav } = this.state; return (
    -
    +
    { SETTINGS_NAV.map(nav => (
    Date: Tue, 2 Jan 2018 19:38:45 +0100 Subject: [PATCH 39/63] Changed the solarized themes --- app/src/js/consts/types.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/js/consts/types.js b/app/src/js/consts/types.js index a23c9411..d72470c2 100644 --- a/app/src/js/consts/types.js +++ b/app/src/js/consts/types.js @@ -120,11 +120,11 @@ export const THEMES = { id: 'solarized_light', backgroundColor: '#342345', item_card: { - backgroundColor: '#40415A', + backgroundColor: '#534661', color: '#FFFFFF', }, comment_card: { - backgroundColor: '#40415A', + backgroundColor: '#534661', color: '#FFFFFF', }, column: { @@ -143,11 +143,11 @@ export const THEMES = { id: 'solarized_dark', backgroundColor: '#230923', item_card: { - backgroundColor: '#40415A', + backgroundColor: '#543254', color: '#FFFFFF', }, comment_card: { - backgroundColor: '#40415A', + backgroundColor: '#543254', color: '#FFFFFF', }, column: { From e836238486ecd182ac70ae1077220061ac8da620 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 00:55:55 +0600 Subject: [PATCH 40/63] fixed sidenav --- app/src/js/components/navigation/items.js | 42 ++++++++++++++++------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/app/src/js/components/navigation/items.js b/app/src/js/components/navigation/items.js index d98803bd..a56a2114 100644 --- a/app/src/js/components/navigation/items.js +++ b/app/src/js/components/navigation/items.js @@ -1,17 +1,35 @@ -import React from 'react'; +import React, { Component } from 'react'; import PropTypes from 'prop-types'; -const Items = ({ - item, onClick, className, active, theme, -}) => ( -
    onClick()} - style={{ backgroundColor: theme.item_card.backgroundColor, color: theme.item_card.color }} - > - { item.name } -
    -); +class Items extends Component { + constructor() { + super(); + this.state = { + hovering: false, + }; + } + render() { + const { + item, onClick, className, active, theme, + } = this.props; + const { hovering } = this.state; + return ( +
    onClick()} + onMouseEnter={() => { this.setState({ hovering: true }); }} + onMouseLeave={() => { this.setState({ hovering: false }); }} + style={{ + backgroundColor: active || hovering ? + theme.backgroundColor : theme.item_card.backgroundColor, + color: theme.item_card.color, + }} + > + { item.name } +
    + ); + } +} Items.propTypes = { item: PropTypes.object.isRequired, From e32adb15fc8d9249e30d69a09f7f697fb00a2815 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 01:04:00 +0600 Subject: [PATCH 41/63] Fixed notif and add rant colors --- app/src/js/components/navigation/sidenav.js | 5 ++++- app/src/js/components/notifs/notifs.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/js/components/navigation/sidenav.js b/app/src/js/components/navigation/sidenav.js index 4e79779b..49ef1c5a 100644 --- a/app/src/js/components/navigation/sidenav.js +++ b/app/src/js/components/navigation/sidenav.js @@ -73,7 +73,10 @@ class SideNav extends Component { diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index 9aa81bf6..66eacc10 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -86,7 +86,10 @@ class Notifs extends Component { >
    @@ -195,6 +196,7 @@ class Theme extends Component { }); this.changeTheme(); }} + style={{ color: theme.item_card.color }} value={theme.item_card.backgroundColor} />
    @@ -222,6 +224,7 @@ class Theme extends Component { }); this.changeTheme(); }} + style={{ color: theme.item_card.color }} value={theme.item_card.color} />
    @@ -249,6 +252,7 @@ class Theme extends Component { }); this.changeTheme(); }} + style={{ color: theme.item_card.color }} value={theme.comment_card.backgroundColor} />
    @@ -276,6 +280,7 @@ class Theme extends Component { }); this.changeTheme(); }} + style={{ color: theme.item_card.color }} value={theme.comment_card.color} />
    @@ -303,6 +308,7 @@ class Theme extends Component { }); this.changeTheme(); }} + style={{ color: theme.item_card.color }} value={theme.plus_notif.backgroundColor} />
    @@ -312,6 +318,7 @@ class Theme extends Component { Sharable theme string this.handleSharableTheme(e.target.value)} + style={{ color: theme.item_card.color }} value={this.state.sharableTheme} />
    From befffcc42b1de164701fa07233de7d9746eab6d6 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 01:58:18 +0600 Subject: [PATCH 48/63] fixed post rant colors --- .../js/components/comments/comment_post.js | 1 + app/src/js/components/modal/modal.js | 12 +++- app/src/js/components/search/search.js | 5 +- app/src/js/components/utilities/post_rant.js | 56 ++++++++++++++++--- app/src/js/components/utilities/smart_area.js | 14 ++++- app/src/res/sass/modules/common.sass | 2 +- app/src/res/sass/modules/post_rant.sass | 8 +-- app/src/res/sass/modules/search.sass | 7 ++- 8 files changed, 85 insertions(+), 20 deletions(-) diff --git a/app/src/js/components/comments/comment_post.js b/app/src/js/components/comments/comment_post.js index 7f9fc2ed..4f0a8ae7 100644 --- a/app/src/js/components/comments/comment_post.js +++ b/app/src/js/components/comments/comment_post.js @@ -111,6 +111,7 @@ class CommentPost extends Component { onChange={text => this.setState({ content: text })} ref={(node) => { this.smartArea = node; }} editing={this.state.editID !== 0} + theme={theme} />
    ); diff --git a/app/src/js/components/modal/modal.js b/app/src/js/components/modal/modal.js index 65f58fd9..77ae3559 100644 --- a/app/src/js/components/modal/modal.js +++ b/app/src/js/components/modal/modal.js @@ -42,7 +42,7 @@ class Modal extends Component { } } render() { - const { item, close } = this.props; + const { item, close, theme } = this.props; return ( this.onOutsideClick(e)} ref={(node) => { this.modal = node; }} > -
    close()}> +
    close()} + style={{ + background: theme.plus_notif ? theme.plus_notif.backgroundColor : '#dd4242', + color: theme.id === 'dark_theme' ? '#ffffff' : theme.item_card.backgroundColor, + }} + >
    { this.getItem() } @@ -75,6 +82,7 @@ class Modal extends Component { Modal.propTypes = { item: PropTypes.object, close: PropTypes.func.isRequired, + theme: PropTypes.object.isRequired, }; export default Modal; diff --git a/app/src/js/components/search/search.js b/app/src/js/components/search/search.js index 938e9ffb..44951bb4 100644 --- a/app/src/js/components/search/search.js +++ b/app/src/js/components/search/search.js @@ -95,7 +95,10 @@ class Search extends Component { render() { const { theme } = this.props; return ( -
    +
    this.setState({ tags })} + theme={theme} />
    -
    +
    Rant Type Save draft
    this.setState({ draftName: e.currentTarget.value })} value={this.state.draftName} + placeholder="Title of Draft" /> - +
    Saved Drafts -
    -
    +
    +
    { postRant.drafts.length !== 0 ? postRant.drafts.map((draft, index) => ( @@ -211,8 +238,22 @@ class PostRant extends Component { > {draft.name}
    - - + +
    )) @@ -230,6 +271,7 @@ class PostRant extends Component { PostRant.propTypes = { auth: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, item: PropTypes.object.isRequired, postRant: PropTypes.object.isRequired, open: PropTypes.func.isRequired, diff --git a/app/src/js/components/utilities/smart_area.js b/app/src/js/components/utilities/smart_area.js index a326fff7..9441dcb3 100644 --- a/app/src/js/components/utilities/smart_area.js +++ b/app/src/js/components/utilities/smart_area.js @@ -244,6 +244,7 @@ class SmartArea extends Component { } render() { const { pickerActive, selectedMention } = this.state; + const { theme } = this.props; const invalidContent = this.props.value.length < 5; const isPost = typeof this.props.tags !== 'undefined'; let btnText = 'Post Rant'; @@ -309,11 +310,21 @@ class SmartArea extends Component { : null }
    -
    : null } +
    diff --git a/app/src/res/sass/modules/user_profile.sass b/app/src/res/sass/modules/user_profile.sass index bf3756f4..c8896c23 100644 --- a/app/src/res/sass/modules/user_profile.sass +++ b/app/src/res/sass/modules/user_profile.sass @@ -6,7 +6,6 @@ position: absolute top: 10px right: 10px - color: white font-size: 1.5rem transition: all 0.2s &:hover @@ -32,26 +31,36 @@ position: relative * z-index: 100 - &::before - content: " " - background: rgba(64, 65, 90, 0.9) - position: absolute - top: 0 - left: 0 - height: 100% - width: 100% + // &::before + // content: " " + // background: rgba(64, 65, 90, 0.9) + // position: absolute + // top: 0 + // left: 0 + // height: 100% + // width: 100% .image flex: 2 img width: 150px height: 150px border-radius: 100% + .background + position: absolute + width: 100% + height: 100% + top: 0 + bottom: 0 + left: 0 + right: 0 + opacity: 0.9 + z-index: 99 .details flex: 7 display: flex padding: 0 1rem margin-top: 1rem - color: white + color: inherit flex-direction: column .name_score font-family: 'Roboto', sans-serif From 86630eab74f3d7eb8feba4a5e033186bb81042c8 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 02:18:16 +0600 Subject: [PATCH 50/63] fixed some indentation --- app/src/js/components/settings/theme.js | 3 --- app/src/res/sass/modules/settings.sass | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/js/components/settings/theme.js b/app/src/js/components/settings/theme.js index dcda8a72..cbbf1aae 100644 --- a/app/src/js/components/settings/theme.js +++ b/app/src/js/components/settings/theme.js @@ -148,9 +148,6 @@ class Theme extends Component { { this.getThemes() }
    -
    -

    Global

    -

    Custom

    diff --git a/app/src/res/sass/modules/settings.sass b/app/src/res/sass/modules/settings.sass index acbad3e1..53bd7ff5 100644 --- a/app/src/res/sass/modules/settings.sass +++ b/app/src/res/sass/modules/settings.sass @@ -30,6 +30,7 @@ padding: 0.8rem display: flex margin-top: 2rem + margin-bottom: 1rem position: relative flex-direction: column .custom_theme From 5b6bd8f6ebf7e6d8a7a4c4734e92cd32b38d35a1 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 02:21:14 +0600 Subject: [PATCH 51/63] fixed notif button color --- app/src/js/components/notifs/notifs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/js/components/notifs/notifs.js b/app/src/js/components/notifs/notifs.js index 66eacc10..92a86c27 100644 --- a/app/src/js/components/notifs/notifs.js +++ b/app/src/js/components/notifs/notifs.js @@ -101,6 +101,10 @@ class Notifs extends Component {
    @@ -16,6 +20,7 @@ const Button = props => ( Button.propTypes = { setting: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, handleChange: PropTypes.func.isRequired, }; diff --git a/app/src/js/components/settings/general.js b/app/src/js/components/settings/general.js index 1df32cf4..e86e70f4 100644 --- a/app/src/js/components/settings/general.js +++ b/app/src/js/components/settings/general.js @@ -22,6 +22,7 @@ class General extends Component { handleChange={(value) => { this.handleChange(primaryKey, secondaryKey, value); }} + theme={this.props.theme} /> ); } @@ -33,6 +34,7 @@ class General extends Component { handleChange={() => { this.handleChange(primaryKey, secondaryKey, !setting.value); }} + theme={this.props.theme} /> ); } @@ -56,6 +58,7 @@ class General extends Component { handleChange={() => { this.handleChange(primaryKey, secondaryKey); }} + theme={this.props.theme} /> ); } diff --git a/app/src/js/components/settings/slider.js b/app/src/js/components/settings/slider.js index 21cacf12..0dcd16e5 100644 --- a/app/src/js/components/settings/slider.js +++ b/app/src/js/components/settings/slider.js @@ -22,6 +22,7 @@ class Slider extends Component { value={this.state.value} onChange={(e) => { this.setState({ value: e.target.value }); }} onMouseUp={() => this.props.handleChange(this.state.value)} + style={{ backgroundColor: this.props.theme.backgroundColor }} />
    @@ -31,6 +32,7 @@ class Slider extends Component { Slider.propTypes = { setting: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, handleChange: PropTypes.func.isRequired, }; diff --git a/app/src/js/components/settings/toggle.js b/app/src/js/components/settings/toggle.js index ac7cc0d9..de9924da 100644 --- a/app/src/js/components/settings/toggle.js +++ b/app/src/js/components/settings/toggle.js @@ -14,6 +14,7 @@ const Toggle = props => ( />
    @@ -22,6 +23,7 @@ const Toggle = props => ( Toggle.propTypes = { setting: PropTypes.object.isRequired, + theme: PropTypes.object.isRequired, handleChange: PropTypes.func.isRequired, }; diff --git a/app/src/res/sass/modules/common.sass b/app/src/res/sass/modules/common.sass index 686054b0..47d0b175 100644 --- a/app/src/res/sass/modules/common.sass +++ b/app/src/res/sass/modules/common.sass @@ -132,36 +132,37 @@ $post_comment_height: 13rem .range_input -webkit-appearance: none width: 100% + height: 21px margin: 7px 0 border: none position: relative + border-radius: 12px &:focus outline: none - &::-webkit-slider-runnable-track - width: 100% - padding: 0px 5px - height: 24px - cursor: pointer - box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(13, 13, 13, 0) - background: #c14857 - border-radius: 12px - border: 0px solid rgba(0, 0, 0, 0) + // &::-webkit-slider-runnable-track + // width: 100% + // padding: 0px 5px + // height: 24px + // cursor: pointer + // box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(13, 13, 13, 0) + // background: #c14857 + // border-radius: 12px + // border: 0px solid rgba(0, 0, 0, 0) &::-webkit-slider-thumb position: relative - top: 10px + top: 1px box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(13, 13, 13, 0) border: 0px solid rgba(0, 0, 0, 0) height: 18.2px width: 18.2px - border-radius: 18px + border-radius: 18.2px background: #ffffff cursor: pointer -webkit-appearance: none - margin-top: -7px - &:focus::-webkit-slider-runnable-track - background: #c14857 + // &:focus::-webkit-slider-runnable-track + // background: #c14857 body padding: 0 From 5c86eea5621175571c6b2d3c3744da48c7ccf055 Mon Sep 17 00:00:00 2001 From: Tahnik Mustasin Date: Wed, 3 Jan 2018 15:16:51 +0600 Subject: [PATCH 63/63] Updated codeclimate --- .codeclimate.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.codeclimate.yml b/.codeclimate.yml index 03d52330..fba60289 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -18,13 +18,13 @@ checks: threshold: 500 method-complexity: config: - threshold: 6 + threshold: 10 method-count: config: threshold: 20 method-lines: config: - threshold: 50 + threshold: 200 ratings: paths: - "**.js"