Skip to content

Conversation

@KirCute
Copy link
Member

@KirCute KirCute commented Aug 6, 2025

OpenListTeam/OpenList#991 的前端部分

@KirCute KirCute marked this pull request as ready for review August 7, 2025 16:55
@KirCute KirCute requested review from Suyunmeng and xrgzs and removed request for xrgzs August 7, 2025 16:55
@xrgzs xrgzs requested a review from Copilot August 19, 2025 02:42
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

This PR implements support for more secure file sharing by adding a comprehensive share management system to the frontend. It enables users to create, manage, and access file shares with customizable security features like passwords, access limits, and expiration dates.

  • Adds complete share management interface for creating, editing, and viewing file shares
  • Implements secure share access with password protection and access tracking
  • Integrates share functionality into the main file browser with permission controls

Reviewed Changes

Copilot reviewed 41 out of 42 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/utils/str.ts Adds Handlebars template engine integration with helper functions for share content formatting
src/utils/share.ts Provides utilities for generating random passwords and preparing template data for shares
src/types/share.ts Defines TypeScript interfaces for share data structures and API responses
src/pages/manage/shares/ Implements complete share management UI including list view, add/edit forms, and components
src/pages/home/toolbar/Share.tsx Adds share creation modal for users to quickly share selected files
src/hooks/useRouter.ts Extends router to detect share URLs with isShare() helper function
src/hooks/useLink.ts Updates link generation to support share-specific URLs and authentication
src/app/App.tsx Adds routing for share access without requiring full user authentication
package.json Adds Handlebars dependency for template processing
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@xrgzs xrgzs merged commit 88ccd67 into OpenListTeam:main Aug 19, 2025
1 check passed
xrgzs pushed a commit to OpenListTeam/OpenList that referenced this pull request Aug 19, 2025
提供一种类似大多数网盘的文件分享操作,这种分享方式可以通过强制 Web 代理隐藏文件源路径,可以设置分享码、最大访问数和过期时间,并且不需要启用 guest 用户。

在全局设置中可以调整:
- 是否强制 Web 代理
- 是否允许预览
- 是否允许预览压缩文件
- 分享文件后,点击“复制链接”按钮复制的内容

前端部分:OpenListTeam/OpenList-Frontend#156
文档部分:OpenListTeam/OpenList-Docs#130

Close #183
Close #526
Close #860
Close #892
Close #1079


* feat(share): support more secure file sharing

* feat(share): add archive preview

* fix(share): fix some bugs

* feat(openlist_share): add openlist share driver

* fix(share): lack unwrap when get virtual path

* fix: use unwrapPath instead of path for virtual file name comparison

* fix(share): change request method of /api/share/list from GET to Any

* fix(share): path traversal vulnerability in sharing path check

* 修复分享alias驱动的文件 没开代理时无法获取URL

* fix(sharing): update error message for sharing root link extraction

---------

Co-authored-by: Suyunmeng <69945917+Suyunmeng@users.noreply.github.com>
Co-authored-by: j2rong4cn <j2rong@qq.com>
@KirCute KirCute deleted the feat/share branch August 19, 2025 07:36
ForSourceCodeAnalysis pushed a commit to ForSourceCodeAnalysis/alist that referenced this pull request Sep 4, 2025
提供一种类似大多数网盘的文件分享操作,这种分享方式可以通过强制 Web 代理隐藏文件源路径,可以设置分享码、最大访问数和过期时间,并且不需要启用 guest 用户。

在全局设置中可以调整:
- 是否强制 Web 代理
- 是否允许预览
- 是否允许预览压缩文件
- 分享文件后,点击“复制链接”按钮复制的内容

前端部分:OpenListTeam/OpenList-Frontend#156
文档部分:OpenListTeam/OpenList-Docs#130

Close AlistGo#183
Close AlistGo#526
Close AlistGo#860
Close AlistGo#892
Close AlistGo#1079

* feat(share): support more secure file sharing

* feat(share): add archive preview

* fix(share): fix some bugs

* feat(openlist_share): add openlist share driver

* fix(share): lack unwrap when get virtual path

* fix: use unwrapPath instead of path for virtual file name comparison

* fix(share): change request method of /api/share/list from GET to Any

* fix(share): path traversal vulnerability in sharing path check

* 修复分享alias驱动的文件 没开代理时无法获取URL

* fix(sharing): update error message for sharing root link extraction

---------

Co-authored-by: Suyunmeng <69945917+Suyunmeng@users.noreply.github.com>
Co-authored-by: j2rong4cn <j2rong@qq.com>
ForSourceCodeAnalysis pushed a commit to ForSourceCodeAnalysis/OpenList that referenced this pull request Oct 4, 2025
提供一种类似大多数网盘的文件分享操作,这种分享方式可以通过强制 Web 代理隐藏文件源路径,可以设置分享码、最大访问数和过期时间,并且不需要启用 guest 用户。

在全局设置中可以调整:
- 是否强制 Web 代理
- 是否允许预览
- 是否允许预览压缩文件
- 分享文件后,点击“复制链接”按钮复制的内容

前端部分:OpenListTeam/OpenList-Frontend#156
文档部分:OpenListTeam/OpenList-Docs#130

Close OpenListTeam#183
Close OpenListTeam#526
Close OpenListTeam#860
Close OpenListTeam#892
Close OpenListTeam#1079

* feat(share): support more secure file sharing

* feat(share): add archive preview

* fix(share): fix some bugs

* feat(openlist_share): add openlist share driver

* fix(share): lack unwrap when get virtual path

* fix: use unwrapPath instead of path for virtual file name comparison

* fix(share): change request method of /api/share/list from GET to Any

* fix(share): path traversal vulnerability in sharing path check

* 修复分享alias驱动的文件 没开代理时无法获取URL

* fix(sharing): update error message for sharing root link extraction

---------

Co-authored-by: Suyunmeng <69945917+Suyunmeng@users.noreply.github.com>
Co-authored-by: j2rong4cn <j2rong@qq.com>
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