-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
⚖️ feat: Terms and Conditions Dialog #3712
⚖️ feat: Terms and Conditions Dialog #3712
Conversation
4ecea1f
to
a51e319
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope that all my comments make sense, thanks!
@danny-avila should we still access directly the User model?
Thanks a lot! I implemented all the changes earlier - definitely did some learning on the api calls abstractions used in the app :) |
No, thanks for catching that! And @maxesse thanks so much for the PR |
@maxesse Thank you! Could you reset the package lock? The easiest way is to just copy the package-lock from our repo to yours and make a commit; this way, you’re aligned with ours. Otherwise, you could try using |
Hello @berry-13, I just repushed package-lock copying it from librechat/main (I had done it yesterday, but for some reason it must have changed again?!). librechatadm@LibrechatVMNPMDev:~/LibreChat$ npm update |
Hello, @danny-avila @berry-13 do you need me to do anything else on this PR? |
Hi @maxesse Please resolve the conflicts, I will try to review this during the week since there's a lot of changes. I'm cutting a release candidate today, merging this in at some point after that makes sense. |
Ok @danny-avila, I'm travelling for work today and tomorrow, will merge with main on Wednesday and solve the conflicts 👍🏻 |
sweet! |
@danny-avila ok, I solved the conflict (was only a very small thing in api-endpoints at the end of the file). Also there's a separate PR on the librechat.ai repo for the docs update. |
Pull Request Template
Summary
This feature provides a modal terms and conditions acceptance dialogue that the user needs to accept to proceed.
It's set up by the user by adding three options to librechat.yaml. modalAcceptance enables the feature, modalTitle assigns a custom title to it (if empty, a standard localised string will be used for Terms of Service), and modalContent (if empty the dialogue will say that there is no content). The content is expected to be presented in markdown. This is because embedding HTML led to... mixed results depending on what was coming in. The standard externalUrl parameters is still being used for LibreChat's terms of use link on the footer.
The change also provides a npm script (
npm run reset-terms
) to set all users to a non-accepted status (useful in case the terms and conditions change and need to be accepted again).The change has been localised for all supported LibreChat languages too, except the content of the terms, as that would force users to change files under source control. Besides, it's quite common for terms and conditions to be in the native language of the country in which the instance is deployed, even if the rest is localised.
Closes #3650
Change Type
Please delete any irrelevant options.
Testing
I tested the feature with each of the options with values and not to ensure that it doesn't break anything.
Test Configuration:
Add the following to librechat.yaml:
Checklist
Please delete any irrelevant options.