diff --git a/tabby-core/src/components/appRoot.component.pug b/tabby-core/src/components/appRoot.component.pug index 0533ce35..5bbfd141 100644 --- a/tabby-core/src/components/appRoot.component.pug +++ b/tabby-core/src/components/appRoot.component.pug @@ -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, diff --git a/tabby-core/src/components/appRoot.component.ts b/tabby-core/src/components/appRoot.component.ts index 367ede79..9b13013e 100644 --- a/tabby-core/src/components/appRoot.component.ts +++ b/tabby-core/src/components/appRoot.component.ts @@ -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, diff --git a/tabby-core/src/directives/fastHtmlBind.directive.ts b/tabby-core/src/directives/fastHtmlBind.directive.ts index 107a00bf..0693b650 100644 --- a/tabby-core/src/directives/fastHtmlBind.directive.ts +++ b/tabby-core/src/directives/fastHtmlBind.directive.ts @@ -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() diff --git a/tabby-local/src/components/commandLineEditor.component.pug b/tabby-local/src/components/commandLineEditor.component.pug index 9ae4ad81..e7fbd0c7 100644 --- a/tabby-local/src/components/commandLineEditor.component.pug +++ b/tabby-local/src/components/commandLineEditor.component.pug @@ -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', diff --git a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug index 6a9ffa9b..9ab70bcb 100644 --- a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug +++ b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.pug @@ -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) diff --git a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.ts b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.ts index 9c5ea125..93fa7c9b 100644 --- a/tabby-plugin-manager/src/components/pluginsSettingsTab.component.ts +++ b/tabby-plugin-manager/src/components/pluginsSettingsTab.component.ts @@ -32,6 +32,8 @@ export class PluginsSettingsTabComponent { @HostBinding('class.content-box') true installedPlugins$: PluginInfo[] = [] + installedFilter = '' + availableFilter = '' constructor ( private config: ConfigService, diff --git a/tabby-serial/src/components/serialProfileSettings.component.pug b/tabby-serial/src/components/serialProfileSettings.component.pug index 6e44ff12..ea92fb2d 100644 --- a/tabby-serial/src/components/serialProfileSettings.component.pug +++ b/tabby-serial/src/components/serialProfileSettings.component.pug @@ -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 diff --git a/tabby-settings/src/components/windowSettingsTab.component.pug b/tabby-settings/src/components/windowSettingsTab.component.pug index 225fed4b..666e85b2 100644 --- a/tabby-settings/src/components/windowSettingsTab.component.pug +++ b/tabby-settings/src/components/windowSettingsTab.component.pug @@ -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', diff --git a/tabby-ssh/src/components/hostKeyPromptModal.component.pug b/tabby-ssh/src/components/hostKeyPromptModal.component.pug index c471e747..beebd0da 100644 --- a/tabby-ssh/src/components/hostKeyPromptModal.component.pug +++ b/tabby-ssh/src/components/hostKeyPromptModal.component.pug @@ -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 diff --git a/tabby-ssh/src/components/sshProfileSettings.component.pug b/tabby-ssh/src/components/sshProfileSettings.component.pug index bb1f8a15..7b0bafdc 100644 --- a/tabby-ssh/src/components/sshProfileSettings.component.pug +++ b/tabby-ssh/src/components/sshProfileSettings.component.pug @@ -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)' diff --git a/tabby-ssh/src/components/sshTab.component.pug b/tabby-ssh/src/components/sshTab.component.pug index b38ecb2d..f4ef807f 100644 --- a/tabby-ssh/src/components/sshTab.component.pug +++ b/tabby-ssh/src/components/sshTab.component.pug @@ -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()' ) diff --git a/tabby-terminal/src/components/baseTerminalTab.component.pug b/tabby-terminal/src/components/baseTerminalTab.component.pug index f31b7e27..62cae54e 100644 --- a/tabby-terminal/src/components/baseTerminalTab.component.pug +++ b/tabby-terminal/src/components/baseTerminalTab.component.pug @@ -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( diff --git a/tabby-terminal/src/components/colorSchemeSelector.component.pug b/tabby-terminal/src/components/colorSchemeSelector.component.pug index b9ac5e0e..ef8641e1 100644 --- a/tabby-terminal/src/components/colorSchemeSelector.component.pug +++ b/tabby-terminal/src/components/colorSchemeSelector.component.pug @@ -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') diff --git a/tabby-terminal/src/components/colorSchemeSelector.component.ts b/tabby-terminal/src/components/colorSchemeSelector.component.ts index 4a15d111..c028368c 100644 --- a/tabby-terminal/src/components/colorSchemeSelector.component.ts +++ b/tabby-terminal/src/components/colorSchemeSelector.component.ts @@ -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() + @Input() model?: TerminalColorScheme + @Output() modelChange = new EventEmitter() @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() diff --git a/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug b/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug index cacd18ff..21444a2c 100644 --- a/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug +++ b/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug @@ -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}}' ) diff --git a/tabby-terminal/src/components/streamProcessingSettings.component.pug b/tabby-terminal/src/components/streamProcessingSettings.component.pug index 17aa129f..d44a5a6c 100644 --- a/tabby-terminal/src/components/streamProcessingSettings.component.pug +++ b/tabby-terminal/src/components/streamProcessingSettings.component.pug @@ -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}} diff --git a/tabby-terminal/src/components/streamProcessingSettings.component.ts b/tabby-terminal/src/components/streamProcessingSettings.component.ts index b6d17eb5..2bc196dd 100644 --- a/tabby-terminal/src/components/streamProcessingSettings.component.ts +++ b/tabby-terminal/src/components/streamProcessingSettings.component.ts @@ -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 + } }