Skip to content

Show tokens in prominent modal #14129

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

Closed
wants to merge 4 commits into from
Closed

Conversation

noerw
Copy link
Member

@noerw noerw commented Dec 23, 2020

..to avoid them being accidentally overlooked:

  • app access tokens
  • scratch token after enabling 2FA

demo

fixes #13600

I left the alerts showing the token in for accessibility, as the new approach does not work without JS.

I also renamed "scratch token" to "recovery token" throughout the UI, because this term converys much more meaning and is more common.

Help Wanted:

I was unable to pass the token to next request after the redirect to display the modal, so i switched redirects to render the page instead. This is hacky, but I didn't find a way to use ctx.Flash() in a non-alert / more generic way..

@silverwind
Copy link
Member

Can you use a regular, non-basic modal? I hate these basic modals 😉

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 23, 2020
@lunny lunny added the topic/ui Change the appearance of the Gitea UI label Dec 23, 2020
@lunny lunny added this to the 1.14.0 milestone Dec 23, 2020
@noerw
Copy link
Member Author

noerw commented Dec 24, 2020

@silverwind i actually like them ;) but done anyway:

grafik

@lunny
Copy link
Member

lunny commented Dec 24, 2020

CI failed is related.

@noerw
Copy link
Member Author

noerw commented Dec 24, 2020

@lunny as mentioned in PR header:

I was unable to pass the token to next request to display the modal after the redirect, so i switched redirects for rending the page instead. This is hacky, but I didn't find a way to use ctx.Flash() in a non-alert / more generic way..

Any help/inputs welcome :)

@wULLSnpAXbWZGYDYyhWTKKspEQoaYxXyhoisqHf
Copy link
Contributor

sorry I'm late to the party and maybe if this is not the best place to discuss, please, tell me.. but would it be possible to maybe not use a modal and still make the token more prominent on the page? i.e.
it's just that I personally don't find modals neither practical nor appealing, rather distracting (just one opinion).
there surely is another way to gently grab users attention.

@noerw noerw modified the milestones: 1.14.0, 1.15.0 Jan 20, 2021
@noerw noerw marked this pull request as draft February 25, 2021 14:41
@noerw noerw closed this Mar 11, 2021
@6543 6543 removed this from the 1.15.0 milestone Mar 11, 2021
@go-gitea go-gitea locked and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. topic/ui Change the appearance of the Gitea UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[discussion] scratch token UX
6 participants