cryck / sticker-composer

CS2 sticker composer to build names or strings
https://cs-sticker.com
MIT License
28 stars 8 forks source link

Fix not entire input matched being broken since new UI #17

Closed pietervanheijningen closed 9 months ago

pietervanheijningen commented 9 months ago

Hey! #13 broke the checking of the entire input not being matched. This was caused by this if statement which contains a bug: https://github.com/cryck/sticker-composer/blob/9a71069a7c9c5522b8de787508a7178d9bb30e9e/script.js#L57-L65

"Could not match the entire input." would never be displayed, as result is always empty in the if statement body. I fixed this by turning it back into an if, elseif, else statement

Before:

Screenshot 2024-02-13 at 09 22 30

After:

Screenshot 2024-02-13 at 09 37 57

Furthermore I added the InfoContainer back to allow it to display the results and the message at the same time (which is the case here)