mirror of
https://github.com/Eugeny/tabby.git
synced 2025-10-04 14:04:56 +00:00
wip
This commit is contained in:
@@ -5,3 +5,4 @@ appearance:
|
||||
tabsLocation: top
|
||||
theme: Standard
|
||||
frame: thin
|
||||
css: '/* * { color: blue !important; } */'
|
||||
|
@@ -1,7 +1,8 @@
|
||||
import { Subject } from 'rxjs'
|
||||
import * as yaml from 'js-yaml'
|
||||
import * as path from 'path'
|
||||
import * as fs from 'fs'
|
||||
import { EventEmitter, Injectable, Inject } from '@angular/core'
|
||||
import { Injectable, Inject } from '@angular/core'
|
||||
import { ConfigProvider } from '../api/configProvider'
|
||||
import { ElectronService } from './electron.service'
|
||||
import { HostAppService } from './hostApp.service'
|
||||
@@ -51,7 +52,7 @@ export class ConfigProxy {
|
||||
@Injectable()
|
||||
export class ConfigService {
|
||||
store: any
|
||||
change = new EventEmitter()
|
||||
changed$ = new Subject<void>()
|
||||
restartRequested: boolean
|
||||
private _store: any
|
||||
private path: string
|
||||
@@ -91,7 +92,7 @@ export class ConfigService {
|
||||
}
|
||||
|
||||
emitChange (): void {
|
||||
this.change.emit()
|
||||
this.changed$.next()
|
||||
}
|
||||
|
||||
requestRestart (): void {
|
||||
|
@@ -15,13 +15,13 @@ export class ElectronService {
|
||||
constructor () {
|
||||
this.electron = require('electron')
|
||||
this.remoteElectron = this.remoteRequire('electron')
|
||||
this.app = this.remoteElectron.app
|
||||
this.screen = this.remoteElectron.screen
|
||||
this.dialog = this.remoteElectron.dialog
|
||||
this.app = this.electron.remote.app
|
||||
this.screen = this.electron.remote.screen
|
||||
this.dialog = this.electron.remote.dialog
|
||||
this.shell = this.electron.shell
|
||||
this.clipboard = this.electron.clipboard
|
||||
this.ipcRenderer = this.electron.ipcRenderer
|
||||
this.globalShortcut = this.remoteElectron.globalShortcut
|
||||
this.globalShortcut = this.electron.remote.globalShortcut
|
||||
}
|
||||
|
||||
remoteRequire (name: string): any {
|
||||
|
@@ -43,7 +43,7 @@ export class HotkeysService {
|
||||
})
|
||||
})
|
||||
this.hotkeyDescriptions = hotkeyProviders.map(x => x.hotkeys).reduce((a, b) => a.concat(b))
|
||||
this.config.change.subscribe(() => {
|
||||
this.config.changed$.subscribe(() => {
|
||||
this.registerGlobalHotkey()
|
||||
})
|
||||
this.registerGlobalHotkey()
|
||||
|
@@ -11,8 +11,9 @@ export class ThemesService {
|
||||
@Inject(Theme) private themes: Theme[],
|
||||
) {
|
||||
this.applyCurrentTheme()
|
||||
config.change.subscribe(() => {
|
||||
config.changed$.subscribe(() => {
|
||||
this.applyCurrentTheme()
|
||||
document.querySelector('style#custom-css').innerHTML = config.store.appearance.css
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user