Skip to content

Commit

Permalink
src: save progress
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed May 15, 2020
1 parent 257fb06 commit c3be847
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 57 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"homepage": "./",
"dependencies": {
"@peerlinks/protocol": "^7.4.7",
"@peerlinks/protocol": "^7.4.8",
"@peerlinks/sqlite-storage": "^3.0.3",
"@peerlinks/swarm": "^3.0.7",
"binary-search": "^1.3.6",
Expand Down
3 changes: 0 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import ImportFeed from './pages/ImportFeed';
import InviteRequest from './pages/InviteRequest';
import DeleteChannel from './pages/DeleteChannel';

import RedirectOnce from './components/RedirectOnce';

function App({ network, checkNetwork, setFocus }) {
// Check if the window as reopened and network is ready
useEffect(() => {
Expand Down Expand Up @@ -47,7 +45,6 @@ function App({ network, checkNetwork, setFocus }) {
if (network.isReady) {
return <Router>
<ChannelLayout>
<RedirectOnce/>
<Route path='/new-channel' exact render={() => {
return <NewChannel isFeed={false}/>;
}}/>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Message.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Message.propTypes = {
short: PropTypes.string.isRequired,
}),
file: PropTypes.object,
text: PropTypes.string,
text: PropTypes.object,
}),
}),
isExpanded: PropTypes.bool.isRequired,
Expand Down
33 changes: 0 additions & 33 deletions src/components/RedirectOnce.js

This file was deleted.

3 changes: 2 additions & 1 deletion src/electron/network.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export default class Network {
log.info(`network: responding to "${type}" seq=${seq}`);
event.reply('response', { seq, payload: result });
}).catch((err) => {
log.info(`network: error to "${type}" seq=${seq}`);
log.info(`network: error to "${type}" seq=${seq} stack=${err.stack}`);
event.reply('response',
{ seq, error: err.message, stack: err.stack });
});
Expand Down Expand Up @@ -291,6 +291,7 @@ export default class Network {
};
}

console.log(this.peerLinks.id);
const { requestId, request, decrypt } =
identity.requestInvite(this.peerLinks.id);

Expand Down
3 changes: 1 addition & 2 deletions src/redux/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { getFeedURL } from '../utils';
import Network from './network';
import COMMANDS from './commands';

export const SET_REDIRECT = 'SET_REDIRECT';
export const SET_FOCUS = 'SET_FOCUS';

export const NETWORK_READY = 'NETWORK_READY';
Expand Down Expand Up @@ -45,7 +44,7 @@ export const CHANNEL_SET_CHAIN_MAP = 'CHANNEL_SET_CHAIN_MAP';
const network = new Network();

export function setRedirect(to) {
return { type: SET_REDIRECT, to };
console.error('TODO(indutny): implement me');
}

export function setFocus(focus) {
Expand Down
12 changes: 0 additions & 12 deletions src/redux/reducers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { appendMessage, computeIdentityFilter } from './utils';
import {
SET_FOCUS,

SET_REDIRECT,

NETWORK_READY, NETWORK_NOT_READY, NETWORK_LOADING, NETWORK_ERROR,

NEW_CHANNEL_RESET, NEW_CHANNEL_SET_IS_LOADING,
Expand Down Expand Up @@ -38,15 +36,6 @@ export const focus = (state = true, action) => {
}
};

export const redirect = (state = null, action) => {
switch (action.type) {
case SET_REDIRECT:
return action.to;
default:
return state;
}
};

export const network = (state, action) => {
if (!state) {
state = {
Expand Down Expand Up @@ -520,7 +509,6 @@ export const channels = (state = new Map(), action) => {

export default combineReducers({
focus,
redirect,
compose,

// Various asynchronous states
Expand Down
2 changes: 1 addition & 1 deletion src/redux/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export function ExternalLink(props) {
}

ExternalLink.propTypes = {
href: PropTypes.string.isRequired,
href: PropTypes.string,
children: PropTypes.oneOfType([
PropTypes.element,
PropTypes.arrayOf(PropTypes.element.isRequired),
Expand Down

0 comments on commit c3be847

Please sign in to comment.