remove "showDeveloperMenu" as a setting
This commit is contained in:
parent
4a23d13438
commit
5c8db79b69
3 changed files with 1 additions and 47 deletions
|
@ -37,7 +37,6 @@ let lbry = {
|
|||
debug: false,
|
||||
useCustomLighthouseServers: false,
|
||||
customLighthouseServers: [],
|
||||
showDeveloperMenu: false,
|
||||
language: "en",
|
||||
theme: "light",
|
||||
themes: [],
|
||||
|
@ -230,9 +229,6 @@ lbry.publishDeprecated = function(
|
|||
|
||||
lbry.getClientSetting = function(setting) {
|
||||
var localStorageVal = localStorage.getItem("setting_" + setting);
|
||||
if (setting == "showDeveloperMenu") {
|
||||
return true;
|
||||
}
|
||||
return localStorageVal === null
|
||||
? lbry.defaultClientSettings[setting]
|
||||
: JSON.parse(localStorageVal);
|
||||
|
@ -242,13 +238,6 @@ lbry.setClientSetting = function(setting, value) {
|
|||
return localStorage.setItem("setting_" + setting, JSON.stringify(value));
|
||||
};
|
||||
|
||||
lbry.formatName = function(name) {
|
||||
// Converts LBRY name to standard format (all lower case, no special characters, spaces replaced by dashes)
|
||||
name = name.replace("/s+/g", "-");
|
||||
name = name.toLowerCase().replace(lbryuri.REGEXP_INVALID_URI, "");
|
||||
return name;
|
||||
};
|
||||
|
||||
lbry.imagePath = function(file) {
|
||||
return "img/" + file;
|
||||
};
|
||||
|
@ -279,17 +268,6 @@ lbry.getMediaType = function(contentType, fileName) {
|
|||
}
|
||||
};
|
||||
|
||||
lbry.showMenuIfNeeded = function() {
|
||||
const showingMenu = sessionStorage.getItem("menuShown") || null;
|
||||
const chosenMenu = lbry.getClientSetting("showDeveloperMenu")
|
||||
? "developer"
|
||||
: "normal";
|
||||
if (chosenMenu != showingMenu) {
|
||||
menu.showMenubar(chosenMenu == "developer");
|
||||
}
|
||||
sessionStorage.setItem("menuShown", chosenMenu);
|
||||
};
|
||||
|
||||
lbry.getAppVersionInfo = function() {
|
||||
return new Promise((resolve, reject) => {
|
||||
ipcRenderer.once("version-info-received", (event, versionInfo) => {
|
||||
|
|
|
@ -16,14 +16,12 @@ const { remote, ipcRenderer, shell } = require("electron");
|
|||
const contextMenu = remote.require("./menu/context-menu");
|
||||
const app = require("./app");
|
||||
|
||||
lbry.showMenuIfNeeded();
|
||||
|
||||
window.addEventListener("contextmenu", event => {
|
||||
contextMenu.showContextMenu(
|
||||
remote.getCurrentWindow(),
|
||||
event.x,
|
||||
event.y,
|
||||
lbry.getClientSetting("showDeveloperMenu")
|
||||
env === "development"
|
||||
);
|
||||
event.preventDefault();
|
||||
});
|
||||
|
|
|
@ -11,7 +11,6 @@ class DeveloperPage extends React.PureComponent {
|
|||
super(props);
|
||||
|
||||
this.state = {
|
||||
showDeveloperMenu: lbry.getClientSetting("showDeveloperMenu"),
|
||||
useCustomLighthouseServers: lbry.getClientSetting(
|
||||
"useCustomLighthouseServers"
|
||||
),
|
||||
|
@ -22,14 +21,6 @@ class DeveloperPage extends React.PureComponent {
|
|||
};
|
||||
}
|
||||
|
||||
handleShowDeveloperMenuChange(event) {
|
||||
lbry.setClientSetting("showDeveloperMenu", event.target.checked);
|
||||
lbry.showMenuIfNeeded();
|
||||
this.setState({
|
||||
showDeveloperMenu: event.target.checked,
|
||||
});
|
||||
}
|
||||
|
||||
handleUseCustomLighthouseServersChange(event) {
|
||||
lbry.setClientSetting("useCustomLighthouseServers", event.target.checked);
|
||||
this.setState({
|
||||
|
@ -71,19 +62,6 @@ class DeveloperPage extends React.PureComponent {
|
|||
<main>
|
||||
<section className="card">
|
||||
<h3>{__("Developer Settings")}</h3>
|
||||
<div className="form-row">
|
||||
<label>
|
||||
<FormField
|
||||
type="checkbox"
|
||||
onChange={event => {
|
||||
this.handleShowDeveloperMenuChange();
|
||||
}}
|
||||
checked={this.state.showDeveloperMenu}
|
||||
/>
|
||||
{" "}
|
||||
{__("Show developer menu")}
|
||||
</label>
|
||||
</div>
|
||||
<div className="form-row">
|
||||
<label>
|
||||
<FormField
|
||||
|
|
Loading…
Reference in a new issue