plebbit / plebbit-react

A GUI for plebbit
https://plebbitapp.eth.limo
GNU General Public License v2.0
35 stars 6 forks source link

Challenge modal must support multiple challenges, show some publication information, and background color be white #229

Closed estebanabaroa closed 1 year ago

estebanabaroa commented 1 year ago

This is what it looks like right now:

Screenshot 2023-04-06 at 22-50-59 plebbit

The background color should be white (or black in dark mode) to look more like the style of reddit modals like:

Screenshot 2023-04-06 at 23-17-04 r_CryptoCurrency

or:

Screenshot 2023-04-07 at 00-18-35 r_CryptoCurrency

The ChallengeMessage https://github.com/plebbit/plebbit-js#pubsub-message-types contains a field challenges: Challenge[] i.e. multiple challenges. Similar to how google captchas often have multiple captchas.

The plebbit challenge modal should have a Next button if there's another challenge to complete, or a Submit button if it is the last challenge.

The modal should also say x of 3 challenges if there are 3 challenges, to indicate the progress.

The challenge modal should also include information about the publication. For example it could say "Replying to " with some excerpt of the reply.content. Or "Voting on "<comment.title || comment.content>". Or "Posting in , etc.

The publication information is available as the second argument of onChallenge and onChallengeVerification https://github.com/plebbit/plebbit-js#challenge

For example on plebchan the challenge modal will look something like this:

photo_2023-04-06_23-19-37