more electron/web separation

This commit is contained in:
Eugene Pankov
2021-06-19 01:36:25 +02:00
parent fa31ac65ab
commit fad7858f3f
50 changed files with 568 additions and 448 deletions

View File

@@ -12,7 +12,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
private app: AppService,
) {
super()
hostApp.preferencesMenu$.subscribe(() => this.open())
hostApp.settingsUIRequest$.subscribe(() => this.open())
hotkeys.matchedHotkey.subscribe(async (hotkey) => {
if (hotkey === 'settings') {

View File

@@ -24,7 +24,7 @@ button.btn.btn-outline-warning.btn-block(*ngIf='config.restartRequested', '(clic
span Report a problem
button.btn.btn-secondary(
*ngIf='!updateAvailable',
*ngIf='!updateAvailable && hostApp.platform !== Platform.Web',
(click)='checkForUpdates()',
[disabled]='checkingForUpdate'
)
@@ -46,7 +46,7 @@ button.btn.btn-outline-warning.btn-block(*ngIf='config.restartRequested', '(clic
.description Allows quickly opening a terminal in the selected folder
toggle([ngModel]='isShellIntegrationInstalled', (ngModelChange)='toggleShellIntegration()')
.form-line
.form-line(*ngIf='hostApp.platform !== Platform.Web')
.header
.title Enable analytics
.description We're only tracking your Terminus and OS versions.
@@ -55,17 +55,17 @@ button.btn.btn-outline-warning.btn-block(*ngIf='config.restartRequested', '(clic
(ngModelChange)='saveConfiguration(true)',
)
.form-line
.form-line(*ngIf='hostApp.platform !== Platform.Web')
.header
.title Automatic Updates
.description Enable automatic installation of updates when they become available.
toggle([(ngModel)]='config.store.enableAutomaticUpdates', (ngModelChange)='saveConfiguration()')
.form-line
.form-line(*ngIf='hostApp.platform !== Platform.Web')
.header
.title Debugging
button.btn.btn-secondary((click)='hostApp.openDevTools()')
button.btn.btn-secondary((click)='hostWindow.openDevTools()')
i.fas.fa-bug
span Open DevTools

View File

@@ -10,6 +10,7 @@ import {
HomeBaseService,
UpdaterService,
PlatformService,
HostWindowService,
} from 'terminus-core'
import { SettingsTabProvider } from '../api'
@@ -36,6 +37,7 @@ export class SettingsTabComponent extends BaseTabComponent {
constructor (
public config: ConfigService,
public hostApp: HostAppService,
public hostWindow: HostWindowService,
public homeBase: HomeBaseService,
public platform: PlatformService,
public zone: NgZone,

View File

@@ -39,7 +39,7 @@ export class WindowSettingsTabComponent extends BaseComponent {
const dockingService = docking
if (dockingService) {
this.subscribeUntilDestroyed(hostApp.displaysChanged$, () => {
this.subscribeUntilDestroyed(dockingService.screensChanged$, () => {
this.zone.run(() => this.screens = dockingService.getScreens())
})
this.screens = dockingService.getScreens()