Skip to content

Commit

Permalink
fix: default Open WebUI at Launch to true (#1757)
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuart Nelson committed Feb 11, 2021
1 parent 3c69d4c commit 2754f25
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/webui/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const os = require('os')
const openExternal = require('./open-external')
const logger = require('../common/logger')
const store = require('../common/store')
const { IS_MAC, IS_WIN } = require('../common/consts')
const dock = require('../utils/dock')
const { VERSION, ELECTRON_VERSION } = require('../common/consts')
const createToggler = require('../utils/create-toggler')
Expand Down Expand Up @@ -77,11 +76,12 @@ const apiOrigin = (apiMultiaddr) => {

module.exports = async function (ctx) {
if (store.get(CONFIG_KEY, null) === null) {
// First time running this. If it's not macOS, nor Windows,
// enable opening ipfs-webui at app launch.
// This is the best we can do to mitigate Tray issues on Linux:
// https://github.com/ipfs-shipyard/ipfs-desktop/issues/1153
store.set(CONFIG_KEY, !IS_MAC && !IS_WIN)
// First time running this. Enable opening ipfs-webui at app launch.
// This accounts for users on OSes who may have extensions for
// decluttering system menus/trays, and thus have no initial "way in" to
// Desktop upon install:
// https://github.com/ipfs-shipyard/ipfs-desktop/issues/1741
store.set(CONFIG_KEY, true)
}

createToggler(CONFIG_KEY, async ({ newValue }) => {
Expand Down

0 comments on commit 2754f25

Please sign in to comment.