Compare commits

...

14 Commits

Author SHA1 Message Date
Supra4E8C
8b07159c35 refactor(app.js): improve API key handling and display logic
- Enhanced the masking and display of API keys to ensure proper handling of null or undefined values.
- Updated the HTML rendering logic to use normalized and escaped key values for better security and consistency.
- Improved the handling of key arguments in button actions to prevent potential issues with special characters.
- Refactored the file name handling in the UI to ensure proper escaping and display of file names.
2025-11-12 12:04:58 +08:00
Supra4E8C
5b1be05eb9 feat(index.html): add Vertex AI credential import UI
- Implemented the UI for importing Vertex AI credentials, including file selection and input fields for location and JSON key.
- Enhanced internationalization support with appropriate labels and hints in both English and Chinese.
- Removed the previous implementation of the Vertex AI credential import section to streamline the code.
2025-11-11 18:28:56 +08:00
Supra4E8C
a4fd672458 feat(app.js, i18n, index.html, styles): implement Vertex AI credential import feature
- Added functionality for importing Vertex AI credentials, including file selection and upload handling in the CLIProxyManager.
- Updated UI components in index.html to support the new Vertex AI credential import feature.
- Enhanced internationalization strings to provide appropriate labels and messages for the Vertex AI import functionality in both English and Chinese.
- Introduced new styles for the Vertex AI credential import section to ensure a consistent user experience.
2025-11-11 18:19:35 +08:00
Supra4E8C
6f1c7b168d feat(app.js, i18n, index.html): add request logging and WebSocket authentication settings
- Introduced toggles for enabling request logging and WebSocket authentication in the UI.
- Implemented methods to load and update the respective settings in the CLIProxyManager.
- Updated internationalization strings to support new features in both English and Chinese.
2025-11-11 12:32:56 +08:00
Luis Pater
1d7408cb25 feat(app.js, i18n): enhance auth file management with filtering and update related UI messages 2025-11-11 11:50:12 +08:00
Supra4E8C
3468fd8373 feat(app.js, styles): enhance connection state handling and update editor dimensions
- Added a new property to track the last connection state in CLIProxyManager.
- Updated the config editor availability logic to reflect changes in connection state.
- Increased minimum height for various editor components in styles to improve usability.
- Introduced responsive styles for smaller screens to ensure proper display of editor elements.
2025-11-10 18:07:31 +08:00
Supra4E8C
4f15c3f5c5 feat(app.js, i18n): enforce required base URL for Codex API configuration
- Updated the Codex API configuration modals to mark the Base URL field as required.
- Added validation to ensure the Base URL is provided before submission, with appropriate error notifications.
- Updated internationalization strings to reflect the change in the Base URL label from "Optional" to "Required" in both English and Chinese.
2025-11-10 12:16:46 +08:00
hkfires
72cd117aab fix(logs): exclude all /v0/management/ API entries from viewer 2025-11-10 10:40:28 +08:00
hkfires
5d62cd91f2 perf(cli): prefetch /usage, derive keyStats, reuse across renders 2025-11-10 10:32:57 +08:00
Supra4E8C
6837100dec feat(app.js, i18n, styles): implement custom headers functionality in API key management
- Added the ability to input custom HTTP headers for API keys in the CLIProxyManager.
- Introduced new methods for adding, populating, collecting, and applying custom headers.
- Updated the UI to include input fields for custom headers in the modals for adding and editing API keys.
- Enhanced internationalization strings to support custom headers in both English and Chinese.
- Added corresponding styles for the new header input fields and badges in the UI.
2025-11-09 18:27:29 +08:00
Supra4E8C
8542041981 feat(app.js, i18n): support batch addition of Gemini API keys with enhanced UI
- Updated the Gemini API key modal to allow input of multiple keys, each on a new line.
- Added a hint for users on how to input multiple keys and updated the corresponding internationalization strings.
- Enhanced the key addition logic to handle success, skipped, and failed counts, providing detailed feedback to users.
- Improved error handling and notifications for batch operations.
2025-11-09 18:06:56 +08:00
Supra4E8C
35ceab0dae feat(app.js, i18n): enhance Gemini API key management with base URL support
- Updated the CLIProxyManager to handle both API keys and optional base URLs for Gemini.
- Added new input fields in the modal for base URL entry during key addition and editing.
- Updated internationalization strings to include labels and placeholders for the base URL in both English and Chinese.
- Improved key normalization and rendering logic to accommodate the new structure.
2025-11-09 17:51:38 +08:00
Supra4E8C
d3fe186df7 refactor(app.js): remove modal click event listener to streamline modal behavior 2025-11-09 17:20:02 +08:00
Supra4E8C
5aff22a20b fix(ui): update modal styles for better responsiveness and overflow handling 2025-11-09 17:17:49 +08:00
5 changed files with 1209 additions and 130 deletions

1018
app.js

File diff suppressed because it is too large Load Diff

102
i18n.js
View File

@@ -41,6 +41,11 @@ const i18n = {
'common.failure': '失败',
'common.unknown_error': '未知错误',
'common.copy': '复制',
'common.custom_headers_label': '自定义请求头',
'common.custom_headers_hint': '可选,设置需要附带到请求中的 HTTP 头,名称和值均不能为空。',
'common.custom_headers_add': '添加请求头',
'common.custom_headers_key_placeholder': 'Header 名称,例如 X-Custom-Header',
'common.custom_headers_value_placeholder': 'Header 值',
// 页面标题
'title.main': 'CLI Proxy API Management Center',
@@ -108,6 +113,9 @@ const i18n = {
'basic_settings.usage_statistics_enable': '启用使用统计',
'basic_settings.logging_title': '日志记录',
'basic_settings.logging_to_file_enable': '启用日志记录到文件',
'basic_settings.request_log_enable': '启用请求日志',
'basic_settings.ws_auth_title': 'WebSocket 鉴权',
'basic_settings.ws_auth_enable': '启用 /ws/* 鉴权',
// API 密钥管理
'api_keys.title': 'API 密钥管理',
@@ -131,10 +139,14 @@ const i18n = {
'ai_providers.gemini_empty_desc': '点击上方按钮添加第一个密钥',
'ai_providers.gemini_item_title': 'Gemini密钥',
'ai_providers.gemini_add_modal_title': '添加Gemini API密钥',
'ai_providers.gemini_add_modal_key_label': 'API密钥:',
'ai_providers.gemini_add_modal_key_placeholder': '请输入Gemini API密钥',
'ai_providers.gemini_add_modal_key_label': 'API密钥列表:',
'ai_providers.gemini_add_modal_key_placeholder': '请输入Gemini API密钥(每行一个)',
'ai_providers.gemini_add_modal_key_hint': '可一次粘贴多个密钥,每行一个。',
'ai_providers.gemini_add_modal_url_label': 'Base URL (可选):',
'ai_providers.gemini_add_modal_url_placeholder': '例如: https://generativelanguage.googleapis.com',
'ai_providers.gemini_edit_modal_title': '编辑Gemini API密钥',
'ai_providers.gemini_edit_modal_key_label': 'API密钥:',
'ai_providers.gemini_edit_modal_url_label': 'Base URL (可选):',
'ai_providers.gemini_delete_confirm': '确定要删除这个Gemini密钥吗',
'ai_providers.codex_title': 'Codex API 配置',
@@ -145,13 +157,13 @@ const i18n = {
'ai_providers.codex_add_modal_title': '添加Codex API配置',
'ai_providers.codex_add_modal_key_label': 'API密钥:',
'ai_providers.codex_add_modal_key_placeholder': '请输入Codex API密钥',
'ai_providers.codex_add_modal_url_label': 'Base URL (可选):',
'ai_providers.codex_add_modal_url_label': 'Base URL (必填):',
'ai_providers.codex_add_modal_url_placeholder': '例如: https://api.example.com',
'ai_providers.codex_add_modal_proxy_label': '代理 URL (可选):',
'ai_providers.codex_add_modal_proxy_placeholder': '例如: socks5://proxy.example.com:1080',
'ai_providers.codex_edit_modal_title': '编辑Codex API配置',
'ai_providers.codex_edit_modal_key_label': 'API密钥:',
'ai_providers.codex_edit_modal_url_label': 'Base URL (可选):',
'ai_providers.codex_edit_modal_url_label': 'Base URL (必填):',
'ai_providers.codex_edit_modal_proxy_label': '代理 URL (可选):',
'ai_providers.codex_delete_confirm': '确定要删除这个Codex配置吗',
@@ -205,7 +217,7 @@ const i18n = {
// 认证文件管理
'auth_files.title': '认证文件管理',
'auth_files.title_section': '认证文件',
'auth_files.description': '这里管理 QwenGemini 的认证配置文件。上传 JSON 格式的认证文件以启用相应的 AI 服务。',
'auth_files.description': '这里集中管理 CLI Proxy 支持的所有 JSON 认证文件(如 QwenGemini、Vertex 等),上传后即可在运行时启用相应的 AI 服务。',
'auth_files.upload_button': '上传文件',
'auth_files.delete_all_button': '删除全部',
'auth_files.empty_title': '暂无认证文件',
@@ -216,11 +228,15 @@ const i18n = {
'auth_files.delete_button': '删除',
'auth_files.delete_confirm': '确定要删除文件',
'auth_files.delete_all_confirm': '确定要删除所有认证文件吗?此操作不可恢复!',
'auth_files.delete_filtered_confirm': '确定要删除筛选出的 {type} 认证文件吗?此操作不可恢复!',
'auth_files.upload_error_json': '只能上传JSON文件',
'auth_files.upload_success': '文件上传成功',
'auth_files.download_success': '文件下载成功',
'auth_files.delete_success': '文件删除成功',
'auth_files.delete_all_success': '成功删除',
'auth_files.delete_filtered_success': '成功删除 {count} 个 {type} 认证文件',
'auth_files.delete_filtered_partial': '{type} 认证文件删除完成,成功 {success} 个,失败 {failed} 个',
'auth_files.delete_filtered_none': '当前筛选类型 ({type}) 下没有可删除的认证文件',
'auth_files.files_count': '个文件',
'auth_files.filter_all': '全部',
'auth_files.filter_qwen': 'Qwen',
@@ -230,6 +246,7 @@ const i18n = {
'auth_files.filter_claude': 'Claude',
'auth_files.filter_codex': 'Codex',
'auth_files.filter_iflow': 'iFlow',
'auth_files.filter_vertex': 'Vertex',
'auth_files.filter_empty': '空文件',
'auth_files.filter_unknown': '其他',
'auth_files.type_qwen': 'Qwen',
@@ -239,8 +256,26 @@ const i18n = {
'auth_files.type_claude': 'Claude',
'auth_files.type_codex': 'Codex',
'auth_files.type_iflow': 'iFlow',
'auth_files.type_vertex': 'Vertex',
'auth_files.type_empty': '空文件',
'auth_files.type_unknown': '其他',
'vertex_import.title': 'Vertex AI 凭证导入',
'vertex_import.description': '上传 Google 服务账号 JSON使用 CLI vertex-import 同步规则写入 auth-dir/vertex-<project>.json。',
'vertex_import.location_label': '目标区域 (可选)',
'vertex_import.location_placeholder': 'us-central1',
'vertex_import.location_hint': '留空表示使用默认区域 us-central1。',
'vertex_import.file_label': '服务账号密钥 JSON',
'vertex_import.file_hint': '仅支持 Google Cloud service account key JSON 文件,私钥会自动规范化。',
'vertex_import.file_placeholder': '尚未选择文件',
'vertex_import.choose_file': '选择文件',
'vertex_import.import_button': '导入 Vertex 凭证',
'vertex_import.file_required': '请先选择 .json 凭证文件',
'vertex_import.success': 'Vertex 凭证导入成功',
'vertex_import.result_title': '凭证已保存',
'vertex_import.result_project': '项目 ID',
'vertex_import.result_email': '服务账号',
'vertex_import.result_location': '区域',
'vertex_import.result_file': '存储文件',
// Codex OAuth
@@ -394,15 +429,21 @@ const i18n = {
'notification.quota_switch_preview_updated': '预览模型切换设置已更新',
'notification.usage_statistics_updated': '使用统计设置已更新',
'notification.logging_to_file_updated': '日志记录设置已更新',
'notification.request_log_updated': '请求日志设置已更新',
'notification.ws_auth_updated': 'WebSocket 鉴权设置已更新',
'notification.api_key_added': 'API密钥添加成功',
'notification.api_key_updated': 'API密钥更新成功',
'notification.api_key_deleted': 'API密钥删除成功',
'notification.gemini_key_added': 'Gemini密钥添加成功',
'notification.gemini_key_updated': 'Gemini密钥更新成功',
'notification.gemini_key_deleted': 'Gemini密钥删除成功',
'notification.gemini_multi_input_required': '请先输入至少一个Gemini密钥',
'notification.gemini_multi_failed': 'Gemini密钥批量添加失败',
'notification.gemini_multi_summary': 'Gemini批量添加完成成功 {success},跳过 {skipped},失败 {failed}',
'notification.codex_config_added': 'Codex配置添加成功',
'notification.codex_config_updated': 'Codex配置更新成功',
'notification.codex_config_deleted': 'Codex配置删除成功',
'notification.codex_base_url_required': '请填写Codex Base URL',
'notification.claude_config_added': 'Claude配置添加成功',
'notification.claude_config_updated': 'Claude配置更新成功',
'notification.claude_config_deleted': 'Claude配置删除成功',
@@ -487,6 +528,11 @@ const i18n = {
'common.failure': 'Failure',
'common.unknown_error': 'Unknown error',
'common.copy': 'Copy',
'common.custom_headers_label': 'Custom Headers',
'common.custom_headers_hint': 'Optional HTTP headers to send with the request. Leave blank to remove.',
'common.custom_headers_add': 'Add Header',
'common.custom_headers_key_placeholder': 'Header name, e.g. X-Custom-Header',
'common.custom_headers_value_placeholder': 'Header value',
// Page titles
'title.main': 'CLI Proxy API Management Center',
@@ -554,6 +600,9 @@ const i18n = {
'basic_settings.usage_statistics_enable': 'Enable usage statistics',
'basic_settings.logging_title': 'Logging',
'basic_settings.logging_to_file_enable': 'Enable logging to file',
'basic_settings.request_log_enable': 'Enable request logging',
'basic_settings.ws_auth_title': 'WebSocket Authentication',
'basic_settings.ws_auth_enable': 'Require auth for /ws/*',
// API Keys management
'api_keys.title': 'API Keys Management',
@@ -577,10 +626,14 @@ const i18n = {
'ai_providers.gemini_empty_desc': 'Click the button above to add the first key',
'ai_providers.gemini_item_title': 'Gemini Key',
'ai_providers.gemini_add_modal_title': 'Add Gemini API Key',
'ai_providers.gemini_add_modal_key_label': 'API Key:',
'ai_providers.gemini_add_modal_key_placeholder': 'Please enter Gemini API key',
'ai_providers.gemini_add_modal_key_label': 'API Keys:',
'ai_providers.gemini_add_modal_key_placeholder': 'Enter Gemini API keys (one per line)',
'ai_providers.gemini_add_modal_key_hint': 'You can paste multiple keys, one per line.',
'ai_providers.gemini_add_modal_url_label': 'Base URL (optional):',
'ai_providers.gemini_add_modal_url_placeholder': 'e.g. https://generativelanguage.googleapis.com',
'ai_providers.gemini_edit_modal_title': 'Edit Gemini API Key',
'ai_providers.gemini_edit_modal_key_label': 'API Key:',
'ai_providers.gemini_edit_modal_url_label': 'Base URL (optional):',
'ai_providers.gemini_delete_confirm': 'Are you sure you want to delete this Gemini key?',
'ai_providers.codex_title': 'Codex API Configuration',
@@ -591,13 +644,13 @@ const i18n = {
'ai_providers.codex_add_modal_title': 'Add Codex API Configuration',
'ai_providers.codex_add_modal_key_label': 'API Key:',
'ai_providers.codex_add_modal_key_placeholder': 'Please enter Codex API key',
'ai_providers.codex_add_modal_url_label': 'Base URL (Optional):',
'ai_providers.codex_add_modal_url_label': 'Base URL (Required):',
'ai_providers.codex_add_modal_url_placeholder': 'e.g.: https://api.example.com',
'ai_providers.codex_add_modal_proxy_label': 'Proxy URL (Optional):',
'ai_providers.codex_add_modal_proxy_placeholder': 'e.g.: socks5://proxy.example.com:1080',
'ai_providers.codex_edit_modal_title': 'Edit Codex API Configuration',
'ai_providers.codex_edit_modal_key_label': 'API Key:',
'ai_providers.codex_edit_modal_url_label': 'Base URL (Optional):',
'ai_providers.codex_edit_modal_url_label': 'Base URL (Required):',
'ai_providers.codex_edit_modal_proxy_label': 'Proxy URL (Optional):',
'ai_providers.codex_delete_confirm': 'Are you sure you want to delete this Codex configuration?',
@@ -651,7 +704,7 @@ const i18n = {
// Auth files management
'auth_files.title': 'Auth Files Management',
'auth_files.title_section': 'Auth Files',
'auth_files.description': 'Here you can manage authentication configuration files for Qwen and Gemini. Upload JSON format authentication files to enable the corresponding AI services.',
'auth_files.description': 'Manage all CLI Proxy JSON auth files here (e.g. Qwen, Gemini, Vertex). Uploading a credential immediately enables the corresponding AI integration.',
'auth_files.upload_button': 'Upload File',
'auth_files.delete_all_button': 'Delete All',
'auth_files.empty_title': 'No Auth Files',
@@ -662,11 +715,15 @@ const i18n = {
'auth_files.delete_button': 'Delete',
'auth_files.delete_confirm': 'Are you sure you want to delete file',
'auth_files.delete_all_confirm': 'Are you sure you want to delete all auth files? This operation cannot be undone!',
'auth_files.delete_filtered_confirm': 'Are you sure you want to delete all {type} auth files? This operation cannot be undone!',
'auth_files.upload_error_json': 'Only JSON files are allowed',
'auth_files.upload_success': 'File uploaded successfully',
'auth_files.download_success': 'File downloaded successfully',
'auth_files.delete_success': 'File deleted successfully',
'auth_files.delete_all_success': 'Successfully deleted',
'auth_files.delete_filtered_success': 'Deleted {count} {type} auth files successfully',
'auth_files.delete_filtered_partial': '{type} auth files deletion finished: {success} succeeded, {failed} failed',
'auth_files.delete_filtered_none': 'No deletable auth files under the current filter ({type})',
'auth_files.files_count': 'files',
'auth_files.filter_all': 'All',
'auth_files.filter_qwen': 'Qwen',
@@ -676,6 +733,7 @@ const i18n = {
'auth_files.filter_claude': 'Claude',
'auth_files.filter_codex': 'Codex',
'auth_files.filter_iflow': 'iFlow',
'auth_files.filter_vertex': 'Vertex',
'auth_files.filter_empty': 'Empty',
'auth_files.filter_unknown': 'Other',
'auth_files.type_qwen': 'Qwen',
@@ -685,8 +743,26 @@ const i18n = {
'auth_files.type_claude': 'Claude',
'auth_files.type_codex': 'Codex',
'auth_files.type_iflow': 'iFlow',
'auth_files.type_vertex': 'Vertex',
'auth_files.type_empty': 'Empty',
'auth_files.type_unknown': 'Other',
'vertex_import.title': 'Vertex AI Credential Import',
'vertex_import.description': 'Upload a Google service account JSON to store it as auth-dir/vertex-<project>.json using the same rules as the CLI vertex-import helper.',
'vertex_import.location_label': 'Region (optional)',
'vertex_import.location_placeholder': 'us-central1',
'vertex_import.location_hint': 'Leave empty to use the default region us-central1.',
'vertex_import.file_label': 'Service account key JSON',
'vertex_import.file_hint': 'Only Google Cloud service account key JSON files are accepted.',
'vertex_import.file_placeholder': 'No file selected',
'vertex_import.choose_file': 'Choose File',
'vertex_import.import_button': 'Import Vertex Credential',
'vertex_import.file_required': 'Select a .json credential file first',
'vertex_import.success': 'Vertex credential imported successfully',
'vertex_import.result_title': 'Credential saved',
'vertex_import.result_project': 'Project ID',
'vertex_import.result_email': 'Service account',
'vertex_import.result_location': 'Region',
'vertex_import.result_file': 'Persisted file',
// Codex OAuth
'auth_login.codex_oauth_title': 'Codex OAuth',
@@ -839,15 +915,21 @@ const i18n = {
'notification.quota_switch_preview_updated': 'Preview model switch settings updated',
'notification.usage_statistics_updated': 'Usage statistics settings updated',
'notification.logging_to_file_updated': 'Logging settings updated',
'notification.request_log_updated': 'Request logging setting updated',
'notification.ws_auth_updated': 'WebSocket authentication setting updated',
'notification.api_key_added': 'API key added successfully',
'notification.api_key_updated': 'API key updated successfully',
'notification.api_key_deleted': 'API key deleted successfully',
'notification.gemini_key_added': 'Gemini key added successfully',
'notification.gemini_key_updated': 'Gemini key updated successfully',
'notification.gemini_key_deleted': 'Gemini key deleted successfully',
'notification.gemini_multi_input_required': 'Please enter at least one Gemini key',
'notification.gemini_multi_failed': 'Gemini bulk add failed',
'notification.gemini_multi_summary': 'Gemini bulk add finished: {success} added, {skipped} skipped, {failed} failed',
'notification.codex_config_added': 'Codex configuration added successfully',
'notification.codex_config_updated': 'Codex configuration updated successfully',
'notification.codex_config_deleted': 'Codex configuration deleted successfully',
'notification.codex_base_url_required': 'Please enter the Codex Base URL',
'notification.claude_config_added': 'Claude configuration added successfully',
'notification.claude_config_updated': 'Claude configuration updated successfully',
'notification.claude_config_deleted': 'Claude configuration deleted successfully',

View File

@@ -316,6 +316,32 @@
<span class="toggle-label"
data-i18n="basic_settings.logging_to_file_enable">启用日志记录到文件</span>
</div>
<div class="toggle-group">
<label class="toggle-switch">
<input type="checkbox" id="request-log-toggle">
<span class="slider"></span>
</label>
<span class="toggle-label"
data-i18n="basic_settings.request_log_enable">启用请求日志</span>
</div>
</div>
</div>
<!-- WebSocket 鉴权 -->
<div class="card">
<div class="card-header">
<h3><i class="fas fa-shield-alt"></i> <span
data-i18n="basic_settings.ws_auth_title">WebSocket 鉴权</span></h3>
</div>
<div class="card-content">
<div class="toggle-group">
<label class="toggle-switch">
<input type="checkbox" id="ws-auth-toggle">
<span class="slider"></span>
</label>
<span class="toggle-label"
data-i18n="basic_settings.ws_auth_enable">启用 /ws/* 鉴权</span>
</div>
</div>
</div>
@@ -402,6 +428,51 @@
<div id="openai-providers-list" class="provider-list"></div>
</div>
</div>
<!-- Vertex AI Credential Import -->
<div class="card" id="vertex-import-card">
<div class="card-header">
<h3><i class="fas fa-cloud-upload-alt"></i> <span data-i18n="vertex_import.title">Vertex AI 凭证导入</span></h3>
</div>
<div class="card-content">
<p class="form-hint" data-i18n="vertex_import.description">
上传 Google 服务账号 JSON 并保存为 vertex-<project>.json。
</p>
<div class="form-group">
<label for="vertex-location" data-i18n="vertex_import.location_label">区域 (可选)</label>
<input type="text" id="vertex-location" data-i18n-placeholder="vertex_import.location_placeholder" value="us-central1">
<p class="form-hint" data-i18n="vertex_import.location_hint">留空则使用默认 us-central1。</p>
</div>
<div class="form-group">
<label data-i18n="vertex_import.file_label">服务账号密钥 JSON</label>
<div class="input-group">
<input type="text" id="vertex-file-display" readonly data-i18n-placeholder="vertex_import.file_placeholder" placeholder="尚未选择文件">
<input type="file" id="vertex-file-input" accept=".json" style="display: none;">
<button type="button" id="vertex-select-file" class="btn btn-secondary">
<i class="fas fa-file-upload"></i> <span data-i18n="vertex_import.choose_file">选择文件</span>
</button>
</div>
<p class="form-hint" data-i18n="vertex_import.file_hint">仅支持 Google Cloud service account JSON。</p>
</div>
<div class="form-actions vertex-import-actions">
<button type="button" id="vertex-import-btn" class="btn btn-primary" disabled>
<i class="fas fa-cloud-upload-alt"></i> <span data-i18n="vertex_import.import_button">导入 Vertex 凭证</span>
</button>
</div>
<div id="vertex-import-result" class="vertex-import-result" style="display: none;">
<div class="vertex-import-result-header">
<i class="fas fa-check-circle"></i>
<span data-i18n="vertex_import.result_title">凭证已保存</span>
</div>
<ul>
<li><span data-i18n="vertex_import.result_project">项目 ID</span>: <code id="vertex-result-project">-</code></li>
<li><span data-i18n="vertex_import.result_email">服务账号</span>: <code id="vertex-result-email">-</code></li>
<li><span data-i18n="vertex_import.result_location">区域</span>: <code id="vertex-result-location">-</code></li>
<li><span data-i18n="vertex_import.result_file">存储文件</span>: <code id="vertex-result-file">-</code></li>
</ul>
</div>
</div>
</div>
</section>
<!-- 认证文件管理 -->
@@ -432,6 +503,7 @@
<button class="filter-btn" data-type="claude" data-i18n-text="auth_files.filter_claude">Claude</button>
<button class="filter-btn" data-type="codex" data-i18n-text="auth_files.filter_codex">Codex</button>
<button class="filter-btn" data-type="iflow" data-i18n-text="auth_files.filter_iflow">iFlow</button>
<button class="filter-btn" data-type="vertex" data-i18n-text="auth_files.filter_vertex">Vertex</button>
<button class="filter-btn" data-type="empty" data-i18n-text="auth_files.filter_empty">Empty</button>
</div>
</div>

View File

@@ -26,6 +26,5 @@
"repository": {
"type": "git",
"url": "local"
},
"dependencies": {}
}
}

View File

@@ -1364,6 +1364,7 @@ textarea::placeholder {
display: flex;
flex-direction: column;
gap: 12px;
min-height: 520px;
}
#config-management .card {
@@ -1383,12 +1384,13 @@ textarea::placeholder {
flex: 1;
display: flex;
flex-direction: column;
min-height: 520px;
}
.yaml-editor {
width: 100%;
flex: 1;
min-height: 360px;
min-height: 520px;
border: 1px solid var(--border-primary);
border-radius: 6px;
padding: 12px 14px;
@@ -1402,6 +1404,7 @@ textarea::placeholder {
#config-management .CodeMirror {
flex: 1;
min-height: 520px;
height: 100%;
font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
font-size: 14px;
@@ -1414,8 +1417,10 @@ textarea::placeholder {
#config-management .CodeMirror-scroll {
min-height: 0;
max-height: calc(100vh - 440px);
height: 100%;
max-height: none;
overflow-y: auto;
overscroll-behavior: contain;
}
#config-management .CodeMirror.cm-s-default {
@@ -1458,6 +1463,18 @@ textarea::placeholder {
opacity: 0.6;
}
@media (max-width: 768px) {
.yaml-editor-container,
#config-management .yaml-editor-container {
min-height: 360px;
}
.yaml-editor,
#config-management .CodeMirror {
min-height: 360px;
}
}
.editor-status {
font-size: 13px;
color: var(--text-quaternary);
@@ -2076,9 +2093,13 @@ input:checked+.slider:before {
border-radius: 15px;
width: 90%;
max-width: 550px;
max-height: 90vh;
box-shadow: var(--shadow-modal);
animation: modalSlideIn 0.3s ease;
position: relative;
display: flex;
flex-direction: column;
overflow: hidden;
}
@keyframes modalSlideIn {
@@ -2119,6 +2140,9 @@ input:checked+.slider:before {
#modal-body {
padding: 35px 30px 30px 30px;
flex: 1;
min-height: 0;
overflow-y: auto;
}
/* 模态框标题样式 */
@@ -2807,6 +2831,68 @@ input:checked+.slider:before {
align-self: center;
}
.header-input-list {
display: flex;
flex-direction: column;
gap: 8px;
}
.header-input-row .header-input-group {
display: flex;
align-items: center;
gap: 8px;
}
.header-key-input {
flex: 1;
}
.header-value-input {
flex: 2;
}
.header-separator {
color: var(--text-tertiary);
}
.header-badges-wrapper {
display: flex;
flex-direction: column;
gap: 4px;
}
.header-badge-list {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.header-badge {
background: var(--accent-tertiary);
border: 1px solid var(--border-primary);
border-radius: 12px;
padding: 4px 8px;
font-size: 12px;
color: var(--text-secondary);
display: inline-flex;
gap: 4px;
}
.header-badge strong {
font-weight: 600;
color: var(--text-primary);
}
[data-theme="dark"] .header-badge {
background: rgba(59, 130, 246, 0.15);
border-color: rgba(59, 130, 246, 0.3);
color: var(--text-secondary);
}
[data-theme="dark"] .header-badge strong {
color: var(--text-secondary);
}
/* Codex OAuth 样式 */
#codex-oauth-content {
transition: all 0.3s ease;
@@ -3672,6 +3758,60 @@ input:checked+.slider:before {
color: #f472b6;
}
/* Vertex AI Credential Import */
.vertex-import-actions {
text-align: left;
margin-top: 10px;
}
.vertex-import-result {
margin-top: 20px;
border: 1px dashed var(--border-primary);
border-radius: 12px;
padding: 16px;
background: var(--bg-quaternary);
color: var(--text-primary);
}
.vertex-import-result-header {
display: flex;
align-items: center;
gap: 8px;
font-weight: 600;
margin-bottom: 10px;
color: var(--success-text);
}
.vertex-import-result ul {
list-style: none;
margin: 0;
padding: 0;
}
.vertex-import-result li {
margin-bottom: 6px;
font-size: 14px;
color: var(--text-secondary);
}
.vertex-import-result code {
background: var(--bg-secondary);
border-radius: 6px;
padding: 2px 6px;
font-size: 13px;
color: var(--text-primary);
}
[data-theme="dark"] .vertex-import-result {
border-color: rgba(96, 165, 250, 0.4);
background: rgba(15, 23, 42, 0.4);
}
[data-theme="dark"] .vertex-import-result code {
background: rgba(7, 11, 22, 0.8);
color: #f3f4f6;
}
/* ===== AI提供商统计徽章样式 ===== */
/* 统计信息容器 */