restore that shit

This commit is contained in:
Sean Yesmunt 2019-07-17 16:49:06 -04:00
parent b735daf4e1
commit ce38506607
9 changed files with 19 additions and 20 deletions

View file

@ -51,7 +51,7 @@ function App(props: Props) {
}, [userId]); }, [userId]);
return ( return (
<div className={MAIN_WRAPPER_CLASS} ref={appRef} onContextMenu={e => openContextMenu(e)}> <div className="main-wrapper" ref={appRef} onContextMenu={e => openContextMenu(e)}>
<Header /> <Header />
<div className="main-wrapper__inner"> <div className="main-wrapper__inner">

View file

@ -1,18 +1,9 @@
import { connect } from 'react-redux'; import { connect } from 'react-redux';
<<<<<<< HEAD
import { selectScrollStartingPosition } from 'redux/selectors/app'; import { selectScrollStartingPosition } from 'redux/selectors/app';
import Router from './view'; import Router from './view';
const select = state => ({ const select = state => ({
currentScroll: selectScrollStartingPosition(state), currentScroll: selectScrollStartingPosition(state),
=======
import Router from './view';
const select = state => ({
scroll: state.app.scrollHistory[state.app.scrollHistory.length - 1],
scrollHistory: state.app.scrollHistory,
currentScroll: state.app.currentScroll || 0,
>>>>>>> restore that shit
}); });
export default connect(select)(Router); export default connect(select)(Router);

View file

@ -22,11 +22,7 @@ import NavigationHistory from 'page/navigationHistory';
import TagsPage from 'page/tags'; import TagsPage from 'page/tags';
import FollowingPage from 'page/following'; import FollowingPage from 'page/following';
<<<<<<< HEAD
// Tell the browser we are handling scroll restoration // Tell the browser we are handling scroll restoration
=======
// Let app handle scroll
>>>>>>> restore that shit
if ('scrollRestoration' in history) { if ('scrollRestoration' in history) {
history.scrollRestoration = 'manual'; history.scrollRestoration = 'manual';
} }

View file

@ -52,6 +52,8 @@ export default class SplashScreen extends React.PureComponent<Props, State> {
} }
componentDidMount() { componentDidMount() {
this.props.onReadyToLaunch();
const { checkDaemonVersion } = this.props; const { checkDaemonVersion } = this.props;
this.adjustErrorTimeout(); this.adjustErrorTimeout();
Lbry.connect() Lbry.connect()

View file

@ -67,11 +67,8 @@ const defaultState: AppState = {
scrollHistory: [0], scrollHistory: [0],
}; };
<<<<<<< HEAD
// @@router comes from react-router // @@router comes from react-router
// This action is dispatched any time a user navigates forward or back // This action is dispatched any time a user navigates forward or back
=======
>>>>>>> restore that shit
reducers['@@router/LOCATION_CHANGE'] = (state, action) => { reducers['@@router/LOCATION_CHANGE'] = (state, action) => {
const { currentScroll } = state; const { currentScroll } = state;
const scrollHistory = state.scrollHistory.slice(); const scrollHistory = state.scrollHistory.slice();

View file

@ -186,3 +186,12 @@
margin-right: auto; margin-right: auto;
padding-right: var(--spacing-medium); padding-right: var(--spacing-medium);
} }
.claim-preview-tags {
margin-left: 0;
// change this
.tag {
max-width: 10rem;
}
}

View file

@ -11,8 +11,6 @@
max-width: 1200px; max-width: 1200px;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
padding-left: var(--spacing-large);
padding-right: var(--spacing-large);
padding-bottom: var(--spacing-main-padding); padding-bottom: var(--spacing-main-padding);
} }

View file

@ -1,3 +1,10 @@
.navigation-wrapper {
// width: var(--side-nav-width);
// left: calc(100% - var(--side-nav-width));
// height: 100%;
// position: absolute;
}
.navigation { .navigation {
width: var(--side-nav-width); width: var(--side-nav-width);
font-size: 1.4rem; font-size: 1.4rem;

View file

@ -27,7 +27,6 @@ export function toQueryString(params) {
return parts.join('&'); return parts.join('&');
} }
// https://stackoverflow.com/questions/5999118/how-can-i-add-or-update-a-query-string-parameter
export function updateQueryParam(uri, key, value) { export function updateQueryParam(uri, key, value) {
const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i'); const re = new RegExp('([?&])' + key + '=.*?(&|$)', 'i');
const separator = uri.indexOf('?') !== -1 ? '&' : '?'; const separator = uri.indexOf('?') !== -1 ? '&' : '?';