mirror of
https://github.com/Eugeny/tabby
synced 2024-11-15 01:17:14 +00:00
private service constructors
This commit is contained in:
parent
9e862772eb
commit
baaebb402e
21 changed files with 21 additions and 21 deletions
|
@ -63,7 +63,7 @@ export abstract class BaseTabComponent {
|
|||
get destroyed$ (): Observable<void> { return this.destroyed }
|
||||
get recoveryStateChangedHint$ (): Observable<void> { return this.recoveryStateChangedHint }
|
||||
|
||||
constructor () {
|
||||
protected constructor () {
|
||||
this.focused$.subscribe(() => {
|
||||
this.hasFocus = true
|
||||
})
|
||||
|
|
|
@ -13,7 +13,7 @@ import { ToolbarButton, ToolbarButtonProvider } from '../api'
|
|||
export class StartPageComponent {
|
||||
version: string
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
private config: ConfigService,
|
||||
private domSanitizer: DomSanitizer,
|
||||
public homeBase: HomeBaseService,
|
||||
|
|
|
@ -10,7 +10,7 @@ import { AppService } from '../services/app.service'
|
|||
styles: [require('./windowControls.component.scss')],
|
||||
})
|
||||
export class WindowControlsComponent {
|
||||
constructor (public hostApp: HostAppService, public app: AppService) { }
|
||||
private constructor (public hostApp: HostAppService, public app: AppService) { }
|
||||
|
||||
async closeWindow () {
|
||||
this.app.closeWindow()
|
||||
|
|
|
@ -67,7 +67,7 @@ export class AppService {
|
|||
get ready$ (): Observable<void> { return this.ready }
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private config: ConfigService,
|
||||
private hostApp: HostAppService,
|
||||
private tabRecovery: TabRecoveryService,
|
||||
|
|
|
@ -102,7 +102,7 @@ export class ConfigService {
|
|||
get changed$ (): Observable<void> { return this.changed }
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
electron: ElectronService,
|
||||
private hostApp: HostAppService,
|
||||
@Inject(ConfigProvider) configProviders: ConfigProvider[],
|
||||
|
|
|
@ -6,7 +6,7 @@ import { HostAppService, Bounds } from '../services/hostApp.service'
|
|||
@Injectable({ providedIn: 'root' })
|
||||
export class DockingService {
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private electron: ElectronService,
|
||||
private config: ConfigService,
|
||||
private hostApp: HostAppService,
|
||||
|
|
|
@ -25,7 +25,7 @@ export class ElectronService {
|
|||
private electron: any
|
||||
|
||||
/** @hidden */
|
||||
constructor () {
|
||||
private constructor () {
|
||||
this.electron = require('electron')
|
||||
this.remote = this.electron.remote
|
||||
this.app = this.remote.app
|
||||
|
|
|
@ -11,7 +11,7 @@ export class HomeBaseService {
|
|||
mixpanel: any
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private electron: ElectronService,
|
||||
private config: ConfigService,
|
||||
) {
|
||||
|
|
|
@ -65,7 +65,7 @@ export class LogService {
|
|||
private log: any
|
||||
|
||||
/** @hidden */
|
||||
constructor (electron: ElectronService) {
|
||||
private constructor (electron: ElectronService) {
|
||||
this.log = initializeWinston(electron)
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ export class ShellIntegrationService {
|
|||
command: 'paste "%V"',
|
||||
},
|
||||
]
|
||||
constructor (
|
||||
private constructor (
|
||||
private electron: ElectronService,
|
||||
private hostApp: HostAppService,
|
||||
) {
|
||||
|
|
|
@ -10,7 +10,7 @@ export class TabRecoveryService {
|
|||
logger: Logger
|
||||
enabled = false
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
@Inject(TabRecoveryProvider) private tabRecoveryProviders: TabRecoveryProvider[],
|
||||
private config: ConfigService,
|
||||
log: LogService
|
||||
|
|
|
@ -8,7 +8,7 @@ export type TabComponentType = new (...args: any[]) => BaseTabComponent
|
|||
@Injectable({ providedIn: 'root' })
|
||||
export class TabsService {
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private componentFactoryResolver: ComponentFactoryResolver,
|
||||
private injector: Injector,
|
||||
private tabRecovery: TabRecoveryService,
|
||||
|
|
|
@ -7,7 +7,7 @@ export class ThemesService {
|
|||
private styleElement: HTMLElement|null = null
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private config: ConfigService,
|
||||
@Inject(Theme) private themes: Theme[],
|
||||
) {
|
||||
|
|
|
@ -14,7 +14,7 @@ export class TouchbarService {
|
|||
private tabSegments: SegmentedControlSegment[] = []
|
||||
private nsImageCache: {[id: string]: Electron.NativeImage} = {}
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
private app: AppService,
|
||||
private hostApp: HostAppService,
|
||||
@Inject(ToolbarButtonProvider) private toolbarButtonProviders: ToolbarButtonProvider[],
|
||||
|
|
|
@ -21,7 +21,7 @@ export class UpdaterService {
|
|||
private updateURL: string
|
||||
private autoUpdater: AppUpdater
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
log: LogService,
|
||||
private electron: ElectronService,
|
||||
private config: ConfigService,
|
||||
|
|
|
@ -34,7 +34,7 @@ export class PluginManagerService {
|
|||
private npmReady: Promise<void>
|
||||
private npm: any
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
log: LogService,
|
||||
) {
|
||||
this.logger = log.create('pluginManager')
|
||||
|
|
|
@ -127,7 +127,7 @@ import { XTermFrontend, XTermWebGLFrontend } from './frontends/xtermFrontend'
|
|||
],
|
||||
})
|
||||
export default class TerminalModule { // eslint-disable-line @typescript-eslint/no-extraneous-class
|
||||
constructor (
|
||||
private constructor (
|
||||
app: AppService,
|
||||
config: ConfigService,
|
||||
hotkeys: HotkeysService,
|
||||
|
|
|
@ -332,7 +332,7 @@ export class SessionsService {
|
|||
logger: Logger
|
||||
private lastID = 0
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
log: LogService,
|
||||
) {
|
||||
require('../bufferizedPTY')(nodePTY) // eslint-disable-line @typescript-eslint/no-var-requires
|
||||
|
|
|
@ -19,7 +19,7 @@ export class TerminalService {
|
|||
get shells$ (): Observable<Shell[]> { return this.shells }
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private app: AppService,
|
||||
private config: ConfigService,
|
||||
private uac: UACService,
|
||||
|
|
|
@ -10,7 +10,7 @@ export class TerminalFrontendService {
|
|||
private containers = new WeakMap<BaseSession, Frontend>()
|
||||
|
||||
/** @hidden */
|
||||
constructor (
|
||||
private constructor (
|
||||
private config: ConfigService,
|
||||
private themes: ThemesService,
|
||||
private hotkeys: HotkeysService,
|
||||
|
|
|
@ -8,7 +8,7 @@ import { SessionOptions } from '../api/interfaces'
|
|||
export class UACService {
|
||||
isAvailable = false
|
||||
|
||||
constructor (
|
||||
private constructor (
|
||||
private electron: ElectronService,
|
||||
) {
|
||||
this.isAvailable = isWindowsBuild(WIN_BUILD_CONPTY_SUPPORTED)
|
||||
|
|
Loading…
Reference in a new issue