Update documentation for DevTools and fix some ESLint warnings #911
|
@ -1,7 +1,5 @@
|
||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": ["flowtype"],
|
||||||
"flowtype"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"airbnb",
|
"airbnb",
|
||||||
"plugin:import/electron",
|
"plugin:import/electron",
|
||||||
|
@ -28,7 +26,8 @@
|
||||||
"app": true
|
"app": true
|
||||||
},
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/no-commonjs": 1,
|
"import/no-commonjs": "warn",
|
||||||
"import/no-amd": 1
|
"import/no-amd": "warn",
|
||||||
|
"func-names": ["warn", "as-needed"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
172
CONTRIBUTING.md
|
@ -1,57 +1,163 @@
|
||||||
# Contributing to LBRY
|
# Contribute to LBRY
|
||||||
|
|
||||||
You found this page! That means you are well on your way to contributing to the LBRY app. This application is primarily written in JavaScript and is built on [Electron](https://electronjs.org) while utilizing [React](https://reactjs.org) and [Redux](https://redux.js.org) for UI and application state.
|
You found this page! That means you are well on your way to contributing to the LBRY app. This
|
||||||
|
application is primarily written in JavaScript and is built on [Electron](https://electronjs.org)
|
||||||
|
while utilizing [React](https://reactjs.org) and [Redux](https://redux.js.org) for UI and
|
||||||
|
application state.
|
||||||
|
|
||||||
## TL;DR?
|
## TL;DR?
|
||||||
* [Here](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee) is a list of help wanted issues.
|
|
||||||
* Comment on an issue to let us know if you are going to work on it, don't take an issue that someone has reserved less than 3 days ago
|
* [Here](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee)
|
||||||
|
is a list of help wanted issues.
|
||||||
|
* Comment on an issue to let us know if you are going to work on it, don't take an issue that
|
||||||
|
someone reserved less than 3 days ago
|
||||||
* Submit a pull request and get paid in LBC
|
* Submit a pull request and get paid in LBC
|
||||||
* Don't hesitate to contact us with any questions or comments
|
* Don't hesitate to contact us with any questions or comments
|
||||||
|
|
||||||
## Longer Version
|
## Choose an Issue
|
||||||
|
|
||||||
LBRY is an open source project, and therefore is developed out in the open for everyone to see. What you see here are the latest source code changes and issues.
|
LBRY is an open source project and therefore is developed out in the open for everyone to see. What
|
||||||
|
you see here are the latest source code changes and issues.
|
||||||
|
|
||||||
Since LBRY is an based around a decentralized community, we believe that the app will be strongest if it receives contributions from individuals outside the core team -- such as yourself!
|
Since LBRY is based on a decentralized community, we believe that the app will be stronger if it
|
||||||
|
receives contributions from individuals outside the core team -- such as yourself!
|
||||||
|
|
||||||
In order to make contributing as easy and rewarding of possible, we have instituted the following system:
|
To make contributing as easy and rewarding of possible, we have instituted the following system:
|
||||||
|
|
||||||
* Anyone can view all issues in the system by clicking on the [Issues](https://github.com/lbryio/lbry-app/issues) button at the top of the page. Feel free to add an issue if you think we have missed something (and you might earn some LBC in the process because we do tip people for reporting bugs).
|
* Anyone can view all issues in the system by clicking on the
|
||||||
* Once on the [Issues](https://github.com/lbryio/lbry-app/issues) page, a potential contributor can filter issues by the [Help Wanted](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee) label to see a curated list of suggested issues with which community members can help.
|
[Issues](https://github.com/lbryio/lbry-app/issues) button at the top of the page. Feel free to
|
||||||
* Every [Help Wanted](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee) issue is ranked on a scale from zero to four.
|
add an issue if you think we have missed something (and you might earn some LBC in the process
|
||||||
|
because we do tip people for reporting bugs).
|
||||||
|
* Once on the [Issues](https://github.com/lbryio/lbry-app/issues) page, a potential contributor can
|
||||||
|
filter issues by the
|
||||||
|
[Help Wanted](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee)
|
||||||
|
label to see a curated list of suggested issues with which community members can help.
|
||||||
|
* Every
|
||||||
|
[Help Wanted](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+no%3Aassignee)
|
||||||
|
issue is ranked on a scale from zero to four.
|
||||||
|
|
||||||
Level | Description
|
| Level | Description |
|
||||||
--- | ---
|
| --------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||||
[**level 0**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+0%22+no%3Aassignee) | Typos and text edits -- a tech savvy non-programmer can fix these
|
| [**level 0**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+0%22+no%3Aassignee) | Typos and text edits -- a tech-savvy non-programmer can fix these |
|
||||||
[**level 1**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+1%22+no%3Aassignee) | Programming issues that require little knowledge of how the LBRY app works
|
| [**level 1**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+1%22+no%3Aassignee) | Programming issues that require little knowledge of how the LBRY app works |
|
||||||
[**level 2**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+2%22+no%3Aassignee) | Issues of average difficulty that require the developer to dig into how the app works a little bit
|
| [**level 2**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+2%22+no%3Aassignee) | Issues of average difficulty that require the developer to dig into how the app works a little bit |
|
||||||
[**level 3**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+3%22+no%3Aassignee) | Issues that are likely too tricky to be level 2 or require more thinking outside of the box
|
| [**level 3**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+3%22+no%3Aassignee) | Issues that are likely too tricky to be level 2 or require more thinking outside of the box |
|
||||||
[**level 4**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+4%22+no%3Aassignee) | Big features or really hard issues
|
| [**level 4**](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22+label%3A%22level+4%22+no%3Aassignee) | Big features or really hard issues |
|
||||||
|
|
||||||
The process of ranking issues is highly subjective. The purpose of sorting issues like this is to give contributors a general idea about the type of issues they are looking at. It could very well be the case that a level 1 issue is more difficult than a level 2, for instance. This system is meant to help you find relevant issues, not to prevent you from working on issues that you otherwise would. If these rankings don't work for you, feel free to ignore them.
|
The process of ranking issues is highly subjective. The purpose of sorting issues like this is to
|
||||||
|
give contributors a general idea about the type of issues they are looking at. It could very well be
|
||||||
|
the case that a level 1 issue is more difficult than a level 2, for instance. This system is meant
|
||||||
|
to help you find relevant issues, not to prevent you from working on issues that you otherwise
|
||||||
|
would. If these rankings don't work for you, feel free to ignore them.
|
||||||
|
|
||||||
* After deciding what to work on, a potential contributor can [fork](https://help.github.com/articles/fork-a-repo/) this repository, make his or her changes, and submit a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). A contributor wanting to reserve an issue in advance can leave a comment saying that he or she is working on it. Contributors should respect other people's efforts to complete issues in a timely manner and, therefore, not begin working on anything reserved (or updated) within the last 3 days. If someone has been officially assigned an issue via Github's assignment system, it is also not available. Contributors are encouraged to ask if they have any questions about issue availability.
|
## Develop
|
||||||
* Once the pull request is visible in the LBRY repo, a LBRY team member will review it and make sure it is up to our standards. At this point, the contributor may have to change his or her code based on our suggestions and comments.
|
|
||||||
* Then, upon a satisfactory review of the code, we will merge it and send the contributor a tip (in LBC) for the contribution.
|
|
||||||
|
|
||||||
We are dedicated to being fair and friendly in this process. In __general__, level 4 issues will be paid more than level 3 issues which will be paid more than level 2, and so on. However, this is not due to their labeling, but rather how difficult they end up being. Maybe an issue labeled "level 1" turns out to be very difficult. In this case we would be **more than happy** to tip accordingly. If you do good work, we want you to be rewarded for it.
|
The project comes with diverse tools for simplifying the development process and for providing
|
||||||
|
better code quality. It's recommended to make use of them thoroughly during ongoing development.
|
||||||
|
|
||||||
Also, we are here to enable you. We want you to succeed, so do not hesitate to ask questions. If you need some information or assistance in completing an issue, please let us know! That is what we are here for-- pushing development forward.
|
We follow the well-known [Airbnb JavaScript Style Guide](http://airbnb.io/javascript/) for defining
|
||||||
|
our styling rules and code best practices.
|
||||||
|
|
||||||
Lastly, don't feel limited by this list. Should LBRY have built-in Tor support? Add it! It's not in the issue tracker but maybe it's a good idea. Do you think the search layout is unintuitive? Change it! We welcome all feedback and suggestions. That said, it may be the case that we do not wish to incorporate your change if you don't check with us first (also, please check with us especially if you are planning on adding Tor support :P). If you want to add a feature that is not listed in the issue tracker, go ahead and [create an issue](https://github.com/lbryio/lbry-app/issues/new), and say in the description that you would like to try to implement it yourself. This way we can tell you in advance if we will accept your changes and we can point you in the right direction.
|
### Run
|
||||||
|
|
||||||
|
LBRY app can be run for development by using the command:
|
||||||
|
|
||||||
|
`yarn dev`
|
||||||
|
|
||||||
|
This will launch the app and provide HMR (Hot Module Replacement). Any change made to the sources
|
||||||
|
will automatically reload the app without losing its state.
|
||||||
|
|
||||||
|
### Lint
|
||||||
|
|
||||||
|
Code linting is ensured by [ESLint](https://eslint.org/).
|
||||||
|
|
||||||
|
You can lint all the project's sources at any time by running:
|
||||||
|
|
||||||
|
`yarn lint`
|
||||||
|
|
||||||
|
If you desire to lint a specific file or directory you can use `yarn eslint 'glob/pattern'`.
|
||||||
|
|
||||||
|
In addition to those commands, staged files are automatically linted before commit. Please take the
|
||||||
|
time to fix all staged files' linting problems before committing or suppress them if necessary.
|
||||||
|
|
||||||
|
If you want the linting problems to show up on your IDE or text editor, check out
|
||||||
|
[ESLint integrations](https://eslint.org/docs/user-guide/integrations).
|
||||||
|
|
||||||
|
### Code Formatting
|
||||||
|
|
||||||
|
Project's sources are formatted using [Prettier](https://prettier.io/).
|
||||||
|
|
||||||
|
Staged files are automatically formatted before commit.
|
||||||
|
|
||||||
|
You can also use the following command:
|
||||||
|
|
||||||
|
`yarn format`
|
||||||
|
|
||||||
|
for applying formatting rules to all project's code sources. For formatting a specific file or
|
||||||
|
directory use `yarn prettier 'glob/pattern'`.
|
||||||
|
|
||||||
|
Editor integrations are available [here](https://prettier.io/docs/en/editors.html).
|
||||||
|
|
||||||
|
### Debug
|
||||||
|
|
||||||
|
There are a few tools integrated to the project that will ease the process of debugging:
|
||||||
|
|
||||||
|
* [Chrome DevTools](https://developer.chrome.com/devtools)
|
||||||
|
* Also available for the main process as a [remote target](chrome://inspect/#devices).
|
||||||
|
* [Electron Devtron](https://electronjs.org/devtron)
|
||||||
|
* [React DevTools](https://github.com/facebook/react-devtools)
|
||||||
|
* [Redux DevTools](https://github.com/gaearon/redux-devtools)
|
||||||
|
|
||||||
|
## Submit a Pull Request
|
||||||
|
|
||||||
|
* After deciding what to work on, a potential contributor can
|
||||||
|
[fork](https://help.github.com/articles/fork-a-repo/) this repository, make his or her changes,
|
||||||
|
and submit a
|
||||||
|
[pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). A
|
||||||
|
contributor wanting to reserve an issue in advance can leave a comment saying that he or she is
|
||||||
|
working on it. Contributors should respect other people's efforts to complete issues in a timely
|
||||||
|
manner and, therefore, not begin working on anything reserved (or updated) within the last 3 days.
|
||||||
|
If someone has been officially assigned an issue via Github's assignment system, it is also not
|
||||||
|
available. Contributors are encouraged to ask if they have any questions about issue availability.
|
||||||
|
* Once the pull request is visible in the LBRY repo, a LBRY team member will review it and make sure
|
||||||
|
it is up to our standards. At this point, the contributor may have to change his or her code based
|
||||||
|
on our suggestions and comments.
|
||||||
|
* Then, upon a satisfactory review of the code, we will merge it and send the contributor a tip (in
|
||||||
|
LBC) for the contribution.
|
||||||
|
|
||||||
|
We are dedicated to being fair and friendly in this process. In **general**, level 4 issues will be
|
||||||
|
paid more than level 3 issues which will be paid more than level 2, and so on. However, this is not
|
||||||
|
due to their labeling, but rather how difficult they end up being. Maybe an issue labeled "level 1"
|
||||||
|
turns out to be very difficult. In this case, we would be **more than happy** to tip accordingly. If
|
||||||
|
you do good work, we want you to be rewarded for it.
|
||||||
|
|
||||||
|
Also, we are here to enable you. We want you to succeed, so do not hesitate to ask questions. If you
|
||||||
|
need some information or assistance in completing an issue, please let us know! That is what we are
|
||||||
|
here for-- pushing development forward.
|
||||||
|
|
||||||
|
Lastly, don't feel limited by this list. Should LBRY have built-in Tor support? Add it! It's not in
|
||||||
|
the issue tracker, but maybe it's a good idea. Do you think the search layout is unintuitive? Change
|
||||||
|
it! We welcome all feedback and suggestions. That said, it may be the case that we do not wish to
|
||||||
|
incorporate your change if you don't check with us first (also, please check with us especially if
|
||||||
|
you are planning on adding Tor support :P). If you want to add a feature that is not listed in the
|
||||||
|
issue tracker, go ahead and [create an issue](https://github.com/lbryio/lbry-app/issues/new), and
|
||||||
|
say in the description that you would like to try to implement it yourself. This way we can tell you
|
||||||
|
in advance if we will accept your changes and we can point you in the right direction.
|
||||||
|
|
||||||
# Tom's "Voice of the User" Wishlist
|
# Tom's "Voice of the User" Wishlist
|
||||||
|
|
||||||
[Anything marked with **both** "Help Wanted" and "Tom's 'Voice of the User' Wishlist"](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22Tom%27s+%5C%22Voice+of+the+User%5C%22+Wishlist%22+label%3A%22help+wanted%22+no%3Aassignee) will earn you an extra 50 LBC on top of what we would otherwise tip you.
|
[Anything marked with **both** "Help Wanted" and "Tom's 'Voice of the User' Wishlist"](https://github.com/lbryio/lbry-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22Tom%27s+%5C%22Voice+of+the+User%5C%22+Wishlist%22+label%3A%22help+wanted%22+no%3Aassignee)
|
||||||
|
will earn you an extra 50 LBC on top of what we would otherwise tip you.
|
||||||
|
|
||||||
# Get In Touch
|
# Get in Touch
|
||||||
Name | Role | Discord | Email
|
|
||||||
--- | --- | --- | ---
|
|
||||||
[Liam](https://github.com/liamcardenas) | The application engineer in charge of community development. He is the person to contact with any development/contribution related questions. | liamsdouble | liam@lbry.io
|
|
||||||
[Tom](https://github.com/tzarebczan) | Community manager. He knows more than anyone about the app and all of its flaws. Reach out to him with any questions about how the app works, if a bug has been reported, or if a feature should be requested. | jiggytom | tom@lbry.io
|
|
||||||
[Sean](https://github.com/seanyesmunt) | An application engineer who focuses largely on UI/UX. If you have a design or implementation question, feel free to reach out to him. | sean | sean@lbry.io
|
|
||||||
|
|
||||||
Join our discord [here](https://chat.lbry.io/).
|
| Name | Role | Discord | Email |
|
||||||
|
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------ |
|
||||||
|
| [Liam](https://github.com/liamcardenas) | The application engineer in charge of community development. He is the person to contact with any development/contribution related questions. | liamsdouble | liam@lbry.io |
|
||||||
|
| [Tom](https://github.com/tzarebczan) | Community manager. He knows more than anyone about the app and all of its flaws. Reach out to him with any questions about how the app works, if a bug has been reported, or if a feature should be requested. | jiggytom | tom@lbry.io |
|
||||||
|
| [Sean](https://github.com/seanyesmunt) | An application engineer who focuses largely on UI/UX. If you have a design or implementation question, feel free to reach out to him. | sean | sean@lbry.io |
|
||||||
|
|
||||||
|
Join our Discord [here](https://chat.lbry.io/).
|
||||||
|
|
||||||
# More Information
|
# More Information
|
||||||
|
|
||||||
|
|
104
README.md
|
@ -1,85 +1,119 @@
|
||||||
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
# LBRY App
|
# LBRY App
|
||||||
|
|
||||||
This is a graphical browser for the decentralized content marketplace provided by the [LBRY](https://lbry.io) protocol. It is essentially the [lbry daemon](https://github.com/lbryio/lbry) bundled with a UI using [Electron](http://electron.atom.io/).
|
The LBRY app is a graphical browser for the decentralized content marketplace provided by the
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
[LBRY](https://lbry.io) protocol. It is essentially the
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
[lbry daemon](https://github.com/lbryio/lbry) bundled with a UI using
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
[Electron](http://electron.atom.io/).
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
![App Screenshot](https://lbry.io/img/lbry-ui.png)
|
![App screenshot](https://lbry.io/img/lbry-ui.png)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
## Installing
|
## Installing
|
||||||
|
|
||||||
We provide installers for Windows, macOS, and Debian-based Linux.
|
We provide installers for Windows, macOS, and Debian-based Linux.
|
||||||
|
|
||||||
| | Windows | macOS | Linux |
|
| | Windows | macOS | Linux |
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
| --- | --- | --- | --- |
|
| --------------------- | -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
| Latest Stable Release | [Download](https://lbry.io/get/lbry.exe) | [Download](https://lbry.io/get/lbry.dmg) | [Download](https://lbry.io/get/lbry.deb) |
|
| Latest Stable Release | [Download](https://lbry.io/get/lbry.exe) | [Download](https://lbry.io/get/lbry.dmg) | [Download](https://lbry.io/get/lbry.deb) |
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
| Latest Prerelease | [Download](https://lbry.io/get/lbry.pre.exe) | [Download](https://lbry.io/get/lbry.pre.dmg) | [Download](https://lbry.io/get/lbry.pre.deb) |
|
| Latest Prerelease | [Download](https://lbry.io/get/lbry.pre.exe) | [Download](https://lbry.io/get/lbry.pre.dmg) | [Download](https://lbry.io/get/lbry.pre.deb) |
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
|
Our [releases page](https://github.com/lbryio/lbry-app/releases/latest) also contains the latest
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
Our [releases page](https://github.com/lbryio/lbry-app/releases/latest) also contains the latest release, pre-releases, and past builds.
|
release, pre-releases, and past builds.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
To install from source or make changes to the application, continue reading below.
|
To install from source or make changes to the application, continue reading below.
|
||||||
|
|
||||||
## Development on Linux and macOS
|
## Getting Started
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
These instructions will get you a copy of the project up and running on your local machine for
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
development and testing purposes.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
### Prerequisites
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
* [Git](https://git-scm.com/downloads)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
* [Node.js](https://nodejs.org/en/download/)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
* [Yarn](https://yarnpkg.com/en/docs/install)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
* `yarn --add-python-to-path install --global --production windows-build-tools` (Windows only)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### One-time Setup
|
### One-time Setup
|
||||||
|
|
||||||
1. Clone this repo
|
1. Clone this repo
|
||||||
2. `DEPS=true ./build.sh`
|
2. `DEPS=true ./build.sh`
|
||||||
|
|
||||||
This will download and install the LBRY app and its dependencies, including [the LBRY daemon](https://github.com/lbryio/lbry) and command line utilities like `node` and `yarn`. The LBRY app requires Node >= 6; if you have an earlier version of Node installed and want to keep it, you can use [nvm](https://github.com/creationix/nvm) to switch back and forth.
|
This will download and install the LBRY app and its dependencies, including
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
[the LBRY daemon](https://github.com/lbryio/lbry) and command line utilities like `node` and `yarn`.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
The LBRY app requires Node >= 6; if you have an earlier version of Node installed and want to keep
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
it, you can use [nvm](https://github.com/creationix/nvm) to switch back and forth.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
#### Arch Linux and Other Non-Debian Distributions
|
#### Arch Linux and Other Non-Debian Distributions
|
||||||
|
|
||||||
Running the build script with `DEPS=true` triggers a bash script with `apt-get` specific commands. If you are using a distribution without `apt-get`, try running the script as:
|
Running the build script with `DEPS=true` triggers a bash script with `apt-get` specific commands.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
If you are using a distribution without `apt-get`, try running the script as:
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
`./build.sh`
|
`./build.sh`
|
||||||
|
|
||||||
You may also have to install the package [libsecret](https://wiki.gnome.org/Projects/Libsecret) if it is not already installed.
|
You may also have to install the package [libsecret](https://wiki.gnome.org/Projects/Libsecret) if
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
it is not already installed.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### Ongoing Development
|
### Running
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
Run `yarn dev`
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
This will set up a server that will automatically compile any changes made inside `src\` folder and automatically reload the app without losing the state.
|
The app can be run from the sources using the following command:
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### Build
|
`yarn dev`
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Run `yarn build`
|
### On Windows
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
We use [electron-builder](https://github.com/electron-userland/electron-builder)
|
#### Windows Dependency
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
to create distributable packages.
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
## Development on Windows
|
1. Download and install `git` from <a href="https://git-for-windows.github.io/">github.io<a>
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
(configure to use command prompt integration)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
2. Download and install `npm` and `node` from
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
<a href="https://nodejs.org/en/download/current/">nodejs.org<a>
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
3. Download and install `python 2.7` from
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
<a href="https://www.python.org/downloads/windows/">python.org</a>
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
4. Download and Install `Microsoft Visual C++ Compiler for Python 2.7` from
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
<a href="https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266">Microsoft<a>
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
5. Download and install `.NET Framework 2.0 Software Development Kit (SDK) (x64)` from
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
<a href="https://www.microsoft.com/en-gb/download/details.aspx?id=15354">Microsoft<a> (may need
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
to extract setup.exe and install manually by running install.exe as Administrator)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### Windows Dependency
|
#### One-time Setup
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
1. Download and install `git` from <a href="https://git-for-windows.github.io/">github.io<a> (configure to use command prompt integration)
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
2. Download and install `npm` and `node` from <a href="https://nodejs.org/en/download/current/">nodejs.org<a>
|
1. Open a command prompt as administrator and run the following:
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
3. Download and install `python 2.7` from <a href="https://www.python.org/downloads/windows/">python.org</a>
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
4. Download and Install `Microsoft Visual C++ Compiler for Python 2.7` from <a href="https://www.microsoft.com/en-us/download/confirmation.aspx?id=44266">Microsoft<a>
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
5. Download and install `.NET Framework 2.0 Software Development Kit (SDK) (x64)` from <a href="https://www.microsoft.com/en-gb/download/details.aspx?id=15354">Microsoft<a> (may need to extract setup.exe and install manually by running install.exe as Administrator)
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### One-time Setup
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
1. Open command prompt as adminstrator and run the following:
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
```
|
```
|
||||||
npm install --global --production windows-build-tools
|
npm install --global --production windows-build-tools
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Open command prompt in the root of the project and run the following:
|
2. Open a command prompt in the root of the project and run the following:
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
```
|
```
|
||||||
python -m pip install -r build\requirements.txt
|
python -m pip install -r build\requirements.txt
|
||||||
npm install -g yarn
|
npm install -g yarn
|
||||||
yarn install
|
yarn install
|
||||||
yarn build
|
yarn build
|
||||||
```
|
```
|
||||||
3. Download the lbry daemon and cli [binaries](https://github.com/lbryio/lbry/releases) and place them in `static\daemon`
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### Ongoing Development
|
3. Download the lbry daemon and CLI [binaries](https://github.com/lbryio/lbry/releases) and place
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
Run `yarn dev`
|
them in `static\daemon`.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
### Build
|
### Build
|
||||||
Run `yarn build`
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
This will set up a server that will automatically compile any changes made inside `src\` folder and automatically reload the app without losing the state.
|
Run `yarn build`.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
We use [electron-builder](https://github.com/electron-userland/electron-builder) to create
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
distributable packages.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
## Contributing
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
Please read [our contributing manual](CONTRIBUTING.md) for details on how to develop for the
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
project and the process of submitting pull requests.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
## Internationalization
|
## Internationalization
|
||||||
|
|
||||||
If you want to help translating the lbry-app, you can copy the `en.json` file in `/dist/locales/` and modify the values while leaving the keys as their original English strings. An example for this would be: `"Skip": "Überspringen",` Translations should automatically show up in options.
|
If you want to help to translate the lbry-app, you can copy the `en.json` file in `/dist/locales/`
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
and modify the values while leaving the keys as their original English strings. An example for this
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
would be: `"Skip": "Überspringen",` Translations should automatically show up in options.
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
## License
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
[MIT © LBRY](LICENSE)
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|||||||
|
|
||||||
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc
I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev. I've added a "Running" section. Eventually, we will be able to run the app without HMR by using yarn start. For the meantime, it's only yarn dev.
|
|
@ -23,7 +23,7 @@
|
||||||
"postinstall": "electron-builder install-app-deps",
|
"postinstall": "electron-builder install-app-deps",
|
||||||
"precommit": "lint-staged",
|
"precommit": "lint-staged",
|
||||||
"lint": "eslint 'src/**/*.{js,jsx}' --fix",
|
"lint": "eslint 'src/**/*.{js,jsx}' --fix",
|
||||||
"pretty-print": "prettier 'src/**/*.{js,jsx,scss,json}' --write"
|
"format": "prettier 'src/**/*.{js,jsx,scss,json}' --write"
|
||||||
},
|
},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"lbry"
|
"lbry"
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
|
import amplitude from 'amplitude-js';
|
||||||
|
import App from 'component/app';
|
||||||
|
import SnackBar from 'component/snackBar';
|
||||||
|
import SplashScreen from 'component/splash';
|
||||||
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
import { ipcRenderer, remote, shell } from 'electron';
|
||||||
|
import lbry from 'lbry';
|
||||||
/* eslint-disable react/jsx-filename-extension */
|
/* eslint-disable react/jsx-filename-extension */
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ReactDOM from 'react-dom';
|
import ReactDOM from 'react-dom';
|
||||||
import App from 'component/app';
|
|
||||||
import SnackBar from 'component/snackBar';
|
|
||||||
import { Provider } from 'react-redux';
|
import { Provider } from 'react-redux';
|
||||||
import store from 'store';
|
import { doConditionalAuthNavigate, doDaemonReady, doShowSnackBar } from 'redux/actions/app';
|
||||||
import SplashScreen from 'component/splash';
|
|
||||||
import { doDaemonReady, doShowSnackBar, doConditionalAuthNavigate } from 'redux/actions/app';
|
|
||||||
import { doUserEmailVerify } from 'redux/actions/user';
|
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import { doDownloadLanguages } from 'redux/actions/settings';
|
import { doDownloadLanguages } from 'redux/actions/settings';
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import { doUserEmailVerify } from 'redux/actions/user';
|
||||||
import amplitude from 'amplitude-js';
|
|
||||||
import lbry from 'lbry';
|
|
||||||
import 'scss/all.scss';
|
import 'scss/all.scss';
|
||||||
import { ipcRenderer, remote, shell } from 'electron';
|
import store from 'store';
|
||||||
import app from './app';
|
import app from './app';
|
||||||
|
|
||||||
const { contextMenu } = remote.require('./main.js');
|
const { contextMenu } = remote.require('./main.js');
|
||||||
|
@ -64,10 +64,10 @@ ipcRenderer.on('window-is-focused', () => {
|
||||||
dock.setBadge('');
|
dock.setBadge('');
|
||||||
});
|
});
|
||||||
|
|
||||||
(function(history, ...args) {
|
((history, ...args) => {
|
||||||
const { replaceState } = history;
|
const { replaceState } = history;
|
||||||
const newHistory = history;
|
const newHistory = history;
|
||||||
newHistory.replaceState = function(_, __, path) {
|
newHistory.replaceState = (_, __, path) => {
|
||||||
amplitude.getInstance().logEvent('NAVIGATION', { destination: path ? path.slice(1) : path });
|
amplitude.getInstance().logEvent('NAVIGATION', { destination: path ? path.slice(1) : path });
|
||||||
return replaceState.apply(history, args);
|
return replaceState.apply(history, args);
|
||||||
};
|
};
|
||||||
|
@ -101,7 +101,7 @@ document.addEventListener('click', event => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const init = function initializeReactApp() {
|
const init = () => {
|
||||||
app.store.dispatch(doDownloadLanguages());
|
app.store.dispatch(doDownloadLanguages());
|
||||||
|
|
||||||
function onDaemonReady() {
|
function onDaemonReady() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
const jsonrpc = {};
|
const jsonrpc = {};
|
||||||
|
|
||||||
jsonrpc.call = function callJsonRpc(
|
jsonrpc.call = (
|
||||||
connectionString,
|
connectionString,
|
||||||
method,
|
method,
|
||||||
params,
|
params,
|
||||||
callback,
|
callback,
|
||||||
errorCallback,
|
errorCallback,
|
||||||
connectFailedCallback
|
connectFailedCallback
|
||||||
) {
|
) => {
|
||||||
function checkAndParse(response) {
|
function checkAndParse(response) {
|
||||||
if (response.status >= 200 && response.status < 300) {
|
if (response.status >= 200 && response.status < 300) {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import jsonrpc from 'jsonrpc';
|
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
|
import jsonrpc from 'jsonrpc';
|
||||||
|
|
||||||
const CHECK_DAEMON_STARTED_TRY_NUMBER = 200;
|
const CHECK_DAEMON_STARTED_TRY_NUMBER = 200;
|
||||||
|
|
||||||
|
@ -19,11 +19,10 @@ const lbryProxy = new Proxy(Lbry, {
|
||||||
return target[name];
|
return target[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
return function(params = {}) {
|
return (params = {}) =>
|
||||||
return new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
apiCall(name, params, resolve, reject);
|
apiCall(name, params, resolve, reject);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -76,7 +75,7 @@ function removePendingPublishIfNeeded({ name, channelName, outpoint }) {
|
||||||
* Gets the current list of pending publish attempts. Filters out any that have timed out and
|
* Gets the current list of pending publish attempts. Filters out any that have timed out and
|
||||||
* removes them from the list.
|
* removes them from the list.
|
||||||
*/
|
*/
|
||||||
Lbry.getPendingPublishes = function() {
|
Lbry.getPendingPublishes = () => {
|
||||||
const pendingPublishes = getLocal('pendingPublishes') || [];
|
const pendingPublishes = getLocal('pendingPublishes') || [];
|
||||||
const newPendingPublishes = pendingPublishes.filter(
|
const newPendingPublishes = pendingPublishes.filter(
|
||||||
pub => Date.now() - pub.time <= Lbry.pendingPublishTimeout
|
pub => Date.now() - pub.time <= Lbry.pendingPublishTimeout
|
||||||
|
@ -110,7 +109,7 @@ function pendingPublishToDummyFileInfo({ name, outpoint, claimId }) {
|
||||||
|
|
||||||
// core
|
// core
|
||||||
Lbry.connectPromise = null;
|
Lbry.connectPromise = null;
|
||||||
Lbry.connect = function() {
|
Lbry.connect = () => {
|
||||||
if (Lbry.connectPromise === null) {
|
if (Lbry.connectPromise === null) {
|
||||||
Lbry.connectPromise = new Promise((resolve, reject) => {
|
Lbry.connectPromise = new Promise((resolve, reject) => {
|
||||||
let tryNum = 0;
|
let tryNum = 0;
|
||||||
|
@ -144,7 +143,7 @@ Lbry.connect = function() {
|
||||||
* This currently includes a work-around to cache the file in local storage so that the pending
|
* This currently includes a work-around to cache the file in local storage so that the pending
|
||||||
* publish can appear in the UI immediately.
|
* publish can appear in the UI immediately.
|
||||||
*/
|
*/
|
||||||
Lbry.publishDeprecated = function(params, fileListedCallback, publishedCallback, errorCallback) {
|
Lbry.publishDeprecated = (params, fileListedCallback, publishedCallback, errorCallback) => {
|
||||||
// Give a short grace period in case publish() returns right away or (more likely) gives an error
|
// Give a short grace period in case publish() returns right away or (more likely) gives an error
|
||||||
const returnPendingTimeout = setTimeout(
|
const returnPendingTimeout = setTimeout(
|
||||||
() => {
|
() => {
|
||||||
|
@ -173,11 +172,9 @@ Lbry.publishDeprecated = function(params, fileListedCallback, publishedCallback,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbry.imagePath = function(file) {
|
Lbry.imagePath = file => `${staticResourcesPath}/img/${file}`;
|
||||||
return `${staticResourcesPath}/img/${file}`;
|
|
||||||
};
|
|
||||||
|
|
||||||
Lbry.getMediaType = function(contentType, fileName) {
|
Lbry.getMediaType = (contentType, fileName) => {
|
||||||
if (contentType) {
|
if (contentType) {
|
||||||
return /^[^/]+/.exec(contentType)[0];
|
return /^[^/]+/.exec(contentType)[0];
|
||||||
} else if (fileName) {
|
} else if (fileName) {
|
||||||
|
@ -199,14 +196,13 @@ Lbry.getMediaType = function(contentType, fileName) {
|
||||||
return 'unknown';
|
return 'unknown';
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbry.getAppVersionInfo = function() {
|
Lbry.getAppVersionInfo = () =>
|
||||||
return new Promise(resolve => {
|
new Promise(resolve => {
|
||||||
ipcRenderer.once('version-info-received', (event, versionInfo) => {
|
ipcRenderer.once('version-info-received', (event, versionInfo) => {
|
||||||
resolve(versionInfo);
|
resolve(versionInfo);
|
||||||
});
|
});
|
||||||
ipcRenderer.send('version-info-requested');
|
ipcRenderer.send('version-info-requested');
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrappers for API methods to simulate missing or future behavior. Unlike the old-style stubs,
|
* Wrappers for API methods to simulate missing or future behavior. Unlike the old-style stubs,
|
||||||
|
@ -217,8 +213,8 @@ Lbry.getAppVersionInfo = function() {
|
||||||
* Returns results from the file_list API method, plus dummy entries for pending publishes.
|
* Returns results from the file_list API method, plus dummy entries for pending publishes.
|
||||||
* (If a real publish with the same name is found, the pending publish will be ignored and removed.)
|
* (If a real publish with the same name is found, the pending publish will be ignored and removed.)
|
||||||
*/
|
*/
|
||||||
Lbry.file_list = function(params = {}) {
|
Lbry.file_list = (params = {}) =>
|
||||||
return new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const { name, channel_name: channelName, outpoint } = params;
|
const { name, channel_name: channelName, outpoint } = params;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -252,10 +248,9 @@ Lbry.file_list = function(params = {}) {
|
||||||
reject
|
reject
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
Lbry.claim_list_mine = function(params = {}) {
|
Lbry.claim_list_mine = (params = {}) =>
|
||||||
return new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
apiCall(
|
apiCall(
|
||||||
'claim_list_mine',
|
'claim_list_mine',
|
||||||
params,
|
params,
|
||||||
|
@ -274,10 +269,9 @@ Lbry.claim_list_mine = function(params = {}) {
|
||||||
reject
|
reject
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
Lbry.resolve = function(params = {}) {
|
Lbry.resolve = (params = {}) =>
|
||||||
return new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
apiCall(
|
apiCall(
|
||||||
'resolve',
|
'resolve',
|
||||||
params,
|
params,
|
||||||
|
@ -292,6 +286,5 @@ Lbry.resolve = function(params = {}) {
|
||||||
reject
|
reject
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
export default lbryProxy;
|
export default lbryProxy;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { ipcRenderer } from 'electron';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import querystring from 'querystring';
|
import querystring from 'querystring';
|
||||||
import { ipcRenderer } from 'electron';
|
|
||||||
|
|
||||||
const Lbryio = {
|
const Lbryio = {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
|
@ -15,7 +15,7 @@ const CONNECTION_STRING = process.env.LBRY_APP_API_URL
|
||||||
|
|
||||||
const EXCHANGE_RATE_TIMEOUT = 20 * 60 * 1000;
|
const EXCHANGE_RATE_TIMEOUT = 20 * 60 * 1000;
|
||||||
|
|
||||||
Lbryio.getExchangeRates = function() {
|
Lbryio.getExchangeRates = () => {
|
||||||
if (
|
if (
|
||||||
!Lbryio.exchangeLastFetched ||
|
!Lbryio.exchangeLastFetched ||
|
||||||
Date.now() - Lbryio.exchangeLastFetched > EXCHANGE_RATE_TIMEOUT
|
Date.now() - Lbryio.exchangeLastFetched > EXCHANGE_RATE_TIMEOUT
|
||||||
|
@ -33,7 +33,7 @@ Lbryio.getExchangeRates = function() {
|
||||||
return Lbryio.exchangePromise;
|
return Lbryio.exchangePromise;
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbryio.call = function(resource, action, params = {}, method = 'get') {
|
Lbryio.call = (resource, action, params = {}, method = 'get') => {
|
||||||
if (!Lbryio.enabled) {
|
if (!Lbryio.enabled) {
|
||||||
console.log(__('Internal API disabled'));
|
console.log(__('Internal API disabled'));
|
||||||
return Promise.reject(new Error(__('LBRY internal API is disabled')));
|
return Promise.reject(new Error(__('LBRY internal API is disabled')));
|
||||||
|
@ -54,7 +54,7 @@ Lbryio.call = function(resource, action, params = {}, method = 'get') {
|
||||||
} else {
|
} else {
|
||||||
error = new Error('Unknown API error signature');
|
error = new Error('Unknown API error signature');
|
||||||
}
|
}
|
||||||
error.response = response; // this is primarily a hack used in actions/user.js
|
error.response = response; // This is primarily a hack used in actions/user.js
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ Lbryio.setAuthToken = token => {
|
||||||
|
|
||||||
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
Lbryio.getCurrentUser = () => Lbryio.call('user', 'me');
|
||||||
|
|
||||||
Lbryio.authenticate = function() {
|
Lbryio.authenticate = () => {
|
||||||
if (!Lbryio.enabled) {
|
if (!Lbryio.enabled) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
resolve({
|
resolve({
|
||||||
|
|
|
@ -28,7 +28,7 @@ Lbryuri.REGEXP_ADDRESS = /^b(?=[^0OIl]{32,33})[0-9A-Za-z]{32,33}$/;
|
||||||
* - contentName (string): For anon claims, the name; for channel claims, the path
|
* - contentName (string): For anon claims, the name; for channel claims, the path
|
||||||
* - channelName (string, if present): Channel name without @
|
* - channelName (string, if present): Channel name without @
|
||||||
*/
|
*/
|
||||||
Lbryuri.parse = function(uri, requireProto = false) {
|
Lbryuri.parse = (uri, requireProto = false) => {
|
||||||
// Break into components. Empty sub-matches are converted to null
|
// Break into components. Empty sub-matches are converted to null
|
||||||
const componentsRegex = new RegExp(
|
const componentsRegex = new RegExp(
|
||||||
'^((?:lbry://)?)' + // protocol
|
'^((?:lbry://)?)' + // protocol
|
||||||
|
@ -147,7 +147,7 @@ Lbryuri.parse = function(uri, requireProto = false) {
|
||||||
*
|
*
|
||||||
* The channelName key will accept names with or without the @ prefix.
|
* The channelName key will accept names with or without the @ prefix.
|
||||||
*/
|
*/
|
||||||
Lbryuri.build = function(uriObj, includeProto = true) {
|
Lbryuri.build = (uriObj, includeProto = true) => {
|
||||||
const { claimId, claimSequence, bidPosition, contentName, channelName } = uriObj;
|
const { claimId, claimSequence, bidPosition, contentName, channelName } = uriObj;
|
||||||
|
|
||||||
let { name, path } = uriObj;
|
let { name, path } = uriObj;
|
||||||
|
@ -192,14 +192,14 @@ Lbryuri.build = function(uriObj, includeProto = true) {
|
||||||
|
|
||||||
/* Takes a parseable LBRY URI and converts it to standard, canonical format (currently this just
|
/* Takes a parseable LBRY URI and converts it to standard, canonical format (currently this just
|
||||||
* consists of adding the lbry:// prefix if needed) */
|
* consists of adding the lbry:// prefix if needed) */
|
||||||
Lbryuri.normalize = function(uri) {
|
Lbryuri.normalize = uri => {
|
||||||
if (uri.match(/pending_claim/)) return uri;
|
if (uri.match(/pending_claim/)) return uri;
|
||||||
|
|
||||||
const { name, path, bidPosition, claimSequence, claimId } = Lbryuri.parse(uri);
|
const { name, path, bidPosition, claimSequence, claimId } = Lbryuri.parse(uri);
|
||||||
return Lbryuri.build({ name, path, claimSequence, bidPosition, claimId });
|
return Lbryuri.build({ name, path, claimSequence, bidPosition, claimId });
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbryuri.isValid = function(uri) {
|
Lbryuri.isValid = uri => {
|
||||||
let parts;
|
let parts;
|
||||||
try {
|
try {
|
||||||
parts = Lbryuri.parse(Lbryuri.normalize(uri));
|
parts = Lbryuri.parse(Lbryuri.normalize(uri));
|
||||||
|
@ -209,12 +209,12 @@ Lbryuri.isValid = function(uri) {
|
||||||
return parts && parts.name;
|
return parts && parts.name;
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbryuri.isValidName = function(name, checkCase = true) {
|
Lbryuri.isValidName = (name, checkCase = true) => {
|
||||||
const regexp = new RegExp('^[a-z0-9-]+$', checkCase ? '' : 'i');
|
const regexp = new RegExp('^[a-z0-9-]+$', checkCase ? '' : 'i');
|
||||||
return regexp.test(name);
|
return regexp.test(name);
|
||||||
};
|
};
|
||||||
|
|
||||||
Lbryuri.isClaimable = function(uri) {
|
Lbryuri.isClaimable = uri => {
|
||||||
let parts;
|
let parts;
|
||||||
try {
|
try {
|
||||||
parts = Lbryuri.parse(Lbryuri.normalize(uri));
|
parts = Lbryuri.parse(Lbryuri.normalize(uri));
|
||||||
|
|
|
@ -1,23 +1,24 @@
|
||||||
|
/* eslint-disable import/no-commonjs */
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
import * as MODALS from 'constants/modal_types';
|
||||||
|
import { ipcRenderer, remote } from 'electron';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
|
import Path from 'path';
|
||||||
|
import { doFetchRewardedContent } from 'redux/actions/content';
|
||||||
|
import { doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info';
|
||||||
|
import { doAuthNavigate } from 'redux/actions/navigation';
|
||||||
|
import { doFetchDaemonSettings } from 'redux/actions/settings';
|
||||||
|
import { doAuthenticate } from 'redux/actions/user';
|
||||||
|
import { doBalanceSubscribe } from 'redux/actions/wallet';
|
||||||
import {
|
import {
|
||||||
selectUpdateUrl,
|
selectCurrentModal,
|
||||||
selectUpgradeDownloadPath,
|
|
||||||
selectUpgradeDownloadItem,
|
|
||||||
selectUpgradeFilename,
|
|
||||||
selectIsUpgradeSkipped,
|
selectIsUpgradeSkipped,
|
||||||
selectRemoteVersion,
|
selectRemoteVersion,
|
||||||
selectCurrentModal,
|
selectUpdateUrl,
|
||||||
|
selectUpgradeDownloadItem,
|
||||||
|
selectUpgradeDownloadPath,
|
||||||
|
selectUpgradeFilename,
|
||||||
} from 'redux/selectors/app';
|
} from 'redux/selectors/app';
|
||||||
import { doFetchDaemonSettings } from 'redux/actions/settings';
|
|
||||||
import { doBalanceSubscribe } from 'redux/actions/wallet';
|
|
||||||
import { doAuthenticate } from 'redux/actions/user';
|
|
||||||
import { doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info';
|
|
||||||
import * as MODALS from 'constants/modal_types';
|
|
||||||
import { doFetchRewardedContent } from 'redux/actions/content';
|
|
||||||
import { doAuthNavigate } from 'redux/actions/navigation';
|
|
||||||
import { remote, ipcRenderer } from 'electron';
|
|
||||||
import Path from 'path';
|
|
||||||
|
|
||||||
const { download } = remote.require('electron-dl');
|
const { download } = remote.require('electron-dl');
|
||||||
const Fs = remote.require('fs');
|
const Fs = remote.require('fs');
|
||||||
|
@ -57,7 +58,7 @@ export function doSkipUpgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doStartUpgrade() {
|
export function doStartUpgrade() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const upgradeDownloadPath = selectUpgradeDownloadPath(state);
|
const upgradeDownloadPath = selectUpgradeDownloadPath(state);
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ export function doStartUpgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDownloadUpgrade() {
|
export function doDownloadUpgrade() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
// Make a new directory within temp directory so the filename is guaranteed to be available
|
// Make a new directory within temp directory so the filename is guaranteed to be available
|
||||||
const dir = Fs.mkdtempSync(remote.app.getPath('temp') + Path.sep);
|
const dir = Fs.mkdtempSync(remote.app.getPath('temp') + Path.sep);
|
||||||
|
@ -105,7 +106,7 @@ export function doDownloadUpgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doCancelUpgrade() {
|
export function doCancelUpgrade() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const upgradeDownloadItem = selectUpgradeDownloadItem(state);
|
const upgradeDownloadItem = selectUpgradeDownloadItem(state);
|
||||||
|
|
||||||
|
@ -128,7 +129,7 @@ export function doCancelUpgrade() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doCheckUpgradeAvailable() {
|
export function doCheckUpgradeAvailable() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CHECK_UPGRADE_START,
|
type: ACTIONS.CHECK_UPGRADE_START,
|
||||||
|
@ -171,7 +172,7 @@ export function doCheckUpgradeAvailable() {
|
||||||
Initiate a timer that will check for an app upgrade every 10 minutes.
|
Initiate a timer that will check for an app upgrade every 10 minutes.
|
||||||
*/
|
*/
|
||||||
export function doCheckUpgradeSubscribe() {
|
export function doCheckUpgradeSubscribe() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const checkUpgradeTimer = setInterval(
|
const checkUpgradeTimer = setInterval(
|
||||||
() => dispatch(doCheckUpgradeAvailable()),
|
() => dispatch(doCheckUpgradeAvailable()),
|
||||||
CHECK_UPGRADE_INTERVAL
|
CHECK_UPGRADE_INTERVAL
|
||||||
|
@ -184,7 +185,7 @@ export function doCheckUpgradeSubscribe() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doCheckDaemonVersion() {
|
export function doCheckDaemonVersion() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
|
Lbry.version().then(({ lbrynet_version: lbrynetVersion }) => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type:
|
type:
|
||||||
|
@ -197,7 +198,7 @@ export function doCheckDaemonVersion() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAlertError(errorList) {
|
export function doAlertError(errorList) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.OPEN_MODAL,
|
type: ACTIONS.OPEN_MODAL,
|
||||||
data: {
|
data: {
|
||||||
|
@ -209,7 +210,7 @@ export function doAlertError(errorList) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDaemonReady() {
|
export function doDaemonReady() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
dispatch(doAuthenticate());
|
dispatch(doAuthenticate());
|
||||||
|
@ -239,7 +240,7 @@ export function doRemoveSnackBarSnack() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doClearCache() {
|
export function doClearCache() {
|
||||||
return function() {
|
return () => {
|
||||||
window.cacheStore.purge();
|
window.cacheStore.purge();
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
@ -247,13 +248,13 @@ export function doClearCache() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doQuit() {
|
export function doQuit() {
|
||||||
return function() {
|
return () => {
|
||||||
remote.app.quit();
|
remote.app.quit();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doChangeVolume(volume) {
|
export function doChangeVolume(volume) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.VOLUME_CHANGED,
|
type: ACTIONS.VOLUME_CHANGED,
|
||||||
data: {
|
data: {
|
||||||
|
@ -264,7 +265,7 @@ export function doChangeVolume(volume) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doConditionalAuthNavigate(newSession) {
|
export function doConditionalAuthNavigate(newSession) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
if (newSession || selectCurrentModal(state) !== 'email_collection') {
|
if (newSession || selectCurrentModal(state) !== 'email_collection') {
|
||||||
dispatch(doAuthNavigate());
|
dispatch(doAuthNavigate());
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export function doFetchAvailability() {
|
export function doFetchAvailability() {
|
||||||
return function() {
|
return () => {
|
||||||
/*
|
/*
|
||||||
this is disabled atm - Jeremy
|
this is disabled atm - Jeremy
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
import { ipcRenderer } from 'electron';
|
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
import * as MODALS from 'constants/modal_types';
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
|
import { ipcRenderer } from 'electron';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import Lbryio from 'lbryio';
|
import Lbryio from 'lbryio';
|
||||||
import Lbryuri from 'lbryuri';
|
import Lbryuri from 'lbryuri';
|
||||||
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
import { doAlertError, doOpenModal } from 'redux/actions/app';
|
||||||
|
import { doClaimEligiblePurchaseRewards } from 'redux/actions/rewards';
|
||||||
|
import { selectBadgeNumber } from 'redux/selectors/app';
|
||||||
import { selectMyClaimsRaw } from 'redux/selectors/claims';
|
import { selectMyClaimsRaw } from 'redux/selectors/claims';
|
||||||
import { selectBalance } from 'redux/selectors/wallet';
|
import { selectResolvingUris } from 'redux/selectors/content';
|
||||||
|
import { makeSelectCostInfoForUri } from 'redux/selectors/cost_info';
|
||||||
import {
|
import {
|
||||||
makeSelectFileInfoForUri,
|
makeSelectFileInfoForUri,
|
||||||
selectDownloadingByOutpoint,
|
selectDownloadingByOutpoint,
|
||||||
selectTotalDownloadProgress,
|
selectTotalDownloadProgress,
|
||||||
} from 'redux/selectors/file_info';
|
} from 'redux/selectors/file_info';
|
||||||
import { selectResolvingUris } from 'redux/selectors/content';
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import { makeSelectCostInfoForUri } from 'redux/selectors/cost_info';
|
import { selectBalance } from 'redux/selectors/wallet';
|
||||||
import { doAlertError, doOpenModal } from 'redux/actions/app';
|
import batchActions from 'util/batchActions';
|
||||||
import { doClaimEligiblePurchaseRewards } from 'redux/actions/rewards';
|
|
||||||
import { selectBadgeNumber } from 'redux/selectors/app';
|
|
||||||
import setBadge from 'util/setBadge';
|
import setBadge from 'util/setBadge';
|
||||||
import setProgressBar from 'util/setProgressBar';
|
import setProgressBar from 'util/setProgressBar';
|
||||||
import batchActions from 'util/batchActions';
|
|
||||||
import * as MODALS from 'constants/modal_types';
|
|
||||||
|
|
||||||
const DOWNLOAD_POLL_INTERVAL = 250;
|
const DOWNLOAD_POLL_INTERVAL = 250;
|
||||||
|
|
||||||
export function doResolveUris(uris) {
|
export function doResolveUris(uris) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const normalizedUris = uris.map(Lbryuri.normalize);
|
const normalizedUris = uris.map(Lbryuri.normalize);
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ export function doResolveUri(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchFeaturedUris() {
|
export function doFetchFeaturedUris() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_FEATURED_CONTENT_STARTED,
|
type: ACTIONS.FETCH_FEATURED_CONTENT_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -108,7 +108,7 @@ export function doFetchFeaturedUris() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchRewardedContent() {
|
export function doFetchRewardedContent() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const success = nameToClaimId => {
|
const success = nameToClaimId => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_REWARD_CONTENT_COMPLETED,
|
type: ACTIONS.FETCH_REWARD_CONTENT_COMPLETED,
|
||||||
|
@ -134,7 +134,7 @@ export function doFetchRewardedContent() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUpdateLoadStatus(uri, outpoint) {
|
export function doUpdateLoadStatus(uri, outpoint) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
Lbry.file_list({
|
Lbry.file_list({
|
||||||
outpoint,
|
outpoint,
|
||||||
full_status: true,
|
full_status: true,
|
||||||
|
@ -196,7 +196,7 @@ export function doUpdateLoadStatus(uri, outpoint) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doStartDownload(uri, outpoint) {
|
export function doStartDownload(uri, outpoint) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
if (!outpoint) {
|
if (!outpoint) {
|
||||||
|
@ -223,7 +223,7 @@ export function doStartDownload(uri, outpoint) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDownloadFile(uri, streamInfo) {
|
export function doDownloadFile(uri, streamInfo) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch(doStartDownload(uri, streamInfo.outpoint));
|
dispatch(doStartDownload(uri, streamInfo.outpoint));
|
||||||
|
|
||||||
Lbryio.call('file', 'view', {
|
Lbryio.call('file', 'view', {
|
||||||
|
@ -237,7 +237,7 @@ export function doDownloadFile(uri, streamInfo) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doSetPlayingUri(uri) {
|
export function doSetPlayingUri(uri) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.SET_PLAYING_URI,
|
type: ACTIONS.SET_PLAYING_URI,
|
||||||
data: { uri },
|
data: { uri },
|
||||||
|
@ -246,7 +246,7 @@ export function doSetPlayingUri(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doLoadVideo(uri) {
|
export function doLoadVideo(uri) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.LOADING_VIDEO_STARTED,
|
type: ACTIONS.LOADING_VIDEO_STARTED,
|
||||||
data: {
|
data: {
|
||||||
|
@ -289,7 +289,7 @@ export function doLoadVideo(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doPurchaseUri(uri) {
|
export function doPurchaseUri(uri) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const balance = selectBalance(state);
|
const balance = selectBalance(state);
|
||||||
const fileInfo = makeSelectFileInfoForUri(uri)(state);
|
const fileInfo = makeSelectFileInfoForUri(uri)(state);
|
||||||
|
@ -348,7 +348,7 @@ export function doPurchaseUri(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchClaimsByChannel(uri, page) {
|
export function doFetchClaimsByChannel(uri, page) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_CHANNEL_CLAIMS_STARTED,
|
type: ACTIONS.FETCH_CHANNEL_CLAIMS_STARTED,
|
||||||
data: { uri, page },
|
data: { uri, page },
|
||||||
|
@ -371,7 +371,7 @@ export function doFetchClaimsByChannel(uri, page) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchClaimCountByChannel(uri) {
|
export function doFetchClaimCountByChannel(uri) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_CHANNEL_CLAIM_COUNT_STARTED,
|
type: ACTIONS.FETCH_CHANNEL_CLAIM_COUNT_STARTED,
|
||||||
data: { uri },
|
data: { uri },
|
||||||
|
@ -393,7 +393,7 @@ export function doFetchClaimCountByChannel(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchClaimListMine() {
|
export function doFetchClaimListMine() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED,
|
type: ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -410,14 +410,14 @@ export function doFetchClaimListMine() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doPlayUri(uri) {
|
export function doPlayUri(uri) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch(doSetPlayingUri(uri));
|
dispatch(doSetPlayingUri(uri));
|
||||||
dispatch(doPurchaseUri(uri));
|
dispatch(doPurchaseUri(uri));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchChannelListMine() {
|
export function doFetchChannelListMine() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_CHANNEL_LIST_MINE_STARTED,
|
type: ACTIONS.FETCH_CHANNEL_LIST_MINE_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -434,7 +434,7 @@ export function doFetchChannelListMine() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doCreateChannel(name, amount) {
|
export function doCreateChannel(name, amount) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CREATE_CHANNEL_STARTED,
|
type: ACTIONS.CREATE_CHANNEL_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -462,8 +462,8 @@ export function doCreateChannel(name, amount) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doPublish(params) {
|
export function doPublish(params) {
|
||||||
return function(dispatch) {
|
return dispatch =>
|
||||||
return new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
const success = claim => {
|
const success = claim => {
|
||||||
resolve(claim);
|
resolve(claim);
|
||||||
|
|
||||||
|
@ -477,11 +477,10 @@ export function doPublish(params) {
|
||||||
|
|
||||||
Lbry.publishDeprecated(params, null, success, failure);
|
Lbry.publishDeprecated(params, null, success, failure);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAbandonClaim(txid, nout) {
|
export function doAbandonClaim(txid, nout) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const myClaims = selectMyClaimsRaw(state);
|
const myClaims = selectMyClaimsRaw(state);
|
||||||
const { claim_id: claimId, name } = myClaims.find(
|
const { claim_id: claimId, name } = myClaims.find(
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { selectClaimsByUri } from 'redux/selectors/claims';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export function doFetchCostInfoForUri(uri) {
|
export function doFetchCostInfoForUri(uri) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const claim = selectClaimsByUri(state)[uri];
|
const claim = selectClaimsByUri(state)[uri];
|
||||||
|
|
||||||
|
|
|
@ -1,25 +1,25 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
import { shell } from 'electron';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import { doFetchClaimListMine, doAbandonClaim } from 'redux/actions/content';
|
import { doCloseModal } from 'redux/actions/app';
|
||||||
|
import { doAbandonClaim, doFetchClaimListMine } from 'redux/actions/content';
|
||||||
|
import { doHistoryBack } from 'redux/actions/navigation';
|
||||||
import {
|
import {
|
||||||
selectClaimsByUri,
|
selectClaimsByUri,
|
||||||
selectIsFetchingClaimListMine,
|
selectIsFetchingClaimListMine,
|
||||||
selectMyClaimsOutpoints,
|
selectMyClaimsOutpoints,
|
||||||
} from 'redux/selectors/claims';
|
} from 'redux/selectors/claims';
|
||||||
import {
|
import {
|
||||||
selectIsFetchingFileList,
|
|
||||||
selectFileInfosByOutpoint,
|
selectFileInfosByOutpoint,
|
||||||
selectUrisLoading,
|
selectIsFetchingFileList,
|
||||||
selectTotalDownloadProgress,
|
selectTotalDownloadProgress,
|
||||||
|
selectUrisLoading,
|
||||||
} from 'redux/selectors/file_info';
|
} from 'redux/selectors/file_info';
|
||||||
import { doCloseModal } from 'redux/actions/app';
|
|
||||||
import { doHistoryBack } from 'redux/actions/navigation';
|
|
||||||
import setProgressBar from 'util/setProgressBar';
|
|
||||||
import batchActions from 'util/batchActions';
|
import batchActions from 'util/batchActions';
|
||||||
import { shell } from 'electron';
|
import setProgressBar from 'util/setProgressBar';
|
||||||
|
|
||||||
export function doFetchFileInfo(uri) {
|
export function doFetchFileInfo(uri) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const claim = selectClaimsByUri(state)[uri];
|
const claim = selectClaimsByUri(state)[uri];
|
||||||
const outpoint = claim ? `${claim.txid}:${claim.nout}` : null;
|
const outpoint = claim ? `${claim.txid}:${claim.nout}` : null;
|
||||||
|
@ -47,7 +47,7 @@ export function doFetchFileInfo(uri) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFileList() {
|
export function doFileList() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const isFetching = selectIsFetchingFileList(state);
|
const isFetching = selectIsFetchingFileList(state);
|
||||||
|
|
||||||
|
@ -69,13 +69,13 @@ export function doFileList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doOpenFileInFolder(path) {
|
export function doOpenFileInFolder(path) {
|
||||||
return function() {
|
return () => {
|
||||||
shell.showItemInFolder(path);
|
shell.showItemInFolder(path);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doOpenFileInShell(path) {
|
export function doOpenFileInShell(path) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const success = shell.openItem(path);
|
const success = shell.openItem(path);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
dispatch(doOpenFileInFolder(path));
|
dispatch(doOpenFileInFolder(path));
|
||||||
|
@ -84,7 +84,7 @@ export function doOpenFileInShell(path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
|
|
||||||
Lbry.file_delete({
|
Lbry.file_delete({
|
||||||
|
@ -92,7 +92,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
||||||
delete_from_download_dir: deleteFromComputer,
|
delete_from_download_dir: deleteFromComputer,
|
||||||
});
|
});
|
||||||
|
|
||||||
// If the file is for a claim we published then also abandom the claim
|
// If the file is for a claim we published then also abandon the claim
|
||||||
const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
const myClaimsOutpoints = selectMyClaimsOutpoints(state);
|
||||||
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
|
if (abandonClaim && myClaimsOutpoints.indexOf(outpoint) !== -1) {
|
||||||
const byOutpoint = selectFileInfosByOutpoint(state);
|
const byOutpoint = selectFileInfosByOutpoint(state);
|
||||||
|
@ -119,7 +119,7 @@ export function doDeleteFile(outpoint, deleteFromComputer, abandonClaim) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDeleteFileAndGoBack(fileInfo, deleteFromComputer, abandonClaim) {
|
export function doDeleteFileAndGoBack(fileInfo, deleteFromComputer, abandonClaim) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const actions = [];
|
const actions = [];
|
||||||
actions.push(doCloseModal());
|
actions.push(doCloseModal());
|
||||||
actions.push(doHistoryBack());
|
actions.push(doHistoryBack());
|
||||||
|
@ -129,7 +129,7 @@ export function doDeleteFileAndGoBack(fileInfo, deleteFromComputer, abandonClaim
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchFileInfosAndPublishedClaims() {
|
export function doFetchFileInfosAndPublishedClaims() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const isFetchingClaimListMine = selectIsFetchingClaimListMine(state);
|
const isFetchingClaimListMine = selectIsFetchingClaimListMine(state);
|
||||||
const isFetchingFileInfo = selectIsFetchingFileList(state);
|
const isFetchingFileInfo = selectIsFetchingFileList(state);
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import { selectHistoryStack, selectHistoryIndex } from 'redux/selectors/navigation';
|
import { selectHistoryIndex, selectHistoryStack } from 'redux/selectors/navigation';
|
||||||
import { toQueryString } from 'util/query_params';
|
import { toQueryString } from 'util/query_params';
|
||||||
|
|
||||||
export function doNavigate(path, params = {}, options = {}) {
|
export function doNavigate(path, params = {}, options = {}) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
if (!path) {
|
if (!path) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ export function doNavigate(path, params = {}, options = {}) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAuthNavigate(pathAfterAuth = null, params = {}) {
|
export function doAuthNavigate(pathAfterAuth = null, params = {}) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
if (pathAfterAuth) {
|
if (pathAfterAuth) {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CHANGE_AFTER_AUTH_PATH,
|
type: ACTIONS.CHANGE_AFTER_AUTH_PATH,
|
||||||
|
@ -47,19 +47,15 @@ export function doHistoryTraverse(dispatch, state, modifier) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doHistoryBack() {
|
export function doHistoryBack() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => doHistoryTraverse(dispatch, getState(), -1);
|
||||||
return doHistoryTraverse(dispatch, getState(), -1);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doHistoryForward() {
|
export function doHistoryForward() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => doHistoryTraverse(dispatch, getState(), 1);
|
||||||
return doHistoryTraverse(dispatch, getState(), 1);
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doRecordScroll(scroll) {
|
export function doRecordScroll(scroll) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.WINDOW_SCROLLED,
|
type: ACTIONS.WINDOW_SCROLLED,
|
||||||
data: { scrollY: scroll },
|
data: { scrollY: scroll },
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import Lbryio from 'lbryio';
|
import Lbryio from 'lbryio';
|
||||||
import rewards from 'rewards';
|
|
||||||
import { selectUnclaimedRewardsByType } from 'redux/selectors/rewards';
|
import { selectUnclaimedRewardsByType } from 'redux/selectors/rewards';
|
||||||
import { selectUserIsRewardApproved } from 'redux/selectors/user';
|
import { selectUserIsRewardApproved } from 'redux/selectors/user';
|
||||||
|
import rewards from 'rewards';
|
||||||
|
|
||||||
export function doRewardList() {
|
export function doRewardList() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_REWARDS_STARTED,
|
type: ACTIONS.FETCH_REWARDS_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@ export function doRewardList() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doClaimRewardType(rewardType) {
|
export function doClaimRewardType(rewardType) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const rewardsByType = selectUnclaimedRewardsByType(state);
|
const rewardsByType = selectUnclaimedRewardsByType(state);
|
||||||
const reward = rewardsByType[rewardType];
|
const reward = rewardsByType[rewardType];
|
||||||
|
@ -80,7 +80,7 @@ export function doClaimRewardType(rewardType) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doClaimEligiblePurchaseRewards() {
|
export function doClaimEligiblePurchaseRewards() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const rewardsByType = selectUnclaimedRewardsByType(state);
|
const rewardsByType = selectUnclaimedRewardsByType(state);
|
||||||
const userIsRewardApproved = selectUserIsRewardApproved(state);
|
const userIsRewardApproved = selectUserIsRewardApproved(state);
|
||||||
|
@ -100,7 +100,7 @@ export function doClaimEligiblePurchaseRewards() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doClaimRewardClearError(reward) {
|
export function doClaimRewardClearError(reward) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CLAIM_REWARD_CLEAR_ERROR,
|
type: ACTIONS.CLAIM_REWARD_CLEAR_ERROR,
|
||||||
data: { reward },
|
data: { reward },
|
||||||
|
|
|
@ -7,7 +7,7 @@ import batchActions from 'util/batchActions';
|
||||||
|
|
||||||
// eslint-disable-next-line import/prefer-default-export
|
// eslint-disable-next-line import/prefer-default-export
|
||||||
export function doSearch(rawQuery) {
|
export function doSearch(rawQuery) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const page = selectCurrentPage(state);
|
const page = selectCurrentPage(state);
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import Http from 'http';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
|
|
||||||
export function doFetchDaemonSettings() {
|
export function doFetchDaemonSettings() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
Lbry.settings_get().then(settings => {
|
Lbry.settings_get().then(settings => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.DAEMON_SETTINGS_RECEIVED,
|
type: ACTIONS.DAEMON_SETTINGS_RECEIVED,
|
||||||
|
@ -19,7 +19,7 @@ export function doFetchDaemonSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doSetDaemonSetting(key, value) {
|
export function doSetDaemonSetting(key, value) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const newSettings = {};
|
const newSettings = {};
|
||||||
newSettings[key] = value;
|
newSettings[key] = value;
|
||||||
Lbry.settings_set(newSettings).then(newSettings);
|
Lbry.settings_set(newSettings).then(newSettings);
|
||||||
|
@ -45,14 +45,14 @@ export function doSetClientSetting(key, value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doGetThemes() {
|
export function doGetThemes() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const themes = ['light', 'dark'];
|
const themes = ['light', 'dark'];
|
||||||
dispatch(doSetClientSetting(SETTINGS.THEMES, themes));
|
dispatch(doSetClientSetting(SETTINGS.THEMES, themes));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDownloadLanguage(langFile) {
|
export function doDownloadLanguage(langFile) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const destinationPath = `${app.i18n.directory}/${langFile}`;
|
const destinationPath = `${app.i18n.directory}/${langFile}`;
|
||||||
const language = langFile.replace('.json', '');
|
const language = langFile.replace('.json', '');
|
||||||
const errorHandler = () => {
|
const errorHandler = () => {
|
||||||
|
@ -105,7 +105,7 @@ export function doDownloadLanguage(langFile) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doDownloadLanguages() {
|
export function doDownloadLanguages() {
|
||||||
return function() {
|
return () => {
|
||||||
// temporarily disable i18n so I can get a working build out -- Jeremy
|
// temporarily disable i18n so I can get a working build out -- Jeremy
|
||||||
// if (!Fs.existsSync(app.i18n.directory)) {
|
// if (!Fs.existsSync(app.i18n.directory)) {
|
||||||
// Fs.mkdirSync(app.i18n.directory);
|
// Fs.mkdirSync(app.i18n.directory);
|
||||||
|
@ -135,7 +135,7 @@ export function doDownloadLanguages() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doChangeLanguage(language) {
|
export function doChangeLanguage(language) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch(doSetClientSetting(SETTINGS.LANGUAGE, language));
|
dispatch(doSetClientSetting(SETTINGS.LANGUAGE, language));
|
||||||
app.i18n.setLocale(language);
|
app.i18n.setLocale(language);
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,12 +2,12 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
import Lbryio from 'lbryio';
|
import Lbryio from 'lbryio';
|
||||||
import { doOpenModal, doShowSnackBar } from 'redux/actions/app';
|
import { doOpenModal, doShowSnackBar } from 'redux/actions/app';
|
||||||
import { doRewardList, doClaimRewardType } from 'redux/actions/rewards';
|
import { doClaimRewardType, doRewardList } from 'redux/actions/rewards';
|
||||||
import { selectEmailToVerify } from 'redux/selectors/user';
|
import { selectEmailToVerify } from 'redux/selectors/user';
|
||||||
import rewards from 'rewards';
|
import rewards from 'rewards';
|
||||||
|
|
||||||
export function doFetchInviteStatus() {
|
export function doFetchInviteStatus() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.USER_INVITE_STATUS_FETCH_STARTED,
|
type: ACTIONS.USER_INVITE_STATUS_FETCH_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -32,7 +32,7 @@ export function doFetchInviteStatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doAuthenticate() {
|
export function doAuthenticate() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.AUTHENTICATION_STARTED,
|
type: ACTIONS.AUTHENTICATION_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -56,7 +56,7 @@ export function doAuthenticate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUserFetch() {
|
export function doUserFetch() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.USER_FETCH_STARTED,
|
type: ACTIONS.USER_FETCH_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -79,7 +79,7 @@ export function doUserFetch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUserEmailNew(email) {
|
export function doUserEmailNew(email) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.USER_EMAIL_NEW_STARTED,
|
type: ACTIONS.USER_EMAIL_NEW_STARTED,
|
||||||
email,
|
email,
|
||||||
|
@ -124,7 +124,7 @@ export function doUserEmailVerifyFailure(error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUserEmailVerify(verificationToken, recaptcha) {
|
export function doUserEmailVerify(verificationToken, recaptcha) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const email = selectEmailToVerify(getState());
|
const email = selectEmailToVerify(getState());
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
|
@ -160,7 +160,7 @@ export function doUserEmailVerify(verificationToken, recaptcha) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUserIdentityVerify(stripeToken) {
|
export function doUserIdentityVerify(stripeToken) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.USER_IDENTITY_VERIFY_STARTED,
|
type: ACTIONS.USER_IDENTITY_VERIFY_STARTED,
|
||||||
token: stripeToken,
|
token: stripeToken,
|
||||||
|
@ -188,7 +188,7 @@ export function doUserIdentityVerify(stripeToken) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchAccessToken() {
|
export function doFetchAccessToken() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
const success = token =>
|
const success = token =>
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS,
|
type: ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS,
|
||||||
|
@ -199,7 +199,7 @@ export function doFetchAccessToken() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doUserInviteNew(email) {
|
export function doUserInviteNew(email) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.USER_INVITE_NEW_STARTED,
|
type: ACTIONS.USER_INVITE_NEW_STARTED,
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
|
import * as MODALS from 'constants/modal_types';
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import {
|
|
||||||
selectDraftTransaction,
|
|
||||||
selectDraftTransactionAmount,
|
|
||||||
selectBalance,
|
|
||||||
} from 'redux/selectors/wallet';
|
|
||||||
import { doOpenModal, doShowSnackBar } from 'redux/actions/app';
|
import { doOpenModal, doShowSnackBar } from 'redux/actions/app';
|
||||||
import { doNavigate } from 'redux/actions/navigation';
|
import { doNavigate } from 'redux/actions/navigation';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import {
|
||||||
|
selectBalance,
|
||||||
|
selectDraftTransaction,
|
||||||
|
selectDraftTransactionAmount,
|
||||||
|
} from 'redux/selectors/wallet';
|
||||||
|
|
||||||
export function doUpdateBalance() {
|
export function doUpdateBalance() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
Lbry.wallet_balance().then(balance =>
|
Lbry.wallet_balance().then(balance =>
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.UPDATE_BALANCE,
|
type: ACTIONS.UPDATE_BALANCE,
|
||||||
|
@ -23,14 +23,14 @@ export function doUpdateBalance() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doBalanceSubscribe() {
|
export function doBalanceSubscribe() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch(doUpdateBalance());
|
dispatch(doUpdateBalance());
|
||||||
setInterval(() => dispatch(doUpdateBalance()), 5000);
|
setInterval(() => dispatch(doUpdateBalance()), 5000);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchTransactions() {
|
export function doFetchTransactions() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_TRANSACTIONS_STARTED,
|
type: ACTIONS.FETCH_TRANSACTIONS_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,7 @@ export function doFetchTransactions() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doFetchBlock(height) {
|
export function doFetchBlock(height) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
Lbry.block_show({ height }).then(block => {
|
Lbry.block_show({ height }).then(block => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.FETCH_BLOCK_SUCCESS,
|
type: ACTIONS.FETCH_BLOCK_SUCCESS,
|
||||||
|
@ -58,7 +58,7 @@ export function doFetchBlock(height) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doGetNewAddress() {
|
export function doGetNewAddress() {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.GET_NEW_ADDRESS_STARTED,
|
type: ACTIONS.GET_NEW_ADDRESS_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -74,7 +74,7 @@ export function doGetNewAddress() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doCheckAddressIsMine(address) {
|
export function doCheckAddressIsMine(address) {
|
||||||
return function(dispatch) {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
type: ACTIONS.CHECK_ADDRESS_IS_MINE_STARTED,
|
type: ACTIONS.CHECK_ADDRESS_IS_MINE_STARTED,
|
||||||
});
|
});
|
||||||
|
@ -90,7 +90,7 @@ export function doCheckAddressIsMine(address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doSendDraftTransaction() {
|
export function doSendDraftTransaction() {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const draftTx = selectDraftTransaction(state);
|
const draftTx = selectDraftTransaction(state);
|
||||||
const balance = selectBalance(state);
|
const balance = selectBalance(state);
|
||||||
|
@ -156,7 +156,7 @@ export function doSetDraftTransactionAddress(address) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function doSendSupport(amount, claimId, uri) {
|
export function doSendSupport(amount, claimId, uri) {
|
||||||
return function(dispatch, getState) {
|
return (dispatch, getState) => {
|
||||||
const state = getState();
|
const state = getState();
|
||||||
const balance = selectBalance(state);
|
const balance = selectBalance(state);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import * as MODALS from 'constants/modal_types';
|
import * as MODALS from 'constants/modal_types';
|
||||||
|
|
||||||
const { remote } = require('electron');
|
import { remote } from 'electron';
|
||||||
|
|
||||||
const win = remote.BrowserWindow.getFocusedWindow();
|
const win = remote.BrowserWindow.getFocusedWindow();
|
||||||
|
|
||||||
|
@ -56,48 +56,42 @@ const defaultState: AppState = {
|
||||||
snackBar: undefined,
|
snackBar: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DAEMON_READY] = function(state) {
|
reducers[ACTIONS.DAEMON_READY] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
daemonReady: true,
|
daemonReady: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.DAEMON_VERSION_MATCH] = function(state) {
|
reducers[ACTIONS.DAEMON_VERSION_MATCH] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
daemonVersionMatched: true,
|
daemonVersionMatched: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.DAEMON_VERSION_MISMATCH] = function(state) {
|
reducers[ACTIONS.DAEMON_VERSION_MISMATCH] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
daemonVersionMatched: false,
|
daemonVersionMatched: false,
|
||||||
modal: MODALS.INCOMPATIBLE_DAEMON,
|
modal: MODALS.INCOMPATIBLE_DAEMON,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.UPGRADE_CANCELLED] = function(state) {
|
reducers[ACTIONS.UPGRADE_CANCELLED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
downloadProgress: null,
|
downloadProgress: null,
|
||||||
upgradeDownloadComplete: false,
|
upgradeDownloadComplete: false,
|
||||||
modal: null,
|
modal: null,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.UPGRADE_DOWNLOAD_COMPLETED] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
downloadPath: action.data.path,
|
downloadPath: action.data.path,
|
||||||
upgradeDownloading: false,
|
upgradeDownloading: false,
|
||||||
upgradeDownloadCompleted: true,
|
upgradeDownloadCompleted: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.UPGRADE_DOWNLOAD_STARTED] = function(state) {
|
reducers[ACTIONS.UPGRADE_DOWNLOAD_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
upgradeDownloading: true,
|
upgradeDownloading: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SKIP_UPGRADE] = function(state) {
|
reducers[ACTIONS.SKIP_UPGRADE] = state => {
|
||||||
sessionStorage.setItem('upgradeSkipped', 'true');
|
sessionStorage.setItem('upgradeSkipped', 'true');
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -106,46 +100,40 @@ reducers[ACTIONS.SKIP_UPGRADE] = function(state) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.UPDATE_VERSION] = function(state, action) {
|
reducers[ACTIONS.UPDATE_VERSION] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
version: action.data.version,
|
version: action.data.version,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CHECK_UPGRADE_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.CHECK_UPGRADE_SUCCESS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
isUpgradeAvailable: action.data.upgradeAvailable,
|
isUpgradeAvailable: action.data.upgradeAvailable,
|
||||||
remoteVersion: action.data.remoteVersion,
|
remoteVersion: action.data.remoteVersion,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CHECK_UPGRADE_SUBSCRIBE] = function(state, action) {
|
reducers[ACTIONS.CHECK_UPGRADE_SUBSCRIBE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
checkUpgradeTimer: action.data.checkUpgradeTimer,
|
checkUpgradeTimer: action.data.checkUpgradeTimer,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.OPEN_MODAL] = function(state, action) {
|
reducers[ACTIONS.OPEN_MODAL] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
modal: action.data.modal,
|
modal: action.data.modal,
|
||||||
modalProps: action.data.modalProps || {},
|
modalProps: action.data.modalProps || {},
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CLOSE_MODAL] = function(state) {
|
reducers[ACTIONS.CLOSE_MODAL] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
modal: undefined,
|
modal: undefined,
|
||||||
modalProps: {},
|
modalProps: {},
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.UPGRADE_DOWNLOAD_PROGRESSED] = function(state, action) {
|
reducers[ACTIONS.UPGRADE_DOWNLOAD_PROGRESSED] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
downloadProgress: action.data.percent,
|
downloadProgress: action.data.percent,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SHOW_SNACKBAR] = function(state, action) {
|
reducers[ACTIONS.SHOW_SNACKBAR] = (state, action) => {
|
||||||
const { message, linkText, linkTarget, isError } = action.data;
|
const { message, linkText, linkTarget, isError } = action.data;
|
||||||
const snackBar = Object.assign({}, state.snackBar);
|
const snackBar = Object.assign({}, state.snackBar);
|
||||||
const snacks = Object.assign([], snackBar.snacks);
|
const snacks = Object.assign([], snackBar.snacks);
|
||||||
|
@ -164,7 +152,7 @@ reducers[ACTIONS.SHOW_SNACKBAR] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.REMOVE_SNACKBAR_SNACK] = function(state) {
|
reducers[ACTIONS.REMOVE_SNACKBAR_SNACK] = state => {
|
||||||
const snackBar = Object.assign({}, state.snackBar);
|
const snackBar = Object.assign({}, state.snackBar);
|
||||||
const snacks = Object.assign([], snackBar.snacks);
|
const snacks = Object.assign([], snackBar.snacks);
|
||||||
snacks.shift();
|
snacks.shift();
|
||||||
|
@ -178,7 +166,7 @@ reducers[ACTIONS.REMOVE_SNACKBAR_SNACK] = function(state) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_COMPLETED] = function(state) {
|
reducers[ACTIONS.DOWNLOADING_COMPLETED] = state => {
|
||||||
const { badgeNumber } = state;
|
const { badgeNumber } = state;
|
||||||
|
|
||||||
// Don't update the badge number if the window is focused
|
// Don't update the badge number if the window is focused
|
||||||
|
@ -189,17 +177,15 @@ reducers[ACTIONS.DOWNLOADING_COMPLETED] = function(state) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.WINDOW_FOCUSED] = function(state) {
|
reducers[ACTIONS.WINDOW_FOCUSED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
badgeNumber: 0,
|
badgeNumber: 0,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.VOLUME_CHANGED] = function(state, action) {
|
reducers[ACTIONS.VOLUME_CHANGED] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
volume: action.data.volume,
|
volume: action.data.volume,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
export default function reducer(state: AppState = defaultState, action: any) {
|
export default function reducer(state: AppState = defaultState, action: any) {
|
||||||
const handler = reducers[action.type];
|
const handler = reducers[action.type];
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
const reducers = {};
|
const reducers = {};
|
||||||
const defaultState = {};
|
const defaultState = {};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_AVAILABILITY_STARTED] = function(state, action) {
|
reducers[ACTIONS.FETCH_AVAILABILITY_STARTED] = (state, action) => {
|
||||||
const { uri } = action.data;
|
const { uri } = action.data;
|
||||||
const newFetching = Object.assign({}, state.fetching);
|
const newFetching = Object.assign({}, state.fetching);
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ reducers[ACTIONS.FETCH_AVAILABILITY_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_AVAILABILITY_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_AVAILABILITY_COMPLETED] = (state, action) => {
|
||||||
const { uri, availability } = action.data;
|
const { uri, availability } = action.data;
|
||||||
|
|
||||||
const newFetching = Object.assign({}, state.fetching);
|
const newFetching = Object.assign({}, state.fetching);
|
||||||
|
|
|
@ -4,7 +4,7 @@ const reducers = {};
|
||||||
|
|
||||||
const defaultState = {};
|
const defaultState = {};
|
||||||
|
|
||||||
reducers[ACTIONS.RESOLVE_URIS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.RESOLVE_URIS_COMPLETED] = (state, action) => {
|
||||||
const { resolveInfo } = action.data;
|
const { resolveInfo } = action.data;
|
||||||
const byUri = Object.assign({}, state.claimsByUri);
|
const byUri = Object.assign({}, state.claimsByUri);
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
|
@ -33,13 +33,12 @@ reducers[ACTIONS.RESOLVE_URIS_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED] = function(state) {
|
reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
isFetchingClaimListMine: true,
|
isFetchingClaimListMine: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_COMPLETED] = (state, action) => {
|
||||||
const { claims } = action.data;
|
const { claims } = action.data;
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
const pendingById = Object.assign({}, state.pendingById);
|
const pendingById = Object.assign({}, state.pendingById);
|
||||||
|
@ -72,11 +71,10 @@ reducers[ACTIONS.FETCH_CLAIM_LIST_MINE_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_LIST_MINE_STARTED] = function(state) {
|
reducers[ACTIONS.FETCH_CHANNEL_LIST_MINE_STARTED] = state =>
|
||||||
return Object.assign({}, state, { fetchingMyChannels: true });
|
Object.assign({}, state, { fetchingMyChannels: true });
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_LIST_MINE_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_CHANNEL_LIST_MINE_COMPLETED] = (state, action) => {
|
||||||
const { claims } = action.data;
|
const { claims } = action.data;
|
||||||
const myChannelClaims = new Set(state.myChannelClaims);
|
const myChannelClaims = new Set(state.myChannelClaims);
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
|
@ -93,7 +91,7 @@ reducers[ACTIONS.FETCH_CHANNEL_LIST_MINE_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_STARTED] = function(state, action) {
|
reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_STARTED] = (state, action) => {
|
||||||
const { uri, page } = action.data;
|
const { uri, page } = action.data;
|
||||||
const fetchingChannelClaims = Object.assign({}, state.fetchingChannelClaims);
|
const fetchingChannelClaims = Object.assign({}, state.fetchingChannelClaims);
|
||||||
|
|
||||||
|
@ -104,7 +102,7 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = (state, action) => {
|
||||||
const { uri, claims, page } = action.data;
|
const { uri, claims, page } = action.data;
|
||||||
|
|
||||||
const claimsByChannel = Object.assign({}, state.claimsByChannel);
|
const claimsByChannel = Object.assign({}, state.claimsByChannel);
|
||||||
|
@ -134,7 +132,7 @@ reducers[ACTIONS.FETCH_CHANNEL_CLAIMS_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.ABANDON_CLAIM_STARTED] = function(state, action) {
|
reducers[ACTIONS.ABANDON_CLAIM_STARTED] = (state, action) => {
|
||||||
const { claimId } = action.data;
|
const { claimId } = action.data;
|
||||||
const abandoningById = Object.assign({}, state.abandoningById);
|
const abandoningById = Object.assign({}, state.abandoningById);
|
||||||
|
|
||||||
|
@ -145,7 +143,7 @@ reducers[ACTIONS.ABANDON_CLAIM_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = function(state, action) {
|
reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = (state, action) => {
|
||||||
const { claimId } = action.data;
|
const { claimId } = action.data;
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
const claimsByUri = Object.assign({}, state.claimsByUri);
|
const claimsByUri = Object.assign({}, state.claimsByUri);
|
||||||
|
@ -164,7 +162,7 @@ reducers[ACTIONS.ABANDON_CLAIM_SUCCEEDED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.CREATE_CHANNEL_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.CREATE_CHANNEL_COMPLETED] = (state, action) => {
|
||||||
const { channelClaim } = action.data;
|
const { channelClaim } = action.data;
|
||||||
const byId = Object.assign({}, state.byId);
|
const byId = Object.assign({}, state.byId);
|
||||||
const myChannelClaims = new Set(state.myChannelClaims);
|
const myChannelClaims = new Set(state.myChannelClaims);
|
||||||
|
|
|
@ -7,13 +7,12 @@ const defaultState = {
|
||||||
channelClaimCounts: {},
|
channelClaimCounts: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_FEATURED_CONTENT_STARTED] = function(state) {
|
reducers[ACTIONS.FETCH_FEATURED_CONTENT_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
fetchingFeaturedContent: true,
|
fetchingFeaturedContent: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_FEATURED_CONTENT_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_FEATURED_CONTENT_COMPLETED] = (state, action) => {
|
||||||
const { uris, success } = action.data;
|
const { uris, success } = action.data;
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -23,7 +22,7 @@ reducers[ACTIONS.FETCH_FEATURED_CONTENT_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_REWARD_CONTENT_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_REWARD_CONTENT_COMPLETED] = (state, action) => {
|
||||||
const { claimIds } = action.data;
|
const { claimIds } = action.data;
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -31,7 +30,7 @@ reducers[ACTIONS.FETCH_REWARD_CONTENT_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.RESOLVE_URIS_STARTED] = function(state, action) {
|
reducers[ACTIONS.RESOLVE_URIS_STARTED] = (state, action) => {
|
||||||
const { uris } = action.data;
|
const { uris } = action.data;
|
||||||
|
|
||||||
const oldResolving = state.resolvingUris || [];
|
const oldResolving = state.resolvingUris || [];
|
||||||
|
@ -48,7 +47,7 @@ reducers[ACTIONS.RESOLVE_URIS_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.RESOLVE_URIS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.RESOLVE_URIS_COMPLETED] = (state, action) => {
|
||||||
const { resolveInfo } = action.data;
|
const { resolveInfo } = action.data;
|
||||||
const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
|
const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
|
||||||
|
|
||||||
|
@ -69,7 +68,7 @@ reducers[ACTIONS.SET_PLAYING_URI] = (state, action) =>
|
||||||
playingUri: action.data.uri,
|
playingUri: action.data.uri,
|
||||||
});
|
});
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_CHANNEL_CLAIM_COUNT_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_CHANNEL_CLAIM_COUNT_COMPLETED] = (state, action) => {
|
||||||
const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
|
const channelClaimCounts = Object.assign({}, state.channelClaimCounts);
|
||||||
const { uri, totalClaims } = action.data;
|
const { uri, totalClaims } = action.data;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
const reducers = {};
|
const reducers = {};
|
||||||
const defaultState = {};
|
const defaultState = {};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_COST_INFO_STARTED] = function(state, action) {
|
reducers[ACTIONS.FETCH_COST_INFO_STARTED] = (state, action) => {
|
||||||
const { uri } = action.data;
|
const { uri } = action.data;
|
||||||
const newFetching = Object.assign({}, state.fetching);
|
const newFetching = Object.assign({}, state.fetching);
|
||||||
newFetching[uri] = true;
|
newFetching[uri] = true;
|
||||||
|
@ -13,7 +13,7 @@ reducers[ACTIONS.FETCH_COST_INFO_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_COST_INFO_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_COST_INFO_COMPLETED] = (state, action) => {
|
||||||
const { uri, costInfo } = action.data;
|
const { uri, costInfo } = action.data;
|
||||||
const newByUri = Object.assign({}, state.byUri);
|
const newByUri = Object.assign({}, state.byUri);
|
||||||
const newFetching = Object.assign({}, state.fetching);
|
const newFetching = Object.assign({}, state.fetching);
|
||||||
|
|
|
@ -3,13 +3,12 @@ import * as ACTIONS from 'constants/action_types';
|
||||||
const reducers = {};
|
const reducers = {};
|
||||||
const defaultState = {};
|
const defaultState = {};
|
||||||
|
|
||||||
reducers[ACTIONS.FILE_LIST_STARTED] = function(state) {
|
reducers[ACTIONS.FILE_LIST_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
isFetchingFileList: true,
|
isFetchingFileList: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FILE_LIST_SUCCEEDED] = function(state, action) {
|
reducers[ACTIONS.FILE_LIST_SUCCEEDED] = (state, action) => {
|
||||||
const { fileInfos } = action.data;
|
const { fileInfos } = action.data;
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
const pendingByOutpoint = Object.assign({}, state.pendingByOutpoint);
|
const pendingByOutpoint = Object.assign({}, state.pendingByOutpoint);
|
||||||
|
@ -27,7 +26,7 @@ reducers[ACTIONS.FILE_LIST_SUCCEEDED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_FILE_INFO_STARTED] = function(state, action) {
|
reducers[ACTIONS.FETCH_FILE_INFO_STARTED] = (state, action) => {
|
||||||
const { outpoint } = action.data;
|
const { outpoint } = action.data;
|
||||||
const newFetching = Object.assign({}, state.fetching);
|
const newFetching = Object.assign({}, state.fetching);
|
||||||
|
|
||||||
|
@ -38,7 +37,7 @@ reducers[ACTIONS.FETCH_FILE_INFO_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_FILE_INFO_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_FILE_INFO_COMPLETED] = (state, action) => {
|
||||||
const { fileInfo, outpoint } = action.data;
|
const { fileInfo, outpoint } = action.data;
|
||||||
|
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
|
@ -53,7 +52,7 @@ reducers[ACTIONS.FETCH_FILE_INFO_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_STARTED] = function(state, action) {
|
reducers[ACTIONS.DOWNLOADING_STARTED] = (state, action) => {
|
||||||
const { uri, outpoint, fileInfo } = action.data;
|
const { uri, outpoint, fileInfo } = action.data;
|
||||||
|
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
|
@ -71,7 +70,7 @@ reducers[ACTIONS.DOWNLOADING_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_PROGRESSED] = function(state, action) {
|
reducers[ACTIONS.DOWNLOADING_PROGRESSED] = (state, action) => {
|
||||||
const { outpoint, fileInfo } = action.data;
|
const { outpoint, fileInfo } = action.data;
|
||||||
|
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
|
@ -86,7 +85,7 @@ reducers[ACTIONS.DOWNLOADING_PROGRESSED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOADING_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.DOWNLOADING_COMPLETED] = (state, action) => {
|
||||||
const { outpoint, fileInfo } = action.data;
|
const { outpoint, fileInfo } = action.data;
|
||||||
|
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
|
@ -101,7 +100,7 @@ reducers[ACTIONS.DOWNLOADING_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FILE_DELETE] = function(state, action) {
|
reducers[ACTIONS.FILE_DELETE] = (state, action) => {
|
||||||
const { outpoint } = action.data;
|
const { outpoint } = action.data;
|
||||||
|
|
||||||
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
const newByOutpoint = Object.assign({}, state.byOutpoint);
|
||||||
|
@ -116,7 +115,7 @@ reducers[ACTIONS.FILE_DELETE] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.LOADING_VIDEO_STARTED] = function(state, action) {
|
reducers[ACTIONS.LOADING_VIDEO_STARTED] = (state, action) => {
|
||||||
const { uri } = action.data;
|
const { uri } = action.data;
|
||||||
|
|
||||||
const newLoading = Object.assign({}, state.urisLoading);
|
const newLoading = Object.assign({}, state.urisLoading);
|
||||||
|
@ -128,7 +127,7 @@ reducers[ACTIONS.LOADING_VIDEO_STARTED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.LOADING_VIDEO_FAILED] = function(state, action) {
|
reducers[ACTIONS.LOADING_VIDEO_FAILED] = (state, action) => {
|
||||||
const { uri } = action.data;
|
const { uri } = action.data;
|
||||||
|
|
||||||
const newLoading = Object.assign({}, state.urisLoading);
|
const newLoading = Object.assign({}, state.urisLoading);
|
||||||
|
@ -140,7 +139,7 @@ reducers[ACTIONS.LOADING_VIDEO_FAILED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_DATE] = function(state, action) {
|
reducers[ACTIONS.FETCH_DATE] = (state, action) => {
|
||||||
const { time } = action.data;
|
const { time } = action.data;
|
||||||
if (time) {
|
if (time) {
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
|
|
@ -14,7 +14,7 @@ const defaultState = {
|
||||||
stack: [],
|
stack: [],
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DAEMON_READY] = function(state) {
|
reducers[ACTIONS.DAEMON_READY] = state => {
|
||||||
const { currentPath } = state;
|
const { currentPath } = state;
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -22,11 +22,10 @@ reducers[ACTIONS.DAEMON_READY] = function(state) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.CHANGE_AFTER_AUTH_PATH] = function(state, action) {
|
reducers[ACTIONS.CHANGE_AFTER_AUTH_PATH] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
pathAfterAuth: action.data.path,
|
pathAfterAuth: action.data.path,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.HISTORY_NAVIGATE] = (state, action) => {
|
reducers[ACTIONS.HISTORY_NAVIGATE] = (state, action) => {
|
||||||
const { stack, index } = state;
|
const { stack, index } = state;
|
||||||
|
|
|
@ -9,13 +9,12 @@ const defaultState = {
|
||||||
claimErrorsByType: {},
|
claimErrorsByType: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_REWARDS_STARTED] = function(state) {
|
reducers[ACTIONS.FETCH_REWARDS_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
fetching: true,
|
fetching: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_REWARDS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_REWARDS_COMPLETED] = (state, action) => {
|
||||||
const { userRewards } = action.data;
|
const { userRewards } = action.data;
|
||||||
|
|
||||||
const unclaimedRewards = {};
|
const unclaimedRewards = {};
|
||||||
|
@ -55,13 +54,13 @@ function setClaimRewardState(state, reward, isClaiming, errorMessage = '') {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
reducers[ACTIONS.CLAIM_REWARD_STARTED] = function(state, action) {
|
reducers[ACTIONS.CLAIM_REWARD_STARTED] = (state, action) => {
|
||||||
const { reward } = action.data;
|
const { reward } = action.data;
|
||||||
|
|
||||||
return setClaimRewardState(state, reward, true, '');
|
return setClaimRewardState(state, reward, true, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.CLAIM_REWARD_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.CLAIM_REWARD_SUCCESS] = (state, action) => {
|
||||||
const { reward } = action.data;
|
const { reward } = action.data;
|
||||||
|
|
||||||
const unclaimedRewardsByType = Object.assign({}, state.unclaimedRewardsByType);
|
const unclaimedRewardsByType = Object.assign({}, state.unclaimedRewardsByType);
|
||||||
|
@ -83,13 +82,13 @@ reducers[ACTIONS.CLAIM_REWARD_SUCCESS] = function(state, action) {
|
||||||
return setClaimRewardState(newState, newReward, false, '');
|
return setClaimRewardState(newState, newReward, false, '');
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.CLAIM_REWARD_FAILURE] = function(state, action) {
|
reducers[ACTIONS.CLAIM_REWARD_FAILURE] = (state, action) => {
|
||||||
const { reward, error } = action.data;
|
const { reward, error } = action.data;
|
||||||
|
|
||||||
return setClaimRewardState(state, reward, false, error ? error.message : '');
|
return setClaimRewardState(state, reward, false, error ? error.message : '');
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.CLAIM_REWARD_CLEAR_ERROR] = function(state, action) {
|
reducers[ACTIONS.CLAIM_REWARD_CLEAR_ERROR] = (state, action) => {
|
||||||
const { reward } = action.data;
|
const { reward } = action.data;
|
||||||
|
|
||||||
return setClaimRewardState(state, reward, state.claimPendingByType[reward.reward_type], '');
|
return setClaimRewardState(state, reward, state.claimPendingByType[reward.reward_type], '');
|
||||||
|
|
|
@ -6,13 +6,12 @@ const defaultState = {
|
||||||
searching: false,
|
searching: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SEARCH_STARTED] = function(state) {
|
reducers[ACTIONS.SEARCH_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
searching: true,
|
searching: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SEARCH_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.SEARCH_COMPLETED] = (state, action) => {
|
||||||
const { query, uris } = action.data;
|
const { query, uris } = action.data;
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -21,11 +20,10 @@ reducers[ACTIONS.SEARCH_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SEARCH_CANCELLED] = function(state) {
|
reducers[ACTIONS.SEARCH_CANCELLED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
searching: false,
|
searching: false,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
export default function reducer(state = defaultState, action) {
|
export default function reducer(state = defaultState, action) {
|
||||||
const handler = reducers[action.type];
|
const handler = reducers[action.type];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as ACTIONS from 'constants/action_types';
|
import * as ACTIONS from 'constants/action_types';
|
||||||
import * as SETTINGS from 'constants/settings';
|
|
||||||
import LANGUAGES from 'constants/languages';
|
import LANGUAGES from 'constants/languages';
|
||||||
|
import * as SETTINGS from 'constants/settings';
|
||||||
|
|
||||||
function getLocalStorageSetting(setting, fallback) {
|
function getLocalStorageSetting(setting, fallback) {
|
||||||
const localStorageVal = localStorage.getItem(`setting_${setting}`);
|
const localStorageVal = localStorage.getItem(`setting_${setting}`);
|
||||||
|
@ -27,13 +27,12 @@ const defaultState = {
|
||||||
languages: {},
|
languages: {},
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DAEMON_SETTINGS_RECEIVED] = function(state, action) {
|
reducers[ACTIONS.DAEMON_SETTINGS_RECEIVED] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
daemonSettings: action.data.settings,
|
daemonSettings: action.data.settings,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CLIENT_SETTING_CHANGED] = function(state, action) {
|
reducers[ACTIONS.CLIENT_SETTING_CHANGED] = (state, action) => {
|
||||||
const { key, value } = action.data;
|
const { key, value } = action.data;
|
||||||
const clientSettings = Object.assign({}, state.clientSettings);
|
const clientSettings = Object.assign({}, state.clientSettings);
|
||||||
|
|
||||||
|
@ -47,7 +46,7 @@ reducers[ACTIONS.CLIENT_SETTING_CHANGED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOAD_LANGUAGE_SUCCEEDED] = function(state, action) {
|
reducers[ACTIONS.DOWNLOAD_LANGUAGE_SUCCEEDED] = (state, action) => {
|
||||||
const languages = Object.assign({}, state.languages);
|
const languages = Object.assign({}, state.languages);
|
||||||
const { language } = action.data;
|
const { language } = action.data;
|
||||||
|
|
||||||
|
@ -62,7 +61,7 @@ reducers[ACTIONS.DOWNLOAD_LANGUAGE_SUCCEEDED] = function(state, action) {
|
||||||
return Object.assign({}, state, { languages });
|
return Object.assign({}, state, { languages });
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.DOWNLOAD_LANGUAGE_FAILED] = function(state, action) {
|
reducers[ACTIONS.DOWNLOAD_LANGUAGE_FAILED] = (state, action) => {
|
||||||
const languages = Object.assign({}, state.languages);
|
const languages = Object.assign({}, state.languages);
|
||||||
delete languages[action.data.language];
|
delete languages[action.data.language];
|
||||||
return Object.assign({}, state, { languages });
|
return Object.assign({}, state, { languages });
|
||||||
|
|
|
@ -16,59 +16,52 @@ const defaultState = {
|
||||||
user: undefined,
|
user: undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.AUTHENTICATION_STARTED] = function(state) {
|
reducers[ACTIONS.AUTHENTICATION_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
authenticationIsPending: true,
|
authenticationIsPending: true,
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
user: defaultState.user,
|
user: defaultState.user,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.AUTHENTICATION_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.AUTHENTICATION_SUCCESS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
authenticationIsPending: false,
|
authenticationIsPending: false,
|
||||||
userIsPending: false,
|
userIsPending: false,
|
||||||
user: action.data.user,
|
user: action.data.user,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.AUTHENTICATION_FAILURE] = function(state) {
|
reducers[ACTIONS.AUTHENTICATION_FAILURE] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
authenticationIsPending: false,
|
authenticationIsPending: false,
|
||||||
userIsPending: false,
|
userIsPending: false,
|
||||||
user: null,
|
user: null,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_FETCH_STARTED] = function(state) {
|
reducers[ACTIONS.USER_FETCH_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
user: defaultState.user,
|
user: defaultState.user,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_FETCH_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.USER_FETCH_SUCCESS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
userIsPending: false,
|
userIsPending: false,
|
||||||
user: action.data.user,
|
user: action.data.user,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_FETCH_FAILURE] = function(state) {
|
reducers[ACTIONS.USER_FETCH_FAILURE] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
userIsPending: true,
|
userIsPending: true,
|
||||||
user: null,
|
user: null,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_STARTED] = function(state) {
|
reducers[ACTIONS.USER_EMAIL_NEW_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailNewIsPending: true,
|
emailNewIsPending: true,
|
||||||
emailNewErrorMessage: '',
|
emailNewErrorMessage: '',
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.USER_EMAIL_NEW_SUCCESS] = (state, action) => {
|
||||||
const user = Object.assign({}, state.user);
|
const user = Object.assign({}, state.user);
|
||||||
user.primary_email = action.data.email;
|
user.primary_email = action.data.email;
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -78,28 +71,25 @@ reducers[ACTIONS.USER_EMAIL_NEW_SUCCESS] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_EXISTS] = function(state, action) {
|
reducers[ACTIONS.USER_EMAIL_NEW_EXISTS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailToVerify: action.data.email,
|
emailToVerify: action.data.email,
|
||||||
emailNewIsPending: false,
|
emailNewIsPending: false,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_NEW_FAILURE] = function(state, action) {
|
reducers[ACTIONS.USER_EMAIL_NEW_FAILURE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailNewIsPending: false,
|
emailNewIsPending: false,
|
||||||
emailNewErrorMessage: action.data.error,
|
emailNewErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_STARTED] = function(state) {
|
reducers[ACTIONS.USER_EMAIL_VERIFY_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailVerifyIsPending: true,
|
emailVerifyIsPending: true,
|
||||||
emailVerifyErrorMessage: '',
|
emailVerifyErrorMessage: '',
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.USER_EMAIL_VERIFY_SUCCESS] = (state, action) => {
|
||||||
const user = Object.assign({}, state.user);
|
const user = Object.assign({}, state.user);
|
||||||
user.primary_email = action.data.email;
|
user.primary_email = action.data.email;
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -109,36 +99,32 @@ reducers[ACTIONS.USER_EMAIL_VERIFY_SUCCESS] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_EMAIL_VERIFY_FAILURE] = function(state, action) {
|
reducers[ACTIONS.USER_EMAIL_VERIFY_FAILURE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
emailVerifyIsPending: false,
|
emailVerifyIsPending: false,
|
||||||
emailVerifyErrorMessage: action.data.error,
|
emailVerifyErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_IDENTITY_VERIFY_STARTED] = function(state) {
|
reducers[ACTIONS.USER_IDENTITY_VERIFY_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
identityVerifyIsPending: true,
|
identityVerifyIsPending: true,
|
||||||
identityVerifyErrorMessage: '',
|
identityVerifyErrorMessage: '',
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_IDENTITY_VERIFY_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.USER_IDENTITY_VERIFY_SUCCESS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
identityVerifyIsPending: false,
|
identityVerifyIsPending: false,
|
||||||
identityVerifyErrorMessage: '',
|
identityVerifyErrorMessage: '',
|
||||||
user: action.data.user,
|
user: action.data.user,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_IDENTITY_VERIFY_FAILURE] = function(state, action) {
|
reducers[ACTIONS.USER_IDENTITY_VERIFY_FAILURE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
identityVerifyIsPending: false,
|
identityVerifyIsPending: false,
|
||||||
identityVerifyErrorMessage: action.data.error,
|
identityVerifyErrorMessage: action.data.error,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS] = (state, action) => {
|
||||||
const { token } = action.data;
|
const { token } = action.data;
|
||||||
|
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
|
@ -146,48 +132,42 @@ reducers[ACTIONS.FETCH_ACCESS_TOKEN_SUCCESS] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_STARTED] = function(state) {
|
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteStatusIsPending: true,
|
inviteStatusIsPending: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS] = function(state, action) {
|
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_SUCCESS] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteStatusIsPending: false,
|
inviteStatusIsPending: false,
|
||||||
invitesRemaining: action.data.invitesRemaining,
|
invitesRemaining: action.data.invitesRemaining,
|
||||||
invitees: action.data.invitees,
|
invitees: action.data.invitees,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_NEW_STARTED] = function(state) {
|
reducers[ACTIONS.USER_INVITE_NEW_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteNewIsPending: true,
|
inviteNewIsPending: true,
|
||||||
inviteNewErrorMessage: '',
|
inviteNewErrorMessage: '',
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_NEW_SUCCESS] = function(state) {
|
reducers[ACTIONS.USER_INVITE_NEW_SUCCESS] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteNewIsPending: false,
|
inviteNewIsPending: false,
|
||||||
inviteNewErrorMessage: '',
|
inviteNewErrorMessage: '',
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_NEW_FAILURE] = function(state, action) {
|
reducers[ACTIONS.USER_INVITE_NEW_FAILURE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteNewIsPending: false,
|
inviteNewIsPending: false,
|
||||||
inviteNewErrorMessage: action.data.error.message,
|
inviteNewErrorMessage: action.data.error.message,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_FAILURE] = function(state) {
|
reducers[ACTIONS.USER_INVITE_STATUS_FETCH_FAILURE] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
inviteStatusIsPending: false,
|
inviteStatusIsPending: false,
|
||||||
invitesRemaining: null,
|
invitesRemaining: null,
|
||||||
invitees: null,
|
invitees: null,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
export default function reducer(state = defaultState, action) {
|
export default function reducer(state = defaultState, action) {
|
||||||
const handler = reducers[action.type];
|
const handler = reducers[action.type];
|
||||||
|
|
|
@ -18,13 +18,12 @@ const defaultState = {
|
||||||
sendingSupport: false,
|
sendingSupport: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_TRANSACTIONS_STARTED] = function(state) {
|
reducers[ACTIONS.FETCH_TRANSACTIONS_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
fetchingTransactions: true,
|
fetchingTransactions: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_TRANSACTIONS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.FETCH_TRANSACTIONS_COMPLETED] = (state, action) => {
|
||||||
const byId = Object.assign({}, state.transactions);
|
const byId = Object.assign({}, state.transactions);
|
||||||
|
|
||||||
const { transactions } = action.data;
|
const { transactions } = action.data;
|
||||||
|
@ -39,13 +38,12 @@ reducers[ACTIONS.FETCH_TRANSACTIONS_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.GET_NEW_ADDRESS_STARTED] = function(state) {
|
reducers[ACTIONS.GET_NEW_ADDRESS_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
gettingNewAddress: true,
|
gettingNewAddress: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = function(state, action) {
|
reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = (state, action) => {
|
||||||
const { address } = action.data;
|
const { address } = action.data;
|
||||||
|
|
||||||
localStorage.setItem('receiveAddress', address);
|
localStorage.setItem('receiveAddress', address);
|
||||||
|
@ -55,25 +53,22 @@ reducers[ACTIONS.GET_NEW_ADDRESS_COMPLETED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.UPDATE_BALANCE] = function(state, action) {
|
reducers[ACTIONS.UPDATE_BALANCE] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
balance: action.data.balance,
|
balance: action.data.balance,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CHECK_ADDRESS_IS_MINE_STARTED] = function(state) {
|
reducers[ACTIONS.CHECK_ADDRESS_IS_MINE_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
checkingAddressOwnership: true,
|
checkingAddressOwnership: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.CHECK_ADDRESS_IS_MINE_COMPLETED] = function(state) {
|
reducers[ACTIONS.CHECK_ADDRESS_IS_MINE_COMPLETED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
checkingAddressOwnership: false,
|
checkingAddressOwnership: false,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SET_DRAFT_TRANSACTION_AMOUNT] = function(state, action) {
|
reducers[ACTIONS.SET_DRAFT_TRANSACTION_AMOUNT] = (state, action) => {
|
||||||
const oldDraft = state.draftTransaction;
|
const oldDraft = state.draftTransaction;
|
||||||
const newDraft = Object.assign({}, oldDraft, {
|
const newDraft = Object.assign({}, oldDraft, {
|
||||||
amount: parseFloat(action.data.amount),
|
amount: parseFloat(action.data.amount),
|
||||||
|
@ -84,7 +79,7 @@ reducers[ACTIONS.SET_DRAFT_TRANSACTION_AMOUNT] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SET_DRAFT_TRANSACTION_ADDRESS] = function(state, action) {
|
reducers[ACTIONS.SET_DRAFT_TRANSACTION_ADDRESS] = (state, action) => {
|
||||||
const oldDraft = state.draftTransaction;
|
const oldDraft = state.draftTransaction;
|
||||||
const newDraft = Object.assign({}, oldDraft, {
|
const newDraft = Object.assign({}, oldDraft, {
|
||||||
address: action.data.address,
|
address: action.data.address,
|
||||||
|
@ -95,7 +90,7 @@ reducers[ACTIONS.SET_DRAFT_TRANSACTION_ADDRESS] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SEND_TRANSACTION_STARTED] = function(state) {
|
reducers[ACTIONS.SEND_TRANSACTION_STARTED] = state => {
|
||||||
const newDraftTransaction = Object.assign({}, state.draftTransaction, {
|
const newDraftTransaction = Object.assign({}, state.draftTransaction, {
|
||||||
sending: true,
|
sending: true,
|
||||||
});
|
});
|
||||||
|
@ -105,13 +100,12 @@ reducers[ACTIONS.SEND_TRANSACTION_STARTED] = function(state) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SEND_TRANSACTION_COMPLETED] = function(state) {
|
reducers[ACTIONS.SEND_TRANSACTION_COMPLETED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
draftTransaction: buildDraftTransaction(),
|
draftTransaction: buildDraftTransaction(),
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SEND_TRANSACTION_FAILED] = function(state, action) {
|
reducers[ACTIONS.SEND_TRANSACTION_FAILED] = (state, action) => {
|
||||||
const newDraftTransaction = Object.assign({}, state.draftTransaction, {
|
const newDraftTransaction = Object.assign({}, state.draftTransaction, {
|
||||||
sending: false,
|
sending: false,
|
||||||
error: action.data.error,
|
error: action.data.error,
|
||||||
|
@ -122,24 +116,21 @@ reducers[ACTIONS.SEND_TRANSACTION_FAILED] = function(state, action) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
reducers[ACTIONS.SUPPORT_TRANSACTION_STARTED] = function(state) {
|
reducers[ACTIONS.SUPPORT_TRANSACTION_STARTED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
sendingSupport: true,
|
sendingSupport: true,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SUPPORT_TRANSACTION_COMPLETED] = function(state) {
|
reducers[ACTIONS.SUPPORT_TRANSACTION_COMPLETED] = state =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
sendingSupport: false,
|
sendingSupport: false,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.SUPPORT_TRANSACTION_FAILED] = function(state, action) {
|
reducers[ACTIONS.SUPPORT_TRANSACTION_FAILED] = (state, action) =>
|
||||||
return Object.assign({}, state, {
|
Object.assign({}, state, {
|
||||||
error: action.data.error,
|
error: action.data.error,
|
||||||
sendingSupport: false,
|
sendingSupport: false,
|
||||||
});
|
});
|
||||||
};
|
|
||||||
|
|
||||||
reducers[ACTIONS.FETCH_BLOCK_SUCCESS] = (state, action) => {
|
reducers[ACTIONS.FETCH_BLOCK_SUCCESS] = (state, action) => {
|
||||||
const { block, block: { height } } = action.data;
|
const { block, block: { height } } = action.data;
|
||||||
|
|
|
@ -58,8 +58,6 @@ export const selectUpgradeDownloadItem = createSelector(selectState, state => st
|
||||||
|
|
||||||
export const selectModalProps = createSelector(selectState, state => state.modalProps);
|
export const selectModalProps = createSelector(selectState, state => state.modalProps);
|
||||||
|
|
||||||
export const selectDaemonReady = createSelector(selectState, state => state.daemonReady);
|
|
||||||
|
|
||||||
export const selectDaemonVersionMatched = createSelector(
|
export const selectDaemonVersionMatched = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => state.daemonVersionMatched
|
state => state.daemonVersionMatched
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import Lbryuri from 'lbryuri';
|
import Lbryuri from 'lbryuri';
|
||||||
import { makeSelectCurrentParam } from 'redux/selectors/navigation';
|
import { makeSelectCurrentParam } from 'redux/selectors/navigation';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
const selectState = state => state.claims || {};
|
const selectState = state => state.claims || {};
|
||||||
|
|
||||||
|
@ -19,9 +19,7 @@ export const selectClaimsByUri = createSelector(selectState, selectClaimsById, (
|
||||||
if (claimId === null) {
|
if (claimId === null) {
|
||||||
claims[uri] = null;
|
claims[uri] = null;
|
||||||
} else {
|
} else {
|
||||||
const claim = byId[claimId];
|
claims[uri] = byId[claimId];
|
||||||
|
|
||||||
claims[uri] = claim;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -94,8 +92,7 @@ export const makeSelectMetadataForUri = uri =>
|
||||||
createSelector(makeSelectClaimForUri(uri), claim => {
|
createSelector(makeSelectClaimForUri(uri), claim => {
|
||||||
const metadata = claim && claim.value && claim.value.stream && claim.value.stream.metadata;
|
const metadata = claim && claim.value && claim.value.stream && claim.value.stream.metadata;
|
||||||
|
|
||||||
const value = metadata || (claim === undefined ? undefined : null);
|
return metadata || (claim === undefined ? undefined : null);
|
||||||
return value;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const makeSelectTitleForUri = uri =>
|
export const makeSelectTitleForUri = uri =>
|
||||||
|
@ -109,7 +106,7 @@ export const makeSelectContentTypeForUri = uri =>
|
||||||
|
|
||||||
export const selectIsFetchingClaimListMine = createSelector(
|
export const selectIsFetchingClaimListMine = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => !!state.isFetchingClaimListMine
|
state => state.isFetchingClaimListMine
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectPendingClaims = createSelector(selectState, state =>
|
export const selectPendingClaims = createSelector(selectState, state =>
|
||||||
|
@ -154,7 +151,7 @@ export const selectMyClaimsOutpoints = createSelector(selectMyClaims, myClaims =
|
||||||
|
|
||||||
export const selectFetchingMyChannels = createSelector(
|
export const selectFetchingMyChannels = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => !!state.fetchingMyChannels
|
state => state.fetchingMyChannels
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectMyChannelClaims = createSelector(
|
export const selectMyChannelClaims = createSelector(
|
||||||
|
|
|
@ -6,7 +6,7 @@ export const selectFeaturedUris = createSelector(selectState, state => state.fea
|
||||||
|
|
||||||
export const selectFetchingFeaturedUris = createSelector(
|
export const selectFetchingFeaturedUris = createSelector(
|
||||||
selectState,
|
selectState,
|
||||||
state => !!state.fetchingFeaturedContent
|
state => state.fetchingFeaturedContent
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectResolvingUris = createSelector(selectState, state => state.resolvingUris || []);
|
export const selectResolvingUris = createSelector(selectState, state => state.resolvingUris || []);
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import {
|
import {
|
||||||
selectClaimsByUri,
|
selectClaimsByUri,
|
||||||
selectIsFetchingClaimListMine,
|
selectIsFetchingClaimListMine,
|
||||||
selectMyClaims,
|
selectMyClaims,
|
||||||
selectMyClaimsOutpoints,
|
|
||||||
} from 'redux/selectors/claims';
|
} from 'redux/selectors/claims';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
export const selectState = state => state.fileInfo || {};
|
export const selectState = state => state.fileInfo || {};
|
||||||
|
|
||||||
|
@ -52,10 +51,6 @@ export const selectUrisLoading = createSelector(selectState, state => state.uris
|
||||||
export const makeSelectLoadingForUri = uri =>
|
export const makeSelectLoadingForUri = uri =>
|
||||||
createSelector(selectUrisLoading, byUri => byUri && byUri[uri]);
|
createSelector(selectUrisLoading, byUri => byUri && byUri[uri]);
|
||||||
|
|
||||||
export const selectFileInfosPendingPublish = createSelector(selectState, state =>
|
|
||||||
Object.values(state.pendingByOutpoint || {})
|
|
||||||
);
|
|
||||||
|
|
||||||
export const selectFileInfosDownloaded = createSelector(
|
export const selectFileInfosDownloaded = createSelector(
|
||||||
selectFileInfosByOutpoint,
|
selectFileInfosByOutpoint,
|
||||||
selectMyClaims,
|
selectMyClaims,
|
||||||
|
@ -71,20 +66,6 @@ export const selectFileInfosDownloaded = createSelector(
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectFileInfosPublished = createSelector(
|
|
||||||
selectFileInfosByOutpoint,
|
|
||||||
selectMyClaimsOutpoints,
|
|
||||||
selectFileInfosPendingPublish,
|
|
||||||
(byOutpoint, outpoints, pendingPublish) => {
|
|
||||||
const fileInfos = [];
|
|
||||||
outpoints.forEach(outpoint => {
|
|
||||||
const fileInfo = byOutpoint[outpoint];
|
|
||||||
if (fileInfo) fileInfos.push(fileInfo);
|
|
||||||
});
|
|
||||||
return [...fileInfos, ...pendingPublish];
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// export const selectFileInfoForUri = (state, props) => {
|
// export const selectFileInfoForUri = (state, props) => {
|
||||||
// const claims = selectClaimsByUri(state),
|
// const claims = selectClaimsByUri(state),
|
||||||
// claim = claims[props.uri],
|
// claim = claims[props.uri],
|
||||||
|
@ -94,26 +75,6 @@ export const selectFileInfosPublished = createSelector(
|
||||||
// return outpoint && fileInfos ? fileInfos[outpoint] : undefined;
|
// return outpoint && fileInfos ? fileInfos[outpoint] : undefined;
|
||||||
// };
|
// };
|
||||||
|
|
||||||
export const selectFileInfosByUri = createSelector(
|
|
||||||
selectClaimsByUri,
|
|
||||||
selectFileInfosByOutpoint,
|
|
||||||
(claimsByUri, byOutpoint) => {
|
|
||||||
const fileInfos = {};
|
|
||||||
const uris = Object.keys(claimsByUri);
|
|
||||||
|
|
||||||
uris.forEach(uri => {
|
|
||||||
const claim = claimsByUri[uri];
|
|
||||||
if (claim) {
|
|
||||||
const outpoint = `${claim.txid}:${claim.nout}`;
|
|
||||||
const fileInfo = byOutpoint[outpoint];
|
|
||||||
|
|
||||||
if (fileInfo) fileInfos[uri] = fileInfo;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return fileInfos;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
export const selectDownloadingFileInfos = createSelector(
|
export const selectDownloadingFileInfos = createSelector(
|
||||||
selectDownloadingByOutpoint,
|
selectDownloadingByOutpoint,
|
||||||
selectFileInfosByOutpoint,
|
selectFileInfosByOutpoint,
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import { createSelector } from 'reselect';
|
|
||||||
import {
|
import {
|
||||||
selectPageTitle,
|
|
||||||
selectCurrentPage,
|
selectCurrentPage,
|
||||||
selectCurrentParams,
|
selectCurrentParams,
|
||||||
|
selectPageTitle,
|
||||||
} from 'redux/selectors/navigation';
|
} from 'redux/selectors/navigation';
|
||||||
|
import { createSelector } from 'reselect';
|
||||||
|
|
||||||
export const selectState = state => state.search || {};
|
export const selectState = state => state.search || {};
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ export const selectSearchQuery = createSelector(
|
||||||
(page, params) => (page === 'search' ? params && params.query : null)
|
(page, params) => (page === 'search' ? params && params.query : null)
|
||||||
);
|
);
|
||||||
|
|
||||||
export const selectIsSearching = createSelector(selectState, state => !!state.searching);
|
export const selectIsSearching = createSelector(selectState, state => state.searching);
|
||||||
|
|
||||||
export const selectSearchUrisByQuery = createSelector(selectState, state => state.urisByQuery);
|
export const selectSearchUrisByQuery = createSelector(selectState, state => state.urisByQuery);
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,6 @@ export const selectClientSettings = createSelector(
|
||||||
export const makeSelectClientSetting = setting =>
|
export const makeSelectClientSetting = setting =>
|
||||||
createSelector(selectClientSettings, settings => (settings ? settings[setting] : undefined));
|
createSelector(selectClientSettings, settings => (settings ? settings[setting] : undefined));
|
||||||
|
|
||||||
export const selectSettingsIsGenerous = createSelector(
|
|
||||||
selectDaemonSettings,
|
|
||||||
settings => settings && settings.is_generous_host
|
|
||||||
);
|
|
||||||
|
|
||||||
// refactor me
|
// refactor me
|
||||||
export const selectShowNsfw = makeSelectClientSetting(SETTINGS.SHOW_NSFW);
|
export const selectShowNsfw = makeSelectClientSetting(SETTINGS.SHOW_NSFW);
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ rewards.SORT_ORDER = [
|
||||||
rewards.TYPE_NEW_DEVELOPER,
|
rewards.TYPE_NEW_DEVELOPER,
|
||||||
];
|
];
|
||||||
|
|
||||||
rewards.claimReward = function(type) {
|
rewards.claimReward = type => {
|
||||||
function requestReward(resolve, reject, params) {
|
function requestReward(resolve, reject, params) {
|
||||||
if (!Lbryio.enabled) {
|
if (!Lbryio.enabled) {
|
||||||
reject(new Error(__('Rewards are not enabled.')));
|
reject(new Error(__('Rewards are not enabled.')));
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
const { remote } = require('electron');
|
import { remote } from 'electron';
|
||||||
|
|
||||||
const application = remote.app;
|
const application = remote.app;
|
||||||
const { dock } = application;
|
const { dock } = application;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// these don't need to be exact
|
// these don't need to be exact
|
||||||
// shapeshift does a more thourough check on validity
|
// Shapeshift does a more thorough check on validity
|
||||||
// just general matches to prevent unneccesary api calls
|
// just general matches to prevent unnecessary api calls
|
||||||
export const coinRegexPatterns = {
|
export const coinRegexPatterns = {
|
||||||
BTC: /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/,
|
BTC: /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/,
|
||||||
BCH: /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/,
|
BCH: /^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$/,
|
||||||
|
|
|
@ -14,7 +14,7 @@ export default function throttle(func, wait, options = {}) {
|
||||||
let previous = 0;
|
let previous = 0;
|
||||||
const getNow = () => new Date().getTime();
|
const getNow = () => new Date().getTime();
|
||||||
|
|
||||||
const later = function() {
|
const later = () => {
|
||||||
previous = options.leading === false ? 0 : getNow();
|
previous = options.leading === false ? 0 : getNow();
|
||||||
timeout = null;
|
timeout = null;
|
||||||
result = func.apply(context, args);
|
result = func.apply(context, args);
|
||||||
|
@ -24,7 +24,7 @@ export default function throttle(func, wait, options = {}) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const throttled = function(...funcArgs) {
|
const throttled = function throttled(...funcArgs) {
|
||||||
const now = getNow();
|
const now = getNow();
|
||||||
|
|
||||||
if (!previous && options.leading === false) previous = now;
|
if (!previous && options.leading === false) previous = now;
|
||||||
|
@ -53,7 +53,7 @@ export default function throttle(func, wait, options = {}) {
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
throttled.cancel = function() {
|
throttled.cancel = () => {
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
previous = 0;
|
previous = 0;
|
||||||
timeout = null;
|
timeout = null;
|
||||||
|
|
Why did you take out this section? I don't see any explanation for how people are supposed to do ongoing dev
ah nvm i see that its in contributing.md, but I think its still worth mentioning in this doc