mirror of
https://github.com/Eugeny/tabby.git
synced 2025-01-18 14:04:17 +08:00
This commit is contained in:
parent
92c729dada
commit
6ffeb61c9c
@ -1,6 +1,6 @@
|
|||||||
import { NgModule } from '@angular/core'
|
import { NgModule } from '@angular/core'
|
||||||
import { PlatformService, LogService, UpdaterService, DockingService, HostAppService, ThemesService, Platform, AppService, ConfigService, WIN_BUILD_FLUENT_BG_SUPPORTED, isWindowsBuild, HostWindowService, HotkeyProvider, ConfigProvider, FileProvider } from 'tabby-core'
|
import { PlatformService, LogService, UpdaterService, DockingService, HostAppService, ThemesService, Platform, AppService, ConfigService, WIN_BUILD_FLUENT_BG_SUPPORTED, isWindowsBuild, HostWindowService, HotkeyProvider, ConfigProvider, FileProvider } from 'tabby-core'
|
||||||
import { TerminalColorSchemeProvider } from 'tabby-terminal'
|
import { TerminalColorSchemeProvider, TerminalDecorator } from 'tabby-terminal'
|
||||||
import { SFTPContextMenuItemProvider, SSHProfileImporter, AutoPrivateKeyLocator } from 'tabby-ssh'
|
import { SFTPContextMenuItemProvider, SSHProfileImporter, AutoPrivateKeyLocator } from 'tabby-ssh'
|
||||||
import { PTYInterface, ShellProvider, UACService } from 'tabby-local'
|
import { PTYInterface, ShellProvider, UACService } from 'tabby-local'
|
||||||
import { auditTime } from 'rxjs'
|
import { auditTime } from 'rxjs'
|
||||||
@ -23,6 +23,7 @@ import { ElectronConfigProvider } from './config'
|
|||||||
import { EditSFTPContextMenu } from './sftpContextMenu'
|
import { EditSFTPContextMenu } from './sftpContextMenu'
|
||||||
import { OpenSSHImporter, PrivateKeyLocator, StaticFileImporter } from './sshImporters'
|
import { OpenSSHImporter, PrivateKeyLocator, StaticFileImporter } from './sshImporters'
|
||||||
import { ElectronPTYInterface } from './pty'
|
import { ElectronPTYInterface } from './pty'
|
||||||
|
import { PathDropDecorator } from './pathDrop'
|
||||||
|
|
||||||
import { CmderShellProvider } from './shells/cmder'
|
import { CmderShellProvider } from './shells/cmder'
|
||||||
import { Cygwin32ShellProvider } from './shells/cygwin32'
|
import { Cygwin32ShellProvider } from './shells/cygwin32'
|
||||||
@ -73,6 +74,8 @@ import { VSDevToolsProvider } from './shells/vs'
|
|||||||
|
|
||||||
{ provide: PTYInterface, useClass: ElectronPTYInterface },
|
{ provide: PTYInterface, useClass: ElectronPTYInterface },
|
||||||
|
|
||||||
|
{ provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
|
||||||
|
|
||||||
// For WindowsDefaultShellProvider
|
// For WindowsDefaultShellProvider
|
||||||
PowerShellCoreShellProvider,
|
PowerShellCoreShellProvider,
|
||||||
WSLShellProvider,
|
WSLShellProvider,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core'
|
import { Injectable } from '@angular/core'
|
||||||
import { TerminalDecorator } from '../api/decorator'
|
import { TerminalDecorator, BaseTerminalTabComponent } from 'tabby-terminal'
|
||||||
import { BaseTerminalTabComponent } from '../api/baseTerminalTab.component'
|
import { webUtils } from 'electron'
|
||||||
|
|
||||||
/** @hidden */
|
/** @hidden */
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@ -11,8 +11,8 @@ export class PathDropDecorator extends TerminalDecorator {
|
|||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}))
|
}))
|
||||||
this.subscribeUntilDetached(terminal, terminal.frontend?.drop$.subscribe((event: DragEvent) => {
|
this.subscribeUntilDetached(terminal, terminal.frontend?.drop$.subscribe((event: DragEvent) => {
|
||||||
for (const file of event.dataTransfer!.files as any) {
|
for (const file of event.dataTransfer!.files as unknown as Iterable<File>) {
|
||||||
this.injectPath(terminal, file.path)
|
this.injectPath(terminal, webUtils.getPathForFile(file))
|
||||||
}
|
}
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
}))
|
}))
|
@ -26,7 +26,6 @@ import { TerminalContextMenuItemProvider } from './api/contextMenuProvider'
|
|||||||
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
import { TerminalColorSchemeProvider } from './api/colorSchemeProvider'
|
||||||
import { TerminalSettingsTabProvider, AppearanceSettingsTabProvider, ColorSchemeSettingsTabProvider } from './settings'
|
import { TerminalSettingsTabProvider, AppearanceSettingsTabProvider, ColorSchemeSettingsTabProvider } from './settings'
|
||||||
import { DebugDecorator } from './features/debug'
|
import { DebugDecorator } from './features/debug'
|
||||||
import { PathDropDecorator } from './features/pathDrop'
|
|
||||||
import { ZModemDecorator } from './features/zmodem'
|
import { ZModemDecorator } from './features/zmodem'
|
||||||
import { TerminalConfigProvider } from './config'
|
import { TerminalConfigProvider } from './config'
|
||||||
import { TerminalHotkeyProvider } from './hotkeys'
|
import { TerminalHotkeyProvider } from './hotkeys'
|
||||||
@ -54,7 +53,6 @@ import { DefaultColorSchemes } from './colorSchemes'
|
|||||||
|
|
||||||
{ provide: ConfigProvider, useClass: TerminalConfigProvider, multi: true },
|
{ provide: ConfigProvider, useClass: TerminalConfigProvider, multi: true },
|
||||||
{ provide: HotkeyProvider, useClass: TerminalHotkeyProvider, multi: true },
|
{ provide: HotkeyProvider, useClass: TerminalHotkeyProvider, multi: true },
|
||||||
{ provide: TerminalDecorator, useClass: PathDropDecorator, multi: true },
|
|
||||||
{ provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
|
{ provide: TerminalDecorator, useClass: ZModemDecorator, multi: true },
|
||||||
{ provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
|
{ provide: TerminalDecorator, useClass: DebugDecorator, multi: true },
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user