1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-23 10:32:29 +03:00

build fix

This commit is contained in:
Eugene Pankov 2018-08-10 11:01:13 +02:00
parent 0e86894d81
commit 0b56259a36
5 changed files with 31 additions and 12 deletions

View File

@ -11,7 +11,7 @@ html
style#custom-css
style.
body { transition: 0.5s background; }
body(style='min-height: 100vh; overflow: hidden')
body
app-root
.preload-logo
div

View File

@ -30,6 +30,15 @@ if (!process.env.TERMINUS_PLUGINS) {
process.env.TERMINUS_PLUGINS = ''
}
setWindowVibrancy = (enabled) => {
if (enabled && !app.window.vibrancyViewID) {
app.window.vibrancyViewID = electronVibrancy.SetVibrancy(app.window, 0)
} else if (!enabled && app.window.vibrancyViewID) {
electronVibrancy.RemoveView(app.window, app.window.vibrancyViewID)
app.window.vibrancyViewID = null
}
}
setupWindowManagement = () => {
app.window.on('show', () => {
app.window.webContents.send('host:window-shown')
@ -89,12 +98,7 @@ setupWindowManagement = () => {
})
electron.ipcMain.on('window-set-vibrancy', (event, enabled) => {
if (enabled && !app.window.vibrancyViewID) {
app.window.vibrancyViewID = electronVibrancy.SetVibrancy(app.window, 0)
} else if (!enabled && app.window.vibrancyViewID) {
electronVibrancy.RemoveView(app.window, app.window.vibrancyViewID)
app.window.vibrancyViewID = null
}
setWindowVibrancy(enabled)
})
}
@ -225,7 +229,7 @@ start = () => {
title: 'Terminus',
minWidth: 400,
minHeight: 300,
'web-preferences': {'web-security': false},
webPreferences: {webSecurity: false},
//- background to avoid the flash of unstyled window
backgroundColor: '#131d27',
frame: false,
@ -250,6 +254,11 @@ start = () => {
app.window = new electron.BrowserWindow(options)
app.window.once('ready-to-show', () => {
if (process.platform == 'darwin') {
app.window.setVibrancy('dark')
} else if (process.platform == 'windows') {
setWindowVibrancy(true)
}
app.window.show()
app.window.focus()
})

View File

@ -66,3 +66,9 @@
[ngbradiogroup] input[type="radio"] {
display: none;
}
body {
min-height: 100vh;
overflow: hidden;
background: rgba(0,0,0,.4);
}

View File

@ -9,7 +9,7 @@
"core-js": "2.4.1",
"cross-env": "4.0.0",
"css-loader": "0.28.0",
"electron": "2.0.0",
"electron": "2.0.7",
"electron-builder": "^20.27.1",
"electron-builder-squirrel-windows": "17.0.1",
"electron-rebuild": "^1.8.2",
@ -53,6 +53,10 @@
"appId": "org.terminus",
"productName": "Terminus",
"compression": "normal",
"files": [
"**/*",
"dist"
],
"extraResources": [
"builtin-plugins",
"clink"

View File

@ -2615,9 +2615,9 @@ electron-to-chromium@^1.2.7:
version "1.3.31"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f"
electron@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.0.tgz#e95dc7f3a089a52b8c2a52c7c9e1024db0c8d46e"
electron@^2.0.7:
version "2.0.7"
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.7.tgz#f7ce410433298e319032ce31f0e6ffd709ff052c"
dependencies:
"@types/node" "^8.0.24"
electron-download "^3.0.1"