diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 279 |
1 files changed, 228 insertions, 51 deletions
@@ -29,7 +29,7 @@ Passwords must be hashed. You decide on which algorithm to use. Each chat room must have the following properties: - `string Name`: between 2 and 20 characters (A-z, 0-9, spaces, \_, -) - `string Description`: between 0 and 30 characters (any character) -- `string Owner`: between 2 and 40 characters (must be an existing UserName) +- `string Owner`: between 2 and 40 characters (must be an existing UserName, it's set automatically) - `string collection Messages`: a collection containing all messages Two chat rooms can't have the same Name. Once set, a name cannot be changed. @@ -117,14 +117,14 @@ Note: the `█` character, represents the location of the cursor ┌────────┬────────┬────────┐ │ Page 1 │ Page 2 │ Page 3 │ ├────────┴────────┴────────┘ - ├% steve: This is a test message - ├% john: It's true - ├% steve: And this is another test + ├% steve : This is a test message + ├% john : It's true + ├% steve : And this is another test └@ Message : █ ``` - Text fields just contain some text, and start with a `%`: ``` - ├% steve: This is a test message + ├% steve : This is a test message ``` - A notable exception is the page indicator, which is just text, but connects to the "rail", rather than start with a `%`: ``` @@ -139,9 +139,9 @@ Note: the `█` character, represents the location of the cursor ├@ Username : John └@ Password : █ ``` - - The specification can be a normal word (like just `Username`, `Password`, etc.) or a command specification. Command specifications are surrounded in square brackets. Capital letters or symbols mean that you can enter that character for the command, while lowercase word(s) specify what type of value is the command. + - The specification can be a normal word (like just `Username`, `Password`, etc.) or a command specification. Command specifications are surrounded in square brackets. Capital letters or symbols mean that you can enter that character for the command, while lowercase word(s) specify what type of value is the command. Capital letter commands are case insensitive, so you could just write the lowercase of the letter. ``` - └@ [A/B/C/name/number/H]: █ + └@ [A/B/C/name/number/H] : █ ``` *Here, you can either enter the letter A, B, C or H (case insensitive), and that will execute some command. If you enter some sort of a name or number, those will be seen as commands (case sensitive).* `H` is the Help command, it shows in a bit more detail the command specifications, it should exist almost everywhere @@ -174,7 +174,7 @@ When launching the application, the user will be prompted to choose between logg ┌───────┬──────────┐ │ Login │ Register │ ├───────┴──────────┘ -└@ [L/R]: █ +└@ [L/R] : █ ``` If an invalid value is given, the error is shown on top and the prompt is below: ``` @@ -184,7 +184,7 @@ If an invalid value is given, the error is shown on top and the prompt is below: ┌───────┬──────────┐ │ Login │ Register │ ├───────┴──────────┘ -└@ [L/R]: █ +└@ [L/R] : █ ``` ### Login @@ -236,14 +236,14 @@ The user should be prompted with input prompts in this order (if values is corre ┌──────────┐ │ Register │ ├──────────┘ -└@ Username [A-z, 0-9, *, ., _, -]: █ +└@ Username [A-z, 0-9, *, ., _, -] : █ ``` ``` ┌──────────┐ │ Register │ ├──────────┘ ├@ Username : John -└@ Password [5-40 characters; at least 1 number]: █ +└@ Password [5-40 characters; at least 1 number] : █ ``` ``` ┌──────────┐ @@ -251,7 +251,7 @@ The user should be prompted with input prompts in this order (if values is corre ├──────────┘ ├@ Username : John ├@ Password : password1 -└@ Name [2-60 characters]: █ +└@ Name [2-60 characters] : █ ``` After pressing enter in the name section, the user should be redirected to the [chats page](#Chats%20page) (so, instantly logged in). @@ -263,55 +263,175 @@ The chats page is one of the main pages inside the application. Here you can see ┌─────────────────┬─────────┬────────┐ │ Direct Messages │ Account │ Logout │ ├─────────────────┴─────────┴────────┘ -├1 Cool Kids Club: A chat room only for those worthy of it B-) -├2 Computer geeks: You like computers? So do we. Join us for the nerdy experience +├1 Cool Kids Club : A chat room only for those worthy of it B-) +├2 Computer geeks : You like computers? So do we. Join us for the nerdy experience ├─Page 1/1─┘ │ -└@ [D/A/L/</>/C/E/name/number/H]: █ +└@ [D/A/L/</>/C/E/name/number/H] : █ ``` With Help message: ``` ┌─────────────────┬─────────┬────────┐ │ Direct Messages │ Account │ Logout │ ├─────────────────┴─────────┴────────┘ -├1 Cool Kids Club: A chat room only for those worthy of it B) -├2 Computer geeks: You like computers? So do we. Join us for the nerdy experience +├1 Cool Kids Club : A chat room only for those worthy of it B) +├2 Computer geeks : You like computers? So do we. Join us for the nerdy experience ├─Page 1/1─┘ │ -├% Chats page options: [(D)irect messages/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(C) for create chat/(name) for go to chat room by name/(number) for go to chat room by number/(H)elp] -└@ [D/A/L/</>/C/E/name/number/H]: █ +├% Chats page options : [(D)irect messages/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(C) for create chat/(name) for go to chat room by name/(number) for go to chat room by number/(H)elp] +└@ [D/A/L/</>/C/E/name/number/H] : █ ``` +### Create chat page + +``` +┌─────────────────────┐ +│ Creating a new chat │ +├─────────────────────┘ +└@ Name [2-20 characters; A-z, 0-9, spaces, _, -] or [B/H] : █ +``` +``` +┌─────────────────────┐ +│ Creating a new chat │ +├─────────────────────┘ +├% Creating a new chat options : [(B)ack to chats page/(H)elp] +└@ Name [2-20 characters; A-z, 0-9, spaces, _, -] or [B/H] : █ +``` +``` +┌─────────────────────┐ +│ Creating a new chat │ +├─────────────────────┘ +├@ Name : Computer geeks +└@ Description [0-30 characters] : █ +``` + +### Edit chat page + +``` +┌───────────────┐ +│ Edit own chat │ +├───────────────┘ +├1 Cool Kids Club : A chat room only for those worthy of it B-) +├─Page 1/1─┘ +│ +└@ [B/</>/name/number/H] : █ +``` +``` +┌───────────────┐ +│ Edit own chat │ +├───────────────┘ +├1 Cool Kids Club : A chat room only for those worthy of it B-) +├─Page 1/1─┘ +│ +├% Edit own chat options : [(B)ack to chats page/(<) for previous page/(>) for next page/(name) to edit chat room with name/(number) to edit chat room with number/(H)elp] +└@ [B/</>/name/number/H] : █ +``` + +``` +┌────────────────────────┐ +│ Editing Cool Kids Club │ +├────────────────────────┘ +├1 Name : Cool Kids Club +├2 Description : A chat room only for those worthy of it B-) +│ +└@ [B/name/number/H] : █ +``` +``` +┌────────────────────────┐ +│ Editing Cool Kids Club │ +├────────────────────────┘ +├1 Name : Cool Kids Club +├2 Description : A chat room only for those worthy of it B-) +│ +├% Editing chat options : [(B)ack to chats page/(number) for edit option by number/(H)elp] +└@ [B/number/H] : █ +``` + +Editing an option is just like editing an [account option](#Account%20page). Also, I'll only show editing Name, since the procedure is the same for editing the Description. + +``` +┌─────────────────────────────┐ +│ Editing Cool Kids Club name │ +├─────────────────────────────┘ +└@ Account Password or [B/H] : █ +``` +``` +┌─────────────────────────────┐ +│ Editing Cool Kids Club name │ +├─────────────────────────────┘ +├% Editing chat name options : [(B)ack to Editing chat page/(H)elp] +└@ Account Password or [B/H] : █ +``` +``` +┌─────────────────────────────┐ +│ Editing Cool Kids Club name │ +├─────────────────────────────┘ +├@ Account Password : password1 +└@ New name [2-20 characters; A-z, 0-9, spaces, _, -] : █ +``` + + ### Specific chat page ``` ┌───────┬─────────────────┬─────────┬────────┐ │ Chats │ Direct Messages │ Account │ Logout │ ├───────┴─────────────────┴─────────┴────────┘ -├% Computer geeks: You like computers? So do we. Join us for the nerdy experience +├% Computer geeks : You like computers? So do we. Join us for the nerdy experience ├% Brought to you by "David Robertson (robertson94)" │ -├% robertson94: I think the new Windows 11 design looks horrible -├% steve: Yeah, right?? +├% robertson94 : I think the new Windows 11 design looks horrible +├% steve : Yeah, right?? ├─Page 50/50─┘ │ -└@ Message or [C/D/A/L/</>/H]: █ +└@ Message or [C/D/A/L/</>/H] : █ ``` With Help message: ``` ┌───────┬─────────────────┬─────────┬────────┐ │ Chats │ Direct Messages │ Account │ Logout │ ├───────┴─────────────────┴─────────┴────────┘ -├% Computer geeks: You like computers? So do we. Join us for the nerdy experience +├% Computer geeks : You like computers? So do we. Join us for the nerdy experience +├% Brought to you by "David Robertson (robertson94)" +│ +├% robertson94 : I think the new Windows 11 design looks horrible +├% steve : Yeah, right?? +├─Page 50/50─┘ +│ +├% Chat options : [(C)hats/(D)irect messages/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(H)elp] +└@ Message or [C/D/A/L/</>/H] : █ +``` + +**Note:** since a user might want to message with a letter/character **that could be interpreted as a command option**, putting a `\` in front must prevent the command from getting executed and just type in the letter: +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% Computer geeks : You like computers? So do we. Join us for the nerdy experience ├% Brought to you by "David Robertson (robertson94)" │ -├% robertson94: I think the new Windows 11 design looks horrible -├% steve: Yeah, right?? +├% robertson94 : I think the new Windows 11 design looks horrible +├% steve : Yeah, right?? ├─Page 50/50─┘ │ -├% Chat options: [(C)hats/(D)irect messages/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/Help] -└@ Message or [C/D/A/L/</>/H]: █ +└@ Message or [C/D/A/L/</>/H] : \L█ ``` +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% Computer geeks : You like computers? So do we. Join us for the nerdy experience +├% Brought to you by "David Robertson (robertson94)" +│ +├% robertson94 : I think the new Windows 11 design looks horrible +├% steve : Yeah, right?? +├% John : L +├─Page 50/50─┘ +│ +└@ Message or [C/D/A/L/</>/H] : █ +``` +- Sending `\\L` should result in `\L` message. It's not a problem if you just remove the first `\` in a message, so if someone sends `\B`, it's fine if it produces `B` as message. +- Letters that can't be interpreted as a command should be able to be written without worry. In the example above, if you enter `B`, it should just result in a message with `B` ### Direct messages page @@ -319,28 +439,85 @@ With Help message: ┌───────┬─────────┬────────┐ │ Chats │ Account │ Logout │ ├───────┴─────────┴────────┘ -├1 David Robertson (robertson94): Just a guy +├1 David Robertson (robertson94) : Just a guy ├2 Bob J Stevenson (bjs) -├3 Steve (steve): I am Steve +├3 Steve (steve) : I am Steve ├─Page 2/2─┘ │ -└@ [C/A/L/</>/username/number/H]: █ +└@ [C/A/L/</>/username/number/H] : █ ``` With Help message: ``` ┌───────┬─────────┬────────┐ │ Chats │ Account │ Logout │ ├───────┴─────────┴────────┘ -├1 David Robertson (robertson94): Just a guy +├1 David Robertson (robertson94) : Just a guy ├2 Bob J Stevenson (bjs) -├3 Steve (steve): I am Steve +├3 Steve (steve) : I am Steve ├─Page 2/2─┘ │ -├% Direct messages options: [(C)hats/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(username) for directly message person with username/(number) for enter direct messages by number/(H)elp] -└@ [C/A/L/</>/username/number/H]: █ +├% Direct messages options : [(C)hats/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(username) for directly message person with username/(number) for enter direct messages by number/(H)elp] +└@ [C/A/L/</>/username/number/H] : █ +``` + +When chatting with a person: +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% David Robertson (robertson94) +│ +├% robertson94 : Hello +├% John : Hi +├─Page 1/1─┘ +│ +└@ Message or [C/D/A/L/</>/H] : █ +``` +With Help message: +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% David Robertson (robertson94) +│ +├% robertson94 : Hello +├% John : Hi +├─Page 1/1─┘ +│ +├% Direct chat options : [(C)hats/(D)irect messages/(A)ccount/(L)ogout/(<) for previous page/(>) for next page/(H)elp] +└@ Message or [C/D/A/L/</>/H] : █ +``` + +**Note:** the same rule about writing a message that is just a letter (**that could be interpreted as a command**) in chats applies here. Adding a `\` in front of the letter prevents it from getting executed (and the letter gets sent as text): +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% David Robertson (robertson94) +│ +├% robertson94 : Hello +├% John : Hi +├─Page 1/1─┘ +│ +└@ Message or [C/D/A/L/</>/H] : \L█ +``` +``` +┌───────┬─────────────────┬─────────┬────────┐ +│ Chats │ Direct Messages │ Account │ Logout │ +├───────┴─────────────────┴─────────┴────────┘ +├% David Robertson (robertson94) +│ +├% robertson94 : Hello +├% John : Hi +├% John : L +├─Page 1/1─┘ +│ +└@ Message or [C/D/A/L/</>/H] : █ ``` +- Sending `\\L` should result in `\L` message. It's not a problem if you just remove the first `\` in a message, so if someone sends `\B`, it's fine if it produces `B` as message. +- Letters that can't be interpreted as a command should be able to be written without worry. In the example above, if you enter `B`, it should just result in a message with `B` -### Account +### Account page ``` ┌───────┬─────────────────┬────────┐ @@ -350,7 +527,7 @@ With Help message: ├1 Password : [HIDDEN] ├2 Name : John Smith │ -└@ [C/D/L/number/H]: █ +└@ [C/D/L/number/H] : █ ``` With Help message: ``` @@ -361,44 +538,44 @@ With Help message: ├1 Password : [HIDDEN] ├2 Name : John Smith │ -├% Account options: [(C)hats/(D)irect Messages/(L)ogout/(number) for edit option by number/(H)elp] -└@ [C/D/L/number/H]: █ +├% Account options : [(C)hats/(D)irect Messages/(L)ogout/(number) for edit option by number/(H)elp] +└@ [C/D/L/number/H] : █ ``` -Editing an option requires you first input your password, then entering a new value for the chose property. I'll only show an example for updating password: +Editing an option requires you first input your password, then entering a new value for the chosen property (**don't forget to show the specification**). I'll only show an example for updating password: ``` ┌──────────────────────────┐ │ Editing Account Password │ ├──────────────────────────┘ -└@ Password or [B/H]: █ +└@ Password or [B/H] : █ ``` ``` ┌──────────────────────────┐ │ Editing Account Password │ ├──────────────────────────┘ -├% Editing Account Password options: [Back to account page/Help] -└@ Password or [B/H]: █ +├% Editing Account Password options : [(B)ack to account page/(H)elp] +└@ Password or [B/H] : █ ``` ``` ┌──────────────────────────┐ │ Editing Account Password │ ├──────────────────────────┘ -├@ Password or [B/H]: password1 -└@ New Password: █ +├@ Password or [B/H] : password1 +└@ New Password [5-40 characters; at least 1 number] : █ ``` ### Logout page ``` -┌───────┬─────────────────┬─────────┐ -│ Chats │ Direct Messages │ Account │ -├───────┴─────────────────┴─────────┘ -├% Are you sure you want to Log out? +┌───────────────────────────────────────────┐ +│ Are you sure you want to Log out of John? │ +├───────────────────────────────────────────┘ │ -└@ [Y/N]: █ +└@ [Y/N] : █ ``` -The No option should return you to the chats page. +Any option that isn't "Y" (and "y") should return the user to the chats page. +In place of John, there should be the username of the logged in user. ## Shortcomings |
