feat: Add an invite code input to the registration page#698
feat: Add an invite code input to the registration page#698Dadadah wants to merge 1 commit intostoatchat:mainfrom
Conversation
08931c1 to
d3d9ab7
Compare
Toggles an invite code input on the registration page based on the configuration. Uses a memo to enable reactivity based on the configuraiton being loaded. This commit was made without the use of generative AI. Signed-off-by: Jacob Schlecht <dadadah@echoha.us>
d3d9ab7 to
5b1658d
Compare
| const email = data.get("email") as string; | ||
| const password = data.get("password") as string; | ||
| const captcha = data.get("captcha") as string; | ||
| const invite = data.get("invite") as string; |
There was a problem hiding this comment.
Could I propose looking for an ?invite=code qs and setting invite to that value if data.get("invite") returns an empty string? It would make the signup flow for invited users a lot more straightforward.
Alternatively the qs code could prefill the invite field.
Either way this results in the user being registered not having to know anything about invite only functionality and/or copy pasting codes, but also gives them the flexibility to easily override the invite code from the qs with whatever they want if necessary.
There was a problem hiding this comment.
That's a good idea. However, it's unlikely this pr will get merged, please leave the same comment on #769
There was a problem hiding this comment.
Curious why this isn't getting merged? I assume the other PR is better bc no client dep?
There was a problem hiding this comment.
The other PR has better flow and better UI. I'd rather it depend on this dependency, especially since this is for self hosted. If the dependency gets merged I may speak with the author of that pr to implement it.
Add an invite code input to the registration page. Uses a memo to determine if the invite code input should be shown.
Requires stoatchat/javascript-client-sdk#127 due to the configuration currently not being loaded automatically by the javascript client sdk.
Resolves #639