Skip to content

Commit

Permalink
Remove devtools
Browse files Browse the repository at this point in the history
  • Loading branch information
stockhuman committed Jan 28, 2021
1 parent 3888f81 commit cd3ae9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 5 additions & 4 deletions desktop/src/Components/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ class Config {

locale = locale ? locale.toLowerCase() : 'en'

if (store == 'local') window.store = 'local'
if (!APIurl) window.store = 'local'
if (window.store == 'local') {
localStorage.setItem('store', 'local')
if (!APIurl && (store != 'local')) {
window.location.assign('setup.html')
return
}

window.store = store
window.api = APIurl // CRUD endpoint URL
window.dob = dateOfBirth // used to calculate jars icon
window.motto = motto // flair
Expand All @@ -33,6 +33,7 @@ class Config {
localStorage.setItem('api', APIurl)
localStorage.setItem('dob', dateOfBirth)
localStorage.setItem('locale', locale)
localStorage.setItem('store', store)

// function also creates css from css key in LS
let s = document.createElement('style')
Expand Down
7 changes: 3 additions & 4 deletions desktop/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { app, BrowserWindow } = require('electron');
const path = require('path')
const { app, BrowserWindow } = require('electron')

// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
Expand All @@ -24,7 +23,7 @@ const createWindow = () => {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
devTools: true
devTools: false,
},
})

Expand All @@ -36,7 +35,7 @@ const createWindow = () => {
})

// Open the DevTools.
mainWindow.webContents.openDevTools()
// mainWindow.webContents.openDevTools()

// Emitted when the window is closed.
mainWindow.on('closed', () => {
Expand Down

0 comments on commit cd3ae9b

Please sign in to comment.