mirror of
https://github.com/Eugeny/tabby.git
synced 2024-11-23 13:13:49 +03:00
ssh: show CWD detection tip more prominently
This commit is contained in:
parent
a31cacf4ee
commit
12362231cf
@ -17,6 +17,16 @@
|
||||
button.btn.btn-link.btn-close((click)='close()') !{require('../../../tabby-core/src/icons/times.svg')}
|
||||
|
||||
.body(dropZone, (transfer)='uploadOne($event)')
|
||||
a.alert.alert-info.d-flex.align-items-center(
|
||||
*ngIf='shouldShowCWDTip && !cwdDetectionAvailable',
|
||||
(click)='platform.openExternal("https://tabby.sh/go/cwd-detection")'
|
||||
)
|
||||
.mr-auto(translate)
|
||||
strong(translate) Working directory detection
|
||||
div(translate) Learn how to allow Tabby to detect remote shell's working directory.
|
||||
button.close((click)='dismissCWDTip()')
|
||||
i.fas.fa-close
|
||||
|
||||
div(*ngIf='!sftp', translate) Connecting
|
||||
div(*ngIf='sftp')
|
||||
div(*ngIf='fileList === null', translate) Loading
|
||||
|
@ -26,11 +26,12 @@ export class SFTPPanelComponent {
|
||||
@Input() path = '/'
|
||||
@Output() pathChange = new EventEmitter<string>()
|
||||
pathSegments: PathSegment[] = []
|
||||
@Input() cwdDetectionAvailable = false
|
||||
|
||||
constructor (
|
||||
private ngbModal: NgbModal,
|
||||
private platform: PlatformService,
|
||||
private notifications: NotificationsService,
|
||||
public platform: PlatformService,
|
||||
@Optional() @Inject(SFTPContextMenuItemProvider) protected contextMenuProviders: SFTPContextMenuItemProvider[],
|
||||
) {
|
||||
this.contextMenuProviders.sort((a, b) => a.weight - b.weight)
|
||||
@ -173,6 +174,14 @@ export class SFTPPanelComponent {
|
||||
this.platform.popupContextMenu(await this.buildContextMenu(item), event)
|
||||
}
|
||||
|
||||
get shouldShowCWDTip (): boolean {
|
||||
return !window.localStorage.sshCWDTipDismissed
|
||||
}
|
||||
|
||||
dismissCWDTip (): void {
|
||||
window.localStorage.sshCWDTipDismissed = 'true'
|
||||
}
|
||||
|
||||
close (): void {
|
||||
this.closed.emit()
|
||||
}
|
||||
|
@ -41,6 +41,7 @@ sftp-panel.bg-dark(
|
||||
*ngIf='sftpPanelVisible',
|
||||
(click)='$event.stopPropagation()',
|
||||
[session]='sshSession',
|
||||
[cwdDetectionAvailable]='session?.supportsWorkingDirectory()',
|
||||
(closed)='sftpPanelVisible = false'
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user