diff --git a/README-JA.md b/README-JA.md index 7e3e848..ace954b 100644 --- a/README-JA.md +++ b/README-JA.md @@ -134,7 +134,7 @@ AIClient-2-APIを使い始める最も推奨される方法は、自動起動ス #### Web UI管理コントロールコンソール -![Web UI](src/img/web.png) +![Web UI](src/img/zh.png) 以下の機能モジュールを備えたWeb管理インターフェース: @@ -272,6 +272,15 @@ AIClient-2-APIプロジェクトに貢献してくれたすべての開発者に [![Contributors](https://contrib.rocks/image?repo=justlovemaki/AIClient-2-API)](https://github.com/justlovemaki/AIClient-2-API/graphs/contributors) +### スポンサーリスト + +プロジェクトをサポートしてくださっているスポンサーの皆様に深く感謝いたします: + +- [**Cigarliu**](https://github.com/Cigarliu "9.9") +- [**xianengqi**](https://github.com/xianengqi "9.9") +- [**3831143avl**](https://github.com/3831143avl "10") +- [**醉春风**](https://github.com/handsometong "28.8") +- [**crazy**](https://github.com/404 "88") ### 🌟 Star History diff --git a/README-ZH.md b/README-ZH.md index 734fd44..d663989 100644 --- a/README-ZH.md +++ b/README-ZH.md @@ -133,7 +133,7 @@ #### Web UI 管理控制台 -![Web UI](src/img/web.png) +![Web UI](src/img/zh.png) 功能完善的 Web 管理界面,包含: @@ -269,6 +269,15 @@ curl http://localhost:3000/ollama/api/chat \ [![Contributors](https://contrib.rocks/image?repo=justlovemaki/AIClient-2-API)](https://github.com/justlovemaki/AIClient-2-API/graphs/contributors) +### 赞助者列表 + +非常感谢以下赞助者对本项目的支持: + +- [**Cigarliu**](https://github.com/Cigarliu "9.9") +- [**xianengqi**](https://github.com/xianengqi "9.9") +- [**3831143avl**](https://github.com/3831143avl "10") +- [**醉春风**](https://github.com/handsometong "28.8") +- [**crazy**](https://github.com/404 "88") ### 🌟 Star History diff --git a/README.md b/README.md index e5c361f..dee1aec 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Go to the **"Configuration"** page, you can: #### Web UI Management Console -![Web UI](src/img/web.png) +![Web UI](src/img/en.png) A functional Web management interface, including: @@ -272,6 +272,15 @@ Thanks to all the developers who contributed to the AIClient-2-API project: [![Contributors](https://contrib.rocks/image?repo=justlovemaki/AIClient-2-API)](https://github.com/justlovemaki/AIClient-2-API/graphs/contributors) +### Sponsor List + +We are grateful for the support from our sponsors: + +- [**Cigarliu**](https://github.com/Cigarliu "9.9") +- [**xianengqi**](https://github.com/xianengqi "9.9") +- [**3831143avl**](https://github.com/3831143avl "10") +- [**醉春风**](https://github.com/handsometong "28.8") +- [**crazy**](https://github.com/404 "88") ### 🌟 Star History diff --git a/src/img/en.png b/src/img/en.png new file mode 100644 index 0000000..e4aa340 Binary files /dev/null and b/src/img/en.png differ diff --git a/src/img/zh.png b/src/img/zh.png new file mode 100644 index 0000000..28d9413 Binary files /dev/null and b/src/img/zh.png differ diff --git a/src/oauth-handlers.js b/src/oauth-handlers.js index 484ac6e..aee4bca 100644 --- a/src/oauth-handlers.js +++ b/src/oauth-handlers.js @@ -250,7 +250,7 @@ async function createOAuthCallbackServer(config, redirectUri, authClient, credPa } }); - const host = 'localhost'; + const host = '0.0.0.0'; server.listen(config.port, host, () => { console.log(`${config.logPrefix} OAuth 回调服务器已启动于 ${host}:${config.port}`); activeServers.set(config.port, server); diff --git a/static/app/event-stream.js b/static/app/event-stream.js index 78c0bec..b436968 100644 --- a/static/app/event-stream.js +++ b/static/app/event-stream.js @@ -39,15 +39,6 @@ function initEventStream() { showToast(t('common.success'), `${t('common.success')} (${data.provider})`, 'success'); // 发送自定义事件,以便其他模块(如生成凭据逻辑)可以接收到详细信息 window.dispatchEvent(new CustomEvent('oauth_success_event', { detail: data })); - - // 关闭授权窗口和模态框 - // 查找并关闭所有授权相关的模态框 - const modals = document.querySelectorAll('.modal-overlay'); - modals.forEach(modal => modal.remove()); - - // 授权成功后刷新配置和提供商列表 - if (loadProviders) loadProviders(); - if (loadConfigList) loadConfigList(); }); newEventSource.addEventListener('provider_update', (event) => { diff --git a/static/app/provider-manager.js b/static/app/provider-manager.js index c4a3ea8..be91a46 100644 --- a/static/app/provider-manager.js +++ b/static/app/provider-manager.js @@ -4,6 +4,7 @@ import { providerStats, updateProviderStats } from './constants.js'; import { showToast, formatUptime } from './utils.js'; import { fileUploadHandler } from './file-upload.js'; import { t, getCurrentLanguage } from './i18n.js'; +import { loadConfigList } from './upload-config-manager.js'; // 保存初始服务器时间和运行时间 let initialServerTime = null; @@ -602,6 +603,10 @@ function showAuthModal(authUrl, authInfo) { } modal.remove(); window.removeEventListener('oauth_success_event', handleOAuthSuccess); + + // 授权成功后刷新配置和提供商列表 + loadProviders(); + loadConfigList(); }; window.addEventListener('oauth_success_event', handleOAuthSuccess); diff --git a/static/index.html b/static/index.html index 810ded8..cf4de60 100644 --- a/static/index.html +++ b/static/index.html @@ -1010,7 +1010,9 @@ curlCodes.forEach(element => { const curlCommand = element.textContent; // 替换curl命令中的http://localhost:3000部分 - const updatedCommand = curlCommand.replace(/curl http:\/\/localhost:3000/g, `curl ${baseURL}`); + // 确保baseURL不以斜杠结尾,然后正确拼接路径 + const cleanBaseURL = baseURL.replace(/\/$/, ''); + const updatedCommand = curlCommand.replace(/curl http:\/\/localhost:3000/g, `curl ${cleanBaseURL}`); element.textContent = updatedCommand; }); }