Conversation
- Refactor QR Code - Update dev method - Update dependencies (see PR description for details)
There was a problem hiding this comment.
Pull request overview
Adds a new QR-code login flow for 115 Cloud to the existing “OpenList Token 获取工具” UI/server, and refactors shared QR-modal helpers so multiple drivers can reuse the same modal interactions.
Changes:
- Add backend endpoints and a new driver module to fetch 115 QR code + poll login status.
- Add frontend UI option + modal controls/scripts for 115 QR login, and centralize QR modal helpers (show/status/refresh/close).
- Improve local dev workflow by watching
public/**in thedev-jsscript.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Registers new 115 QR routes and imports the new driver module. |
| src/driver/115cloud_qr.ts | Implements upstream calls to 115 QR/token-status APIs. |
| public/static/qr.js | Introduces shared QR modal helpers (render QR, status display, refresh/close). |
| public/static/login.js | Routes 115cloud_qr selection into the QR modal flow and sets modal title dynamically. |
| public/static/event.js | Updates driver selection UI logic to hide fields for 115 QR / Ali QR flows. |
| public/static/aliv2.js | Migrates AliCloud v2 QR UI helpers to the shared QR modal utilities and renames interval helpers. |
| public/static/115qr.js | Implements the 115 QR login frontend flow (get QR + check status). |
| public/index.html | Adds 115 QR option, dynamic modal title, and “刷新状态” button; includes new scripts. |
| package.json | Updates dev-js watch to include public/**. |
| package-lock.json | Lockfile updates from dependency/install changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
I forget why it appears. Hopefully this patch is correct Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: BrandonStudio <55647556+BrandonStudio@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new “QR-code login” path for 115 网盘 and refactors existing QR-login UI code to be shared between AliCloud v2 and the new 115 flow.
Changes:
- Introduce backend endpoints for 115 QR-code generation + status polling.
- Add shared front-end QR modal utilities (
qr.js) and a new 115 QR login script. - Update the login UI to support selecting 115 QR login and to set the modal title dynamically.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Wires new /115cloud_qr/* routes into the Hono app. |
| src/driver/115cloud_qr.ts | Implements server-side calls to 115’s QR/token-status APIs. |
| public/static/qr.js | Adds shared QR modal helpers (render QR, status UI, refresh/close handlers). |
| public/static/login.js | Routes driver selection to the appropriate QR login flow and sets modal title. |
| public/static/event.js | Updates form-field visibility rules for QR-style drivers. |
| public/static/aliv2.js | Refactors AliCloud v2 QR flow to use shared QR helpers and unified status checking. |
| public/static/115qr.js | Adds client-side 115 QR login and manual status checking logic. |
| public/index.html | Adds 115 QR option, makes QR modal title dynamic, and adds a manual “refresh status” button. |
| package.json | Updates dev watch script to include public/**. |
| package-lock.json | Lockfile updates reflecting dependency metadata/platform packages. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| clientIdContainer.style.display = 'none'; | ||
| appSecretContainer.style.display = 'none'; | ||
| serverUseContainer.style.display = 'none'; | ||
| callbackContainer.style.display = 'none'; |
| function closeQRModal() { | ||
| document.getElementById('qr-modal').style.display = 'none'; | ||
| switch (driver_txt) { | ||
| case 'alicloud_cs': | ||
| stopAliQRStatusCheck(); | ||
|
|
||
| // 清理会话 | ||
| if (alicloud2SessionId) { | ||
| fetchWithFingerprint(`/alicloud2/logout?session_id=${alicloud2SessionId}`); | ||
| alicloud2SessionId = null; | ||
| } | ||
| break; | ||
| case '115cloud_qr': | ||
|
|
||
| break; | ||
| } |
This PR adds support for 115 QR Code login method (the old 115 driver, not 115 open), and does the following
This complement the missing part of the doc
https://github.com/OpenListTeam/OpenList-Docs/blob/02874847fca52e4ab6b72d4d6158deccf24d8630/pages/guide/drivers/115.md?plain=1#L99-L112
However, the behaviour is slightly different from the original Alist Docs.
The original Alist Docs API (hosted on api.alistgo.com, source code unavailable) returns the QR Code that is directly indicated as TV, whereas the implementation of this PR could only retrieve the web-based QR code.
I have not found a way to get the TV QR code (package capturing probably required).
*Dependency update note
The dependencies (
package-lock.json) have to be updated because of the following errors duringnpm ci: