本页面介绍了Tabby的Web实现,它允许终端应用程序在浏览器环境中运行。本页面涵盖了Web版本的架构、组件和技术细节,与桌面Electron实现(在 Electron Implementation 中介绍)有所区别。
Tabby的Web实现允许用户直接通过Web浏览器访问终端功能,而无需安装桌面应用程序。它使用特定于Web的技术实现了核心的Platform Service接口,同时在可能的情况下保持了功能的一致性。
来源: tabby-web/src/platform.ts14-149 tabby-core/src/api/platform.ts112-242
Web实现的核心是WebPlatformService类,它继承自核心API的抽象PlatformService。它将Tabby的平台无关接口适配到浏览器环境。
来源: tabby-web/src/platform.ts14-149 tabby-core/src/api/platform.ts65-85 tabby-core/src/api/platform.ts244-281
The WebPlatformService uses browser APIs to implement all platform-specific operations.
| 操作 | 实现细节 |
|---|---|
| 剪贴板 | Uses copyToClipboard utility, limited to text content |
| 文件上传 | Uses HTML file input element with change handlers |
| File Download | Creates downloadable Blobs with temporary links |
| 上下文菜单 | Uses Vaadin custom element for popup menus |
| 配置 | Delegates to connector service |
| Dialog Boxes | Uses Angular NgbModal service |
来源: tabby-web/src/platform.ts38-149 tabby-core/src/api/platform.ts65-85 tabby-core/src/api/platform.ts244-281
Web版本的下载通过HTML文件输入和File API处理。当用户发起上传时
HTMLFileUpload 对象中ReadableStream 接口访问来源: tabby-web/src/platform.ts117-136 tabby-core/src/api/platform.ts244-281
Downloads are handled by
来源: tabby-web/src/platform.ts151-194
The web implementation also supports drag-and-drop file operations through the HTML5 Drag and Drop API
来源: tabby-core/src/directives/dropZone.directive.ts1-47 tabby-core/src/api/platform.ts133-179
The web implementation uses Vaadin's context menu component to provide right-click menus
来源: tabby-web/src/platform.ts70-78
Message boxes are implemented using Angular's NgbModal service
来源: tabby-web/src/platform.ts93-105
The web implementation works with the same plugin architecture as the desktop version, with some adaptations for web environments.
来源: app/src/plugins.ts190-226 app/src/plugins.ts228-262 app/src/entry.ts34-55 app/src/entry.ts57-82
When running in web mode, the application specifically includes web-compatible plugins and excludes desktop-only functionality
This filtering ensures that only web-compatible plugins are loaded in the browser environment.
The web implementation has certain limitations compared to the desktop version
| 功能 | Web 实现 | Electron 实现 |
|---|---|---|
| 文件系统访问 | Limited to browser sandbox | Full file system access |
| Shell 集成 | 不支持 | Supported on compatible platforms |
| Native Clipboard | Limited functionality | Full functionality |
| Directory Upload | 有限支持 | 完全支持 |
| 进程管理 | 不支持 | 支持 |
| Font Detection | Limited to browser fonts | Access to system fonts |
来源: tabby-web/src/platform.ts138-140 tabby-electron/src/services/platform.service.ts108-122 tabby-electron/src/services/platform.service.ts160-178
Terminal features like ZModem file transfer protocol are adapted to work with the web platform's file handling capabilities
来源: tabby-terminal/src/features/zmodem.ts76-96 tabby-ssh/src/components/sftpPanel.component.ts178-186 tabby-ssh/src/components/sftpPanel.component.pug24-30
The web implementation includes support for SFTP operations, allowing users to
The SFTP panel adapts to the web platform's file handling capabilities
来源: tabby-ssh/src/components/sftpPanel.component.ts178-186 tabby-ssh/src/components/sftpPanel.component.pug24-30
Tabby的Web实现提供了一个基于浏览器的终端体验,它保留了核心功能,同时适应了浏览器限制。它利用现代Web API进行文件处理、UI组件和终端仿真。虽然与桌面版本相比,某些功能受到限制,但Web实现提供了无需安装即可访问的优势。
刷新此 Wiki
最后索引时间2025 年 4 月 18 日(c3dfb3)