Merge pull request #865 from lbryio/issue/839

Fix error on settings page on development
This commit is contained in:
Liam Cardenas 2017-12-12 14:41:00 -08:00 committed by GitHub
commit 839835e89f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 31 additions and 35 deletions

View file

@ -84,7 +84,7 @@ fi
if ! cmd_exists node; then
if $LINUX; then
curl -sL https://deb.nodesource.com/setup_7.x | $SUDO -E bash -
curl -sL https://deb.nodesource.com/setup_8.x | $SUDO -E bash -
$INSTALL nodejs
elif $OSX; then
brew install node

View file

@ -2,12 +2,18 @@
"name": "LBRY",
"version": "0.19.1rc1",
"description": "A browser for the LBRY network, a digital marketplace controlled by its users.",
"homepage": "https://lbry.io/",
"bugs": {
"url": "https://github.com/lbryio/lbry-app/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/lbryio/lbry-app"
},
"author": {
"name": "LBRY Inc.",
"email": "hello@lbry.io"
},
"homepage": "https://lbry.io/",
"license": "MIT",
"scripts": {
"extract-langs": "node src/renderer/extractLocals.js",
"dev": "electron-webpack dev",
@ -17,14 +23,7 @@
"postinstall": "electron-builder install-app-deps",
"precommit": "lint-staged"
},
"main": "src/main/main.js",
"repository": {
"type": "git",
"url": "https://github.com/lbryio/lbry-app"
},
"bugs": {
"url": "https://github.com/lbryio/lbry-app/issues"
},
"main": "src/main/index.js",
"keywords": [
"lbry"
],
@ -94,6 +93,11 @@
"resolutions": {
"webpack/webpack-sources": "1.0.1"
},
"engines": {
"node": ">=6",
"yarn": "^1.3"
},
"license": "MIT",
"lint-staged": {
"src/**/*.{js,jsx}": [
"prettier --trailing-comma es5 --write",

View file

@ -1,5 +1,5 @@
const { app, shell, Menu } = require('electron');
const { safeQuit } = require('../main.js');
const { safeQuit } = require('../index.js');
const baseTemplate = [
{

View file

@ -5,7 +5,7 @@ import { CreditAmount } from "component/common";
type Props = {
unclaimedRewardAmount: number,
}
};
const RewardSummary = (props: Props) => {
const { unclaimedRewardAmount } = props;
@ -19,11 +19,15 @@ const RewardSummary = (props: Props) => {
{unclaimedRewardAmount > 0 ? (
<p>
{__("You have")}{" "}
<CreditAmount amount={unclaimedRewardAmount} precision={8} />
{" "}{__("in unclaimed rewards")}.
<CreditAmount amount={unclaimedRewardAmount} precision={8} />{" "}
{__("in unclaimed rewards")}.
</p>
) : (
<p>{__("There are no rewards available at this time, please check back later")}.</p>
<p>
{__(
"There are no rewards available at this time, please check back later"
)}.
</p>
)}
</div>
<div className="card__actions">

View file

@ -7,10 +7,6 @@ import lbry from "lbry";
import fs from "fs";
import http from "http";
const { remote } = require("electron");
const { extname } = require("path");
const { readdir } = remote.require("fs");
export function doFetchDaemonSettings() {
return function(dispatch, getState) {
lbry.settings_get().then(settings => {
@ -52,22 +48,14 @@ export function doSetClientSetting(key, value) {
export function doGetThemes() {
return function(dispatch, getState) {
const dir = `${staticResourcesPath}/themes`;
const themes = ["light", "dark"];
dispatch(
doSetClientSetting(
settings.THEMES,
themes
)
);
readdir(dir, (error, files) => {
if (!error) {
dispatch(
doSetClientSetting(
settings.THEMES,
files
.filter(file => extname(file) === ".css")
.map(file => file.replace(".css", ""))
)
);
} else {
dispatch(doAlertError(error));
}
});
};
}