Skip to content

Add 115 QR Code#76

Open
BrandonStudio wants to merge 2 commits intoOpenListTeam:mainfrom
BrandonStudio:dev/115qr
Open

Add 115 QR Code#76
BrandonStudio wants to merge 2 commits intoOpenListTeam:mainfrom
BrandonStudio:dev/115qr

Conversation

@BrandonStudio
Copy link
Contributor

This PR adds support for 115 QR Code login method (the old 115 driver, not 115 open), and does the following

  • Refactor QR Code
  • Update dev method
  • Update dependencies*

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 during npm ci:

$ npm ci
npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
npm error
npm error Missing: @img/sharp-darwin-arm64@0.33.5 from lock file
npm error Missing: @img/sharp-darwin-x64@0.33.5 from lock file
npm error Missing: @img/sharp-libvips-darwin-arm64@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-darwin-x64@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-linux-arm@1.0.5 from lock file
npm error Missing: @img/sharp-libvips-linux-arm64@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-linux-s390x@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-linux-x64@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-linuxmusl-arm64@1.0.4 from lock file
npm error Missing: @img/sharp-libvips-linuxmusl-x64@1.0.4 from lock file
npm error Missing: @img/sharp-linux-arm@0.33.5 from lock file
npm error Missing: @img/sharp-linux-arm64@0.33.5 from lock file
npm error Missing: @img/sharp-linux-s390x@0.33.5 from lock file
npm error Missing: @img/sharp-linux-x64@0.33.5 from lock file
npm error Missing: @img/sharp-linuxmusl-arm64@0.33.5 from lock file
npm error Missing: @img/sharp-linuxmusl-x64@0.33.5 from lock file
npm error Missing: @img/sharp-wasm32@0.33.5 from lock file
npm error Missing: @img/sharp-win32-ia32@0.33.5 from lock file
npm error Missing: @emnapi/runtime@1.8.1 from lock file
npm error Missing: @cloudflare/workerd-darwin-64@1.20250617.0 from lock file
npm error Missing: @cloudflare/workerd-darwin-arm64@1.20250617.0 from lock file
npm error Missing: @cloudflare/workerd-linux-64@1.20250617.0 from lock file
npm error Missing: @cloudflare/workerd-linux-arm64@1.20250617.0 from lock file
npm error
npm error Clean install a project
npm error
npm error Usage:
npm error npm ci
npm error
npm error Options:
npm error [--install-strategy <hoisted|nested|shallow|linked>] [--legacy-bundling]
npm error [--global-style] [--omit <dev|optional|peer> [--omit <dev|optional|peer> ...]]
npm error [--include <prod|dev|optional|peer> [--include <prod|dev|optional|peer> ...]]
npm error [--strict-peer-deps] [--foreground-scripts] [--ignore-scripts] [--no-audit]
npm error [--no-bin-links] [--no-fund] [--dry-run]
npm error [-w|--workspace <workspace-name> [-w|--workspace <workspace-name> ...]]
npm error [--workspaces] [--include-workspace-root] [--install-links]
npm error
npm error aliases: clean-install, ic, install-clean, isntall-clean
npm error
npm error Run "npm help ci" for more info

- Refactor QR Code
- Update dev method
- Update dependencies (see PR description for details)
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the dev-js script.

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>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';
Comment on lines +44 to +59
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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants