mirror of
https://github.com/Eugeny/tabby
synced 2024-12-13 06:42:44 +00:00
build fix
This commit is contained in:
parent
0e86894d81
commit
0b56259a36
5 changed files with 31 additions and 12 deletions
|
@ -11,7 +11,7 @@ html
|
||||||
style#custom-css
|
style#custom-css
|
||||||
style.
|
style.
|
||||||
body { transition: 0.5s background; }
|
body { transition: 0.5s background; }
|
||||||
body(style='min-height: 100vh; overflow: hidden')
|
body
|
||||||
app-root
|
app-root
|
||||||
.preload-logo
|
.preload-logo
|
||||||
div
|
div
|
||||||
|
|
23
app/main.js
23
app/main.js
|
@ -30,6 +30,15 @@ if (!process.env.TERMINUS_PLUGINS) {
|
||||||
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 = () => {
|
setupWindowManagement = () => {
|
||||||
app.window.on('show', () => {
|
app.window.on('show', () => {
|
||||||
app.window.webContents.send('host:window-shown')
|
app.window.webContents.send('host:window-shown')
|
||||||
|
@ -89,12 +98,7 @@ setupWindowManagement = () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
electron.ipcMain.on('window-set-vibrancy', (event, enabled) => {
|
electron.ipcMain.on('window-set-vibrancy', (event, enabled) => {
|
||||||
if (enabled && !app.window.vibrancyViewID) {
|
setWindowVibrancy(enabled)
|
||||||
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
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -225,7 +229,7 @@ start = () => {
|
||||||
title: 'Terminus',
|
title: 'Terminus',
|
||||||
minWidth: 400,
|
minWidth: 400,
|
||||||
minHeight: 300,
|
minHeight: 300,
|
||||||
'web-preferences': {'web-security': false},
|
webPreferences: {webSecurity: false},
|
||||||
//- background to avoid the flash of unstyled window
|
//- background to avoid the flash of unstyled window
|
||||||
backgroundColor: '#131d27',
|
backgroundColor: '#131d27',
|
||||||
frame: false,
|
frame: false,
|
||||||
|
@ -250,6 +254,11 @@ start = () => {
|
||||||
|
|
||||||
app.window = new electron.BrowserWindow(options)
|
app.window = new electron.BrowserWindow(options)
|
||||||
app.window.once('ready-to-show', () => {
|
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.show()
|
||||||
app.window.focus()
|
app.window.focus()
|
||||||
})
|
})
|
||||||
|
|
|
@ -66,3 +66,9 @@
|
||||||
[ngbradiogroup] input[type="radio"] {
|
[ngbradiogroup] input[type="radio"] {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
min-height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
|
background: rgba(0,0,0,.4);
|
||||||
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"core-js": "2.4.1",
|
"core-js": "2.4.1",
|
||||||
"cross-env": "4.0.0",
|
"cross-env": "4.0.0",
|
||||||
"css-loader": "0.28.0",
|
"css-loader": "0.28.0",
|
||||||
"electron": "2.0.0",
|
"electron": "2.0.7",
|
||||||
"electron-builder": "^20.27.1",
|
"electron-builder": "^20.27.1",
|
||||||
"electron-builder-squirrel-windows": "17.0.1",
|
"electron-builder-squirrel-windows": "17.0.1",
|
||||||
"electron-rebuild": "^1.8.2",
|
"electron-rebuild": "^1.8.2",
|
||||||
|
@ -53,6 +53,10 @@
|
||||||
"appId": "org.terminus",
|
"appId": "org.terminus",
|
||||||
"productName": "Terminus",
|
"productName": "Terminus",
|
||||||
"compression": "normal",
|
"compression": "normal",
|
||||||
|
"files": [
|
||||||
|
"**/*",
|
||||||
|
"dist"
|
||||||
|
],
|
||||||
"extraResources": [
|
"extraResources": [
|
||||||
"builtin-plugins",
|
"builtin-plugins",
|
||||||
"clink"
|
"clink"
|
||||||
|
|
|
@ -2615,9 +2615,9 @@ electron-to-chromium@^1.2.7:
|
||||||
version "1.3.31"
|
version "1.3.31"
|
||||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f"
|
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.31.tgz#00d832cba9fe2358652b0c48a8816c8e3a037e9f"
|
||||||
|
|
||||||
electron@2.0.0:
|
electron@^2.0.7:
|
||||||
version "2.0.0"
|
version "2.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.0.tgz#e95dc7f3a089a52b8c2a52c7c9e1024db0c8d46e"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-2.0.7.tgz#f7ce410433298e319032ce31f0e6ffd709ff052c"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "^8.0.24"
|
"@types/node" "^8.0.24"
|
||||||
electron-download "^3.0.1"
|
electron-download "^3.0.1"
|
||||||
|
|
Loading…
Reference in a new issue