mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
@typescript-eslint linter
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { DomSanitizer } from '@angular/platform-browser'
|
||||
import { ToolbarButtonProvider, IToolbarButton, AppService, HostAppService, HotkeysService } from 'terminus-core'
|
||||
import { ToolbarButtonProvider, ToolbarButton, AppService, HostAppService, HotkeysService } from 'terminus-core'
|
||||
|
||||
import { SettingsTabComponent } from './components/settingsTab.component'
|
||||
|
||||
@@ -23,7 +23,7 @@ export class ButtonProvider extends ToolbarButtonProvider {
|
||||
})
|
||||
}
|
||||
|
||||
provide (): IToolbarButton[] {
|
||||
provide (): ToolbarButton[] {
|
||||
return [{
|
||||
icon: this.domSanitizer.bypassSecurityTrustHtml(require('./icons/cog.svg')),
|
||||
title: 'Settings',
|
||||
|
@@ -21,7 +21,7 @@ const INPUT_TIMEOUT = 1000
|
||||
animate('250ms ease-out', style({
|
||||
transform: 'translateX(0)',
|
||||
opacity: '1',
|
||||
}))
|
||||
})),
|
||||
]),
|
||||
transition(':leave', [
|
||||
style({
|
||||
@@ -31,10 +31,10 @@ const INPUT_TIMEOUT = 1000
|
||||
animate('250ms ease-in', style({
|
||||
transform: 'translateX(25px)',
|
||||
opacity: '0',
|
||||
}))
|
||||
])
|
||||
])
|
||||
]
|
||||
})),
|
||||
]),
|
||||
]),
|
||||
],
|
||||
})
|
||||
export class HotkeyInputModalComponent {
|
||||
@Input() value: string[] = []
|
||||
|
@@ -24,7 +24,7 @@ export class MultiHotkeyInputComponent {
|
||||
if (typeof this.model === 'string') {
|
||||
this.model = [this.model]
|
||||
}
|
||||
this.model = this.model.map(item => (typeof item === 'string') ? [item] : item)
|
||||
this.model = this.model.map(item => typeof item === 'string' ? [item] : item)
|
||||
}
|
||||
|
||||
editItem (item) {
|
||||
|
@@ -6,14 +6,14 @@ import {
|
||||
ElectronService,
|
||||
DockingService,
|
||||
ConfigService,
|
||||
IHotkeyDescription,
|
||||
HotkeyDescription,
|
||||
HotkeysService,
|
||||
BaseTabComponent,
|
||||
Theme,
|
||||
HostAppService,
|
||||
Platform,
|
||||
HomeBaseService,
|
||||
ShellIntegrationService
|
||||
ShellIntegrationService,
|
||||
} from 'terminus-core'
|
||||
|
||||
import { SettingsTabProvider } from '../api'
|
||||
@@ -30,7 +30,7 @@ import { SettingsTabProvider } from '../api'
|
||||
export class SettingsTabComponent extends BaseTabComponent {
|
||||
@Input() activeTab: string
|
||||
hotkeyFilter = ''
|
||||
hotkeyDescriptions: IHotkeyDescription[]
|
||||
hotkeyDescriptions: HotkeyDescription[]
|
||||
screens: any[]
|
||||
Platform = Platform
|
||||
configDefaults: any
|
||||
|
@@ -7,17 +7,17 @@ export class SettingsConfigProvider extends ConfigProvider {
|
||||
[Platform.macOS]: {
|
||||
hotkeys: {
|
||||
settings: ['⌘-,'],
|
||||
}
|
||||
},
|
||||
},
|
||||
[Platform.Windows]: {
|
||||
hotkeys: {
|
||||
settings: ['Ctrl-,']
|
||||
}
|
||||
settings: ['Ctrl-,'],
|
||||
},
|
||||
},
|
||||
[Platform.Linux]: {
|
||||
hotkeys: {
|
||||
settings: ['Ctrl-,']
|
||||
}
|
||||
settings: ['Ctrl-,'],
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
@@ -1,17 +1,17 @@
|
||||
import { Injectable } from '@angular/core'
|
||||
import { IHotkeyDescription, HotkeyProvider } from 'terminus-core'
|
||||
import { HotkeyDescription, HotkeyProvider } from 'terminus-core'
|
||||
|
||||
/** @hidden */
|
||||
@Injectable()
|
||||
export class SettingsHotkeyProvider extends HotkeyProvider {
|
||||
hotkeys: IHotkeyDescription[] = [
|
||||
hotkeys: HotkeyDescription[] = [
|
||||
{
|
||||
id: 'settings',
|
||||
name: 'Open Settings',
|
||||
},
|
||||
]
|
||||
|
||||
async provide (): Promise<IHotkeyDescription[]> {
|
||||
async provide (): Promise<HotkeyDescription[]> {
|
||||
return this.hotkeys
|
||||
}
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ import { SettingsConfigProvider } from './config'
|
||||
SettingsTabBodyComponent,
|
||||
],
|
||||
})
|
||||
export default class SettingsModule { }
|
||||
export default class SettingsModule { } // eslint-disable-line @typescript-eslint/no-extraneous-class
|
||||
|
||||
export * from './api'
|
||||
export { SettingsTabComponent }
|
||||
|
Reference in New Issue
Block a user