Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file.

## [3.7.0] - 2026-07-04

### Added
- One-click import test key: added an "导入测试密钥" button next to the API Key field to quickly populate default working configurations (API Key, Endpoint, and Model) for a frictionless setup. Includes remote fetch from GitHub and local base64 fallback.

### Fixed
- Fixed datalist autocomplete: resolved issue #13 by clearing the model input on click/focus to show all presets, and restoring the previous value on blur if left empty.

## [3.6.1] - 2026-07-03

### Added
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "AI-based Translator",
"version": "3.6.1",
"version": "3.7.0",
"description": "Chinese, English, Japanese, and Korean AI translation assistant",
"permissions": ["storage"],
"background": {
Expand Down
4 changes: 4 additions & 0 deletions popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ document.addEventListener('DOMContentLoaded', () => {
const data = await response.json();
if (data && typeof data.key === 'string' && data.key.trim()) {
apiKeyInput.value = atob(data.key.trim());
if (apiEndpointInput) apiEndpointInput.value = DEFAULT_API_ENDPOINT;
if (modelInput) modelInput.value = DEFAULT_MODEL;
showToast('导入测试密钥成功!请保存设置。', 'success');
} else {
throw new Error('格式无效。');
Expand All @@ -512,6 +514,8 @@ document.addEventListener('DOMContentLoaded', () => {
try {
const localKey = atob(kPart1 + kPart2);
apiKeyInput.value = localKey;
if (apiEndpointInput) apiEndpointInput.value = DEFAULT_API_ENDPOINT;
if (modelInput) modelInput.value = DEFAULT_MODEL;
showToast('从本地备份导入密钥成功!请保存设置。', 'success');
} catch (localError) {
showToast('导入失败,请手动配置。', 'error');
Expand Down
Loading