mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
if (process.platform == 'win32' && require('electron-squirrel-startup')) process.exit(0)
|
||||
|
||||
const electron = require('electron')
|
||||
require('electron-debug')({enabled: true, showDevTools: (process.argv.indexOf('--debug') != -1) ? 'undocked' : false})
|
||||
|
||||
@@ -18,7 +20,6 @@ const yaml = require('js-yaml')
|
||||
const path = require('path')
|
||||
const fs = require('fs')
|
||||
const Config = require('electron-config')
|
||||
const platform = require('os').platform()
|
||||
require('electron-debug')({enabled: true, showDevTools: process.argv.indexOf('--debug') != -1})
|
||||
let windowConfig = new Config({name: 'window'})
|
||||
|
||||
@@ -162,7 +163,7 @@ start = () => {
|
||||
if ((configData.appearance || {}).frame == 'native') {
|
||||
options.frame = true
|
||||
} else {
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
options.titleBarStyle = 'hidden-inset'
|
||||
}
|
||||
}
|
||||
@@ -172,7 +173,7 @@ start = () => {
|
||||
app.window = new electron.BrowserWindow(options)
|
||||
app.window.loadURL(`file://${app.getAppPath()}/dist/index.html`, {extraHeaders: "pragma: no-cache\n"})
|
||||
|
||||
if (platform != 'darwin') {
|
||||
if (process.platform != 'darwin') {
|
||||
app.window.setMenu(null)
|
||||
}
|
||||
|
||||
@@ -181,7 +182,7 @@ start = () => {
|
||||
|
||||
setupWindowManagement()
|
||||
|
||||
if (platform == 'darwin') {
|
||||
if (process.platform == 'darwin') {
|
||||
setupMenu()
|
||||
} else {
|
||||
app.window.setMenu(null)
|
||||
|
@@ -20,6 +20,7 @@
|
||||
"electron-config": "0.2.1",
|
||||
"electron-debug": "^1.0.1",
|
||||
"electron-is-dev": "0.1.2",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"fs-promise": "^2.0.2",
|
||||
"js-yaml": "3.8.2",
|
||||
"path": "0.12.7",
|
||||
|
Reference in New Issue
Block a user