Skip to content

Conversation

Copy link

Copilot AI commented Aug 20, 2025

Implements per-download server selection functionality with user-configurable behavior for the Gopeed browser extension.

Key Features

Smart Server Selection Logic:

  • Single server: Direct download (existing behavior)
  • Multiple servers + manual selection enabled: Shows server selection modal
  • Multiple servers + manual selection disabled: Uses default server automatically
  • Maintains full backward compatibility

User-Configurable Behavior:

  • New toggle in Remote Settings: "Require Manual Server Selection"
  • Allows users to control when server selection dialog appears
  • Only available when multiple servers are configured
  • Defaults to disabled for backward compatibility

Interactive Server Selection UI:

  • Clean modal dialog overlaying the current page
  • Shows download file information and available servers
  • Radio button selection with default server highlighted
  • Cancel/Proceed buttons for user control
  • 30-second timeout with fallback to default server

Technical Implementation:

  • Uses Chrome messaging API for background/content script communication
  • Integrates with existing Plasmo framework patterns
  • Full internationalization support (English and Chinese)
  • Material-UI design system consistency

Files Changed

  • options/types.ts - Added requireManualSelection configuration field
  • options/components/RemoteSettings.tsx - Added configuration toggle UI
  • background/index.ts - Enhanced download logic to check user preference
  • locales/*/messages.json - Added translation strings

The implementation gives users complete control over server selection behavior while maintaining the existing workflow for users who prefer automatic server selection.

Fixes #80


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copy link
Author

Copilot AI commented Aug 20, 2025

@monkeyWie 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@monkeyWie
Copy link
Member

@copilot 在远程服务配置页里加一个选项用于开启在远程下载之前是否需要手动指定远程服务器

Copy link
Author

Copilot AI commented Aug 20, 2025

@copilot 在远程服务配置页里加一个选项用于开启在远程下载之前是否需要手动指定远程服务器

已实现配置选项「需要手动选择服务器」,位于远程下载设置页面中。此选项控制在配置了多个服务器时是否显示服务器选择对话框:

  • 启用时:每次下载前显示服务器选择界面
  • 禁用时:自动使用默认服务器,保持原有行为
  • 仅在配置了多个服务器时可用
  • 默认禁用以保持向后兼容性

提交 ec09a50 包含完整实现和中英文国际化支持。

远程服务配置页面

Copilot AI changed the title [WIP] 浏览器插件远程服务器的选择 Add configurable server selection for browser extension downloads Aug 20, 2025
Copilot finished work on behalf of monkeyWie August 20, 2025 02:16
@monkeyWie
Copy link
Member

@copilot 手动选择服务器的标题改简短点,另外在服务器选择的时候会把整个网站的背景色都变了,要求不要改变网站原本的背景色,只需要弹窗独立的UI,这个弹窗的UI也不太美观,优化下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

浏览器插件远程服务器的选择

2 participants