From 9992c4ab2704cefbc710b393673487cc01675b06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E9=A3=9E=E7=A5=A5?= Date: Fri, 23 Jan 2026 21:23:29 +0800 Subject: [PATCH] feat: Add manual OAuth authorization mode for WebUI (#131) * feat: add manual OAuth flow support in WebUI * fix: reset add account modal state on close * feat: display custom API key in startup banner * fix: move translations to separate files and optimize import API * fix: remove orphaned model-manager.js and cleanup callback server on manual auth --------- Co-authored-by: Badri Narayanan S <59133612+badrisnarayanan@users.noreply.github.com> --- public/app.js | 1 + public/index.html | 50 +++++- public/js/components/account-manager.js | 85 ++++++++++ public/js/components/add-account-modal.js | 88 +++++++++++ public/js/translations/en.js | 18 +++ public/js/translations/id.js | 18 +++ public/js/translations/pt.js | 23 +++ public/js/translations/tr.js | 18 +++ public/js/translations/zh.js | 18 +++ public/views/accounts.html | 22 +++ src/auth/oauth.js | 35 +++- src/cli/accounts.js | 4 +- src/index.js | 3 +- src/webui/index.js | 184 +++++++++++++++++++++- tests/frontend/test-frontend-accounts.cjs | 73 +++++++++ 15 files changed, 624 insertions(+), 16 deletions(-) create mode 100644 public/js/components/add-account-modal.js diff --git a/public/app.js b/public/app.js index 4cb3a9c..7b890a0 100644 --- a/public/app.js +++ b/public/app.js @@ -13,6 +13,7 @@ document.addEventListener('alpine:init', () => { Alpine.data('accountManager', window.Components.accountManager); Alpine.data('claudeConfig', window.Components.claudeConfig); Alpine.data('logsViewer', window.Components.logsViewer); + Alpine.data('addAccountModal', window.Components.addAccountModal); // View Loader Directive Alpine.directive('load-view', (el, { expression }, { evaluate }) => { diff --git a/public/index.html b/public/index.html index 8a9c439..6958518 100644 --- a/public/index.html +++ b/public/index.html @@ -252,8 +252,8 @@ - - + + + + + + +