mirror of
https://github.com/Eugeny/tabby.git
synced 2024-09-11 04:43:03 +03:00
typing fixes
This commit is contained in:
parent
1e5cfd1d4b
commit
441f442915
@ -71,7 +71,7 @@ title-bar(
|
||||
ngbDropdown
|
||||
)
|
||||
button.btn.btn-secondary.btn-tab-bar(
|
||||
[title]='button.title',
|
||||
[title]='button.label',
|
||||
(click)='button.run && button.run()',
|
||||
[fastHtmlBind]='button.icon',
|
||||
ngbDropdownToggle,
|
||||
|
@ -79,8 +79,8 @@ export class AppRootComponent {
|
||||
|
||||
constructor (
|
||||
private hotkeys: HotkeysService,
|
||||
private updater: UpdaterService,
|
||||
private commands: CommandService,
|
||||
public updater: UpdaterService,
|
||||
public hostWindow: HostWindowService,
|
||||
public hostApp: HostAppService,
|
||||
public config: ConfigService,
|
||||
|
@ -6,7 +6,7 @@ import { PlatformService } from '../api/platform'
|
||||
selector: '[fastHtmlBind]',
|
||||
})
|
||||
export class FastHtmlBindDirective implements OnChanges {
|
||||
@Input() fastHtmlBind: string
|
||||
@Input() fastHtmlBind?: string
|
||||
|
||||
constructor (
|
||||
private el: ElementRef,
|
||||
@ -14,7 +14,7 @@ export class FastHtmlBindDirective implements OnChanges {
|
||||
) { }
|
||||
|
||||
ngOnChanges (): void {
|
||||
this.el.nativeElement.innerHTML = this.fastHtmlBind || ''
|
||||
this.el.nativeElement.innerHTML = this.fastHtmlBind ?? ''
|
||||
for (const link of this.el.nativeElement.querySelectorAll('a')) {
|
||||
link.addEventListener('click', event => {
|
||||
event.preventDefault()
|
||||
|
@ -13,7 +13,7 @@ ng-container(*ngIf='!argvMode')
|
||||
(ngModelChange)='parseCommand()'
|
||||
)
|
||||
|
||||
ng-container(*ngIf='argvMode')
|
||||
ng-container(*ngIf='argvMode && _model')
|
||||
.mb-3
|
||||
label(translate) Program
|
||||
.input-group
|
||||
@ -28,7 +28,7 @@ ng-container(*ngIf='argvMode')
|
||||
[(ngModel)]='_model.command',
|
||||
)
|
||||
|
||||
.mb-3
|
||||
.mb-3(*ngIf='_model.args')
|
||||
label(translate) Arguments
|
||||
.input-group(
|
||||
*ngFor='let arg of _model.args; index as i; trackBy: trackByIndex',
|
||||
|
@ -21,8 +21,8 @@ ul.nav-tabs.mb-2(ngbNav, #nav='ngbNav')
|
||||
i.fas.fa-fw.fa-search(*ngIf='availablePluginsReady')
|
||||
input.form-control(
|
||||
type='text',
|
||||
[(ngModel)]='_1',
|
||||
(ngModelChange)='searchAvailable(_1)',
|
||||
[(ngModel)]='availableFilter',
|
||||
(ngModelChange)='searchAvailable(availableFilter)',
|
||||
[placeholder]='"Search plugins"|translate'
|
||||
)
|
||||
|
||||
@ -64,8 +64,8 @@ ul.nav-tabs.mb-2(ngbNav, #nav='ngbNav')
|
||||
i.fas.fa-fw.fa-search
|
||||
input.form-control(
|
||||
type='text',
|
||||
[(ngModel)]='_2',
|
||||
(ngModelChange)='searchInstalled(_2)',
|
||||
[(ngModel)]='installedFilter',
|
||||
(ngModelChange)='searchInstalled(installedFilter)',
|
||||
[placeholder]='"Search plugins"|translate'
|
||||
)
|
||||
|
||||
@ -89,7 +89,7 @@ ul.nav-tabs.mb-2(ngbNav, #nav='ngbNav')
|
||||
i.fas.fa-fw.fa-circle-notch.fa-spin(*ngIf='busy.get(plugin.name) == BusyState.Installing')
|
||||
span(
|
||||
translate='Upgrade to {version}',
|
||||
[translateParams]='{version: knownUpgrades[plugin.name].version}'
|
||||
[translateParams]='{version: knownUpgrades[plugin.name]?.version}'
|
||||
)
|
||||
|
||||
ng-template(ngbPanelContent)
|
||||
|
@ -32,6 +32,8 @@ export class PluginsSettingsTabComponent {
|
||||
@HostBinding('class.content-box') true
|
||||
|
||||
installedPlugins$: PluginInfo[] = []
|
||||
installedFilter = ''
|
||||
availableFilter = ''
|
||||
|
||||
constructor (
|
||||
private config: ConfigService,
|
||||
|
@ -85,7 +85,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
.header
|
||||
.title(translate) Slow feed
|
||||
.description(translate) Sends data one byte at a time
|
||||
toggle([(ngModel)]='profile.options.slowFeed')
|
||||
toggle([(ngModel)]='profile.options.slowSend')
|
||||
|
||||
li(ngbNavItem)
|
||||
a(ngbNavLink, translate) Login scripts
|
||||
|
@ -185,6 +185,7 @@ h3.mt-4(translate) Docking
|
||||
label.btn.btn-secondary(id='dockScreenCurrent')
|
||||
span(translate) Current
|
||||
input.btn-check(
|
||||
*ngFor='let screen of screens',
|
||||
type='radio',
|
||||
name='dockScreen',
|
||||
[(ngModel)]='config.store.appearance.dockScreen',
|
||||
|
@ -10,7 +10,7 @@
|
||||
.d-flex.align-items-center
|
||||
label(translate) Last known host key fingerprint
|
||||
.badge.text-bg-danger.ms-auto {{ selector.type }}
|
||||
code {{knownHost.digest}}
|
||||
code {{knownHost?.digest}}
|
||||
|
||||
.mb-3
|
||||
.d-flex.align-items-center
|
||||
|
@ -195,6 +195,7 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
a(ngbNavLink, translate) Ports
|
||||
ng-template(ngbNavContent)
|
||||
ssh-port-forwarding-config(
|
||||
*ngIf='profile.options.forwardedPorts',
|
||||
[model]='profile.options.forwardedPorts',
|
||||
(forwardAdded)='onForwardAdded($event)',
|
||||
(forwardRemoved)='onForwardRemoved($event)'
|
||||
|
@ -38,10 +38,10 @@ sftp-panel.bg-dark(
|
||||
@panelSlide,
|
||||
[@.disabled]='!config.store.accessibility.animations',
|
||||
[(path)]='sftpPath',
|
||||
*ngIf='sftpPanelVisible',
|
||||
*ngIf='sftpPanelVisible && sshSession',
|
||||
(click)='$event.stopPropagation()',
|
||||
[session]='sshSession',
|
||||
[cwdDetectionAvailable]='session?.supportsWorkingDirectory()',
|
||||
[session]='sshSession!',
|
||||
[cwdDetectionAvailable]='session?.supportsWorkingDirectory() ?? false',
|
||||
(closed)='sftpPanelVisible = false'
|
||||
)
|
||||
|
||||
@ -49,5 +49,5 @@ keyboard-interactive-auth-panel.bg-dark(
|
||||
*ngIf='activeKIPrompt',
|
||||
[prompt]='activeKIPrompt',
|
||||
(click)='$event.stopPropagation()',
|
||||
(done)='activeKIPrompt = null; frontend.focus()'
|
||||
(done)='activeKIPrompt = null; frontend?.focus()'
|
||||
)
|
||||
|
@ -1,11 +1,11 @@
|
||||
.terminal-toolbar-spacer
|
||||
.content(#content, [style.opacity]='frontendIsReady ? 1 : 0')
|
||||
search-panel(
|
||||
*ngIf='showSearchPanel && hasFocus',
|
||||
*ngIf='showSearchPanel && hasFocus && frontend',
|
||||
@toolbarSlide,
|
||||
[@.disabled]='!config.store.accessibility.animations',
|
||||
[frontend]='frontend',
|
||||
(close)='showSearchPanel = false; frontend?.cancelSearch()'
|
||||
(close)='showSearchPanel = false; frontend.cancelSearch()'
|
||||
)
|
||||
|
||||
button.btn.btn-sm.btn-link.toolbar-pin-button(
|
||||
|
@ -1,9 +1,9 @@
|
||||
.head
|
||||
.bg-dark.p-3.mb-4(*ngIf='model != null')
|
||||
.bg-dark.p-3.mb-4(*ngIf='model != undefined')
|
||||
.d-flex.align-items-center
|
||||
span {{model.name}}
|
||||
.me-auto
|
||||
a.btn-link((click)='selectScheme(null); $event.preventDefault()', href='#', translate) Clear
|
||||
a.btn-link((click)='selectScheme(undefined); $event.preventDefault()', href='#', translate) Clear
|
||||
|
||||
color-scheme-preview([scheme]='model')
|
||||
|
||||
|
@ -11,7 +11,7 @@ _('Search color schemes')
|
||||
/** @hidden */
|
||||
@Component({
|
||||
selector: 'color-scheme-selector',
|
||||
templateUrl:'./colorSchemeSelector.component.pug',
|
||||
templateUrl: './colorSchemeSelector.component.pug',
|
||||
styles: [`
|
||||
:host {
|
||||
display: block;
|
||||
@ -25,8 +25,8 @@ export class ColorSchemeSelectorComponent {
|
||||
allColorSchemes: TerminalColorScheme[] = []
|
||||
filter = ''
|
||||
|
||||
@Input() model: TerminalColorScheme|null = null
|
||||
@Output() modelChange = new EventEmitter<TerminalColorScheme|null>()
|
||||
@Input() model?: TerminalColorScheme
|
||||
@Output() modelChange = new EventEmitter<TerminalColorScheme|undefined>()
|
||||
|
||||
@HostBinding('class.content-box') true
|
||||
|
||||
@ -45,7 +45,7 @@ export class ColorSchemeSelectorComponent {
|
||||
this.changeDetector.markForCheck()
|
||||
}
|
||||
|
||||
selectScheme (scheme: TerminalColorScheme|null) {
|
||||
selectScheme (scheme: TerminalColorScheme|undefined) {
|
||||
this.model = scheme
|
||||
this.modelChange.emit(scheme)
|
||||
this.changeDetector.markForCheck()
|
||||
|
@ -62,7 +62,7 @@
|
||||
*ngFor='let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy',
|
||||
[(model)]='config.store.terminal.colorScheme.colors[idx]',
|
||||
(modelChange)='config.save()',
|
||||
[title]='idx',
|
||||
[title]='idx.toString()',
|
||||
hint='ANSI color {{idx}}'
|
||||
)
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
div(ngbDropdownMenu)
|
||||
a.d-flex.flex-column(
|
||||
*ngFor='let mode of inputModes',
|
||||
(click)='options.inputMode = mode.key',
|
||||
(click)='setInputMode(mode.key)',
|
||||
ngbDropdownItem
|
||||
)
|
||||
div {{mode.name|translate}}
|
||||
@ -37,7 +37,7 @@
|
||||
div(ngbDropdownMenu)
|
||||
a.d-flex.flex-column(
|
||||
*ngFor='let mode of outputModes',
|
||||
(click)='options.outputMode = mode.key',
|
||||
(click)='setOutputMode(mode.key)',
|
||||
ngbDropdownItem
|
||||
)
|
||||
div {{mode.name|translate}}
|
||||
|
@ -60,4 +60,12 @@ export class StreamProcessingSettingsComponent {
|
||||
getOutputModeName (key) {
|
||||
return this.outputModes.find(x => x.key === key)?.name
|
||||
}
|
||||
|
||||
setInputMode (mode) {
|
||||
this.options.inputMode = mode
|
||||
}
|
||||
|
||||
setOutputMode (mode) {
|
||||
this.options.outputMode = mode
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user