8000 feat: fileshare custom password support by wintbiit · Pull Request #2493 · cloudreve/cloudreve · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: fileshare custom password support #2493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 16, 2025

Conversation

wintbiit
Copy link
Contributor
@wintbiit wintbiit commented Jun 15, 2025

#2432. frontend pr: cloudreve/frontend#259
password rules, and frontend styles may need further discussion.

20250615-201047.mp4

@CLAassistant
Copy link
CLAassistant commented Jun 15, 2025

CLA assistant check
All committers have signed the CLA.

@HFO4
Copy link
Member
HFO4 commented Jun 15, 2025

Thanks for the PR!

The overall UX is a bit confusing. Imagine yourself as a new user: I set password for my share link, but there's nowhere I can input my password while accessing the share link, I can access it without password.

I haven't come up with a good way to accommodate this yet. A possible UI workaround is: In the dialog showing final share link, add a checkbox Include password in the link for private share. If the user uncheck it, the password part will be trimmed from the final share link.

@wintbiit
Copy link
Contributor Author

I got your point here. Password check, custom password set display, and final password display now like this:

20250615-201047.mp4

@wintbiit
Copy link
Contributor Author
wintbiit commented Jun 15, 2025

btw I'm not sure is it a bug here: changing final share link display also causes diffs between browser display and what the "Send the link" button sends to navigator.share(). Currently we only call navigator.share() with file name and share link url with password in it. for instance:

logo.9a1e0fe7.svg
http://localhost:5173/s/RxcA/ljzsdidg

Which means while we do not directly show url carrying password, "Send the link" button still sends that url without much description. But what really confused me is that actually we have some very likely share link descrption content in i18n asset here application.json#L467? However they are never referenced https://github.com/search?q=repo%3Acloudreve%2Ffrontend%20shareLinkShareContent&type=code.

@HFO4
Copy link
Member
HFO4 commented Jun 15, 2025

btw I'm not sure is it a bug here: changing final share link display also causes diffs between browser display and what the "Send the link" button sends to navigator.share(). Currently we only call navigator.share() with file name and share link url with password in it. for instance:

logo.9a1e0fe7.svg
http://localhost:5173/s/RxcA/ljzsdidg

Which means while we do not directly show url carrying password, "Send the link" button still sends that url without much description. But what really confused me is that actually we have some very likely share link descrption content in i18n asset here application.json#L467? However they are never referenced https://github.com/search?q=repo%3Acloudreve%2Ffrontend%20shareLinkShareContent&type=code.

This i18n phrase is inherited from v3, which is not used anymore, you can remove it.

@@ -20,6 +20,7 @@ type (
ShareCreateService struct {
Uri string `json:"uri" binding:"required"`
IsPrivate bool `json:"is_private"`
Password string `json:"password" binding:"max=32,alphanum,omitempty"`
Copy link
Member

Choose a reason for hiding this comment

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

nit: run go fmt before committing changes

@HFO4 HFO4 merged commit 9d28fde into cloudreve:master Jun 16, 2025
2 checks passed
@gtxykn0504
Copy link

Thanks

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.

4 participants
0