Merge branch 'master' of github.com:Eugeny/terminus

This commit is contained in:
Eugene Pankov
2019-07-01 11:28:17 +02:00
7 changed files with 34 additions and 24 deletions

View File

@@ -24,14 +24,14 @@
"devtron": "1.4.0", "devtron": "1.4.0",
"fontmanager-redux": "0.3.2", "fontmanager-redux": "0.3.2",
"electron-config": "2.0.0", "electron-config": "2.0.0",
"electron-debug": "^3.0.0", "electron-debug": "^3.0.1",
"electron-is-dev": "1.1.0", "electron-is-dev": "1.1.0",
"electron-updater": "^4.0.6", "electron-updater": "^4.0.6",
"js-yaml": "3.13.1", "js-yaml": "3.13.1",
"keytar": "^4.7.0", "keytar": "^4.7.0",
"mz": "^2.7.0", "mz": "^2.7.0",
"ngx-toastr": "^10.0.4", "ngx-toastr": "^10.0.4",
"node-pty": "^0.9.0-beta9", "node-pty": "^0.9.0-beta18",
"npm": "~6.9.0", "npm": "~6.9.0",
"path": "0.12.7", "path": "0.12.7",
"rxjs": "^6.5.2", "rxjs": "^6.5.2",

View File

@@ -786,10 +786,10 @@ electron-config@2.0.0:
dependencies: dependencies:
conf "^1.0.0" conf "^1.0.0"
electron-debug@^3.0.0: electron-debug@^3.0.1:
version "3.0.0" version "3.0.1"
resolved "https://registry.yarnpkg.com/electron-debug/-/electron-debug-3.0.0.tgz#55b7895df7f371558d0595d14dc2f8a738a41c81" resolved "https://registry.yarnpkg.com/electron-debug/-/electron-debug-3.0.1.tgz#95b43b968ec7dbe96300034143e58b803a1e82dc"
integrity sha512-rLrnn7L2soeIqwB6FIzn4+pj6RwT66XhUxadcrS3okjB3ezAv8LsolqrFrO2UrTrvchZgTCcEapV4J0UxlYWIw== integrity sha512-fo3mtDM4Bxxm3DW1I+XcJKfQlUlns4QGWyWGs8OrXK1bBZ2X9HeqYMntYBx78MYRcGY5S/ualuG4GhCnPlaZEA==
dependencies: dependencies:
electron-is-dev "^1.1.0" electron-is-dev "^1.1.0"
electron-localshortcut "^3.1.0" electron-localshortcut "^3.1.0"
@@ -2025,10 +2025,10 @@ node-gyp@^4.0.0:
tar "^4.4.8" tar "^4.4.8"
which "1" which "1"
node-pty@^0.9.0-beta9: node-pty@^0.9.0-beta18:
version "0.9.0-beta9" version "0.9.0-beta18"
resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.9.0-beta9.tgz#75cffcf4026f543475c115f017ca7fe66cf6e7fe" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.9.0-beta18.tgz#d81c1ed96ee2727043abd5ac6666250149c1b606"
integrity sha512-h6e8jUikGSZwqt1JHmzT5Zi0fdUCultX/BWrS35suTaZNJm/YSJA2QDG9HTVoSA6dhRvtFoaGiBtgbX9uZKe6w== integrity sha512-j4E8RYda9cqm+2cGxaAxDlpEmPpuS0dfCuZII8VPRTw6p5gRJRwPJo9oL//YKdtaasRFfRy0/mUaNj8ft3FQVg==
dependencies: dependencies:
nan "^2.13.2" nan "^2.13.2"

View File

@@ -1,7 +1,7 @@
appearance: appearance:
dock: off dock: off
dockScreen: current dockScreen: current
dockFill: 50 dockFill: 0.5
tabsLocation: top tabsLocation: top
cycleTabs: true cycleTabs: true
theme: Standard theme: Standard

View File

@@ -30,7 +30,8 @@ export class DockingService {
} }
const newBounds: Bounds = { x: 0, y: 0, width: 0, height: 0 } const newBounds: Bounds = { x: 0, y: 0, width: 0, height: 0 }
const fill = this.config.store.appearance.dockFill
const fill = this.config.store.appearance.dockFill <= 1 ? this.config.store.appearance.dockFill : 1;
const [minWidth, minHeight] = this.hostApp.getWindow().getMinimumSize() const [minWidth, minHeight] = this.hostApp.getWindow().getMinimumSize()
if (dockSide === 'left' || dockSide === 'right') { if (dockSide === 'left' || dockSide === 'right') {
@@ -63,15 +64,15 @@ export class DockingService {
} }
getScreens () { getScreens () {
return this.electron.screen.getAllDisplays().map((display, index) => { const primaryDisplayID = this.electron.screen.getPrimaryDisplay().id;
return this.electron.screen.getAllDisplays().sort((a,b) => (
a.bounds.x === b.bounds.x ? a.bounds.y - b.bounds.y : a.bounds.x - b.bounds.x
)).map((display,index) => {
return { return {
id: display.id, id: display.id,
name: [ name: display.id === primaryDisplayID ? 'Primary Display' : `Display ${index +1}`,
'Primary display',
'Secondary display',
][index] || `Display ${index + 1}`,
} }
}) });
} }
private repositionWindow () { private repositionWindow () {

View File

@@ -1,7 +1,7 @@
import * as yaml from 'js-yaml' import * as yaml from 'js-yaml'
import * as os from 'os' import * as os from 'os'
import { Subscription } from 'rxjs' import { Subscription } from 'rxjs'
import { Component, Inject, Input, HostBinding } from '@angular/core' import { Component, Inject, Input, HostBinding, NgZone } from '@angular/core'
import { import {
ElectronService, ElectronService,
DockingService, DockingService,
@@ -47,6 +47,7 @@ export class SettingsTabComponent extends BaseTabComponent {
public hostApp: HostAppService, public hostApp: HostAppService,
public homeBase: HomeBaseService, public homeBase: HomeBaseService,
public shellIntegration: ShellIntegrationService, public shellIntegration: ShellIntegrationService,
public zone: NgZone,
hotkeys: HotkeysService, hotkeys: HotkeysService,
@Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[], @Inject(SettingsTabProvider) public settingsProviders: SettingsTabProvider[],
@Inject(Theme) public themes: Theme[], @Inject(Theme) public themes: Theme[],
@@ -68,6 +69,14 @@ export class SettingsTabComponent extends BaseTabComponent {
this.configSubscription = config.changed$.subscribe(onConfigChange) this.configSubscription = config.changed$.subscribe(onConfigChange)
onConfigChange() onConfigChange()
const onScreenChange = () => {
this.zone.run(() => this.screens = this.docking.getScreens());
}
electron.screen.on('display-added', onScreenChange);
electron.screen.on('display-removed', onScreenChange);
electron.screen.on('display-metrics-changed', onScreenChange);
hotkeys.getHotkeyDescriptions().then(descriptions => { hotkeys.getHotkeyDescriptions().then(descriptions => {
this.hotkeyDescriptions = descriptions this.hotkeyDescriptions = descriptions
}) })

View File

@@ -31,7 +31,7 @@
"runes": "^0.4.2", "runes": "^0.4.2",
"slug": "^1.1.0", "slug": "^1.1.0",
"uuid": "^3.3.2", "uuid": "^3.3.2",
"xterm": "3.15.0-beta61", "xterm": "3.15.0-beta65",
"xterm-addon-fit": "^0.1.0-beta3", "xterm-addon-fit": "^0.1.0-beta3",
"xterm-addon-ligatures": "^0.1.0-beta-2", "xterm-addon-ligatures": "^0.1.0-beta-2",
"xterm-addon-search": "^0.1.0-beta6", "xterm-addon-search": "^0.1.0-beta6",

View File

@@ -231,10 +231,10 @@ xterm-addon-webgl@^0.2.0-beta1:
resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.2.0-beta1.tgz#c688e4b26bbd01a8a0cd9143362bbe040fc98ef9" resolved "https://registry.yarnpkg.com/xterm-addon-webgl/-/xterm-addon-webgl-0.2.0-beta1.tgz#c688e4b26bbd01a8a0cd9143362bbe040fc98ef9"
integrity sha512-arDNdOyiGs0BCFUaQ0jEa1UgybqMsMRZwV9+/xc0D4vJi5STWtH8lRtTUAgvDxaTJQBo1frz56JkYpDddHDSXw== integrity sha512-arDNdOyiGs0BCFUaQ0jEa1UgybqMsMRZwV9+/xc0D4vJi5STWtH8lRtTUAgvDxaTJQBo1frz56JkYpDddHDSXw==
xterm@3.15.0-beta61: xterm@3.15.0-beta65:
version "3.15.0-beta61" version "3.15.0-beta65"
resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta61.tgz#44f3b1959c955013d0661b7008c33a913f900329" resolved "https://registry.yarnpkg.com/xterm/-/xterm-3.15.0-beta65.tgz#ec2d5bc32716c7536e2b1d83764e0f8b1adc453f"
integrity sha512-nPr9DQCUnAnC8COoL5QfZqdFADj6nD+03xsqfu+6DLJAY0BPF0Tdhm+VzWlB4GGEhjA/DEuTD5vq70+j3gE/bw== integrity sha512-rEngAALvVMos8W0sY6bDnSqVRmkwvGtCnaRMsx5tOsVXbehhjcQmkvZCgUe3ZSxaS7Pcz9fpXm6fjllgmgnGyA==
yallist@^2.1.2: yallist@^2.1.2:
version "2.1.2" version "2.1.2"