diff --git a/ui/js/component/router/view.jsx b/ui/js/component/router/view.jsx index 57f9630c2..ed3c5f7bf 100644 --- a/ui/js/component/router/view.jsx +++ b/ui/js/component/router/view.jsx @@ -8,7 +8,6 @@ import SendCreditsPage from "page/sendCredits"; import ShowPage from "page/show"; import PublishPage from "page/publish"; import DiscoverPage from "page/discover"; -import DeveloperPage from "page/developer.js"; import RewardsPage from "page/rewards"; import FileListDownloaded from "page/fileListDownloaded"; import FileListPublished from "page/fileListPublished"; @@ -32,7 +31,6 @@ const Router = props => { auth: , backup: , channel: , - developer: , discover: , downloaded: , help: , diff --git a/ui/js/page/developer.js b/ui/js/page/developer.js deleted file mode 100644 index 34005b3e3..000000000 --- a/ui/js/page/developer.js +++ /dev/null @@ -1,75 +0,0 @@ -import lbry from "../lbry.js"; -import React from "react"; -import FormField from "component/formField"; -import Link from "../component/link"; - -const fs = require("fs"); -const { ipcRenderer } = require("electron"); - -class DeveloperPage extends React.PureComponent { - constructor(props) { - super(props); - - this.state = { - upgradePath: "", - }; - } - - handleUpgradeFileChange(event) { - this.setState({ - upgradePath: event.target.value, - }); - } - - handleForceUpgradeClick() { - let upgradeSent = false; - if (!this.state.upgradePath) { - alert(__("Please select a file to upgrade from")); - } else { - try { - const stats = fs.lstatSync(this.state.upgradePath); - if (stats.isFile()) { - console.log("Starting upgrade using " + this.state.upgradePath); - ipcRenderer.send("upgrade", this.state.upgradePath); - upgradeSent = true; - } - } catch (e) {} - if (!upgradeSent) { - alert( - 'Failed to start upgrade. Is "' + - this.state.upgradePath + - '" a valid path to the upgrade?' - ); - } - } - } - - render() { - return ( - - - - { - this.handleUpgradeFileChange(); - }} - /> - - { - this.handleForceUpgradeClick(); - }} - /> - - - - ); - } -} - -export default DeveloperPage; diff --git a/ui/js/reducers/settings.js b/ui/js/reducers/settings.js index 7a3248d4e..784b6aa8f 100644 --- a/ui/js/reducers/settings.js +++ b/ui/js/reducers/settings.js @@ -46,6 +46,7 @@ reducers[types.CLIENT_SETTING_CHANGED] = function(state, action) { clientSettings[key] = value; + //this technically probably shouldn't happen here, and should be fixed when we're no longer using localStorage at all for persistent app state localStorage.setItem("setting_" + key, JSON.stringify(value)); return Object.assign({}, state, { diff --git a/ui/scss/all.scss b/ui/scss/all.scss index 69656fa41..513b650d1 100644 --- a/ui/scss/all.scss +++ b/ui/scss/all.scss @@ -21,5 +21,4 @@ @import "component/_video.scss"; @import "component/_pagination.scss"; @import "component/_markdown-editor.scss"; -@import "page/_developer.scss"; @import "page/_show.scss"; diff --git a/ui/scss/page/_developer.scss b/ui/scss/page/_developer.scss deleted file mode 100644 index 1a3a118d6..000000000 --- a/ui/scss/page/_developer.scss +++ /dev/null @@ -1,5 +0,0 @@ -.developer-page__custom-lighthouse-servers { - font: 0.8em monospace; - width: 30em; - height: 10em; -} \ No newline at end of file