torrust / torrust-index-gui

This repository serves as the frontend for the Torrust Index project.
https://torrust.com
Other
32 stars 16 forks source link

Hide "Sign Up link" when registration in disabled #635

Open josecelano opened 1 week ago

josecelano commented 1 week ago

You can disable registration by removing these two lines from the Index configuration storage/index/etc/index.toml:

#[registration]
#[registration.email]

I think the UI should not show the link Sign up of the right top corner:

image

Alternatively wi could change the page body with the warning "Registration disabled".

The current behavior is you can try signing up but you get an error message after submitting the form.

cc @mario-nt

mario-nt commented 1 week ago

@josecelano I think if registration is disabled in the Index there shouldn`t be any Sign Up button in the GUI.

Registation disabled looks a little too large in my opinion, I would show a help text box below when hovering with that info or maybe put a question mark right besides the sign in button so we let the user know it is a private index (maybe people who uses Bittorrent indexes already know what to expect from a private one or know beforehand they are visiting a private one).

I would do a couple of mockups so we can decide the best option.

josecelano commented 1 week ago

@josecelano I think if registration is disabled in the Index there shouldn`t be any Sign Up button in the GUI.

Registation disabled looks a little too large in my opinion, I would show a help text box below when hovering with that info or maybe put a question mark right besides the sign in button so we let the user know it is a private index (maybe people who uses Bittorrent indexes already know what to expect from a private one or know beforehand they are visiting a private one).

I would do a couple of mockups so we can decide the best option.

Hey @mario-nt what I proposed was to keep the link "Sign Up" but instead of showing the registration for, we would show the text "Registration disabled". In fact, the text could be customizable.

This solution would be good if we enabled new features like invitations in the feature. We could show a form like:

Automatic registration is disabled. You need an invitation. If you want to receive one, please provide your email.

Email: ____________

Request Invitation (buttom)
mario-nt commented 6 days ago

@josecelano Hi, okay, I though you meant to put the text in the nav bar. I really like the idea of putting displaying that text instead of the registration form, it is pretty self explanatory to the end user, and as you mentioned, the text can be customize, similar to, for example the demo banner text.