79597cc72b
* fix: added client-side validation for challenge prizes This commit aims to solve the issue #11765 by adding client-side validation for the challenge prize. This way, a user is unable to create a challenge if the prize is higher than what they can afford. Also, the loading property is reset to false after fetching the challenge, however this won't work if the request isn't successful. * style: make validation conditional clearer * fix: add exception handling when doing server requests. This commit adds a basic try/catch block for handling server-side errors, and successfully enables the submit button if something failed. This may also fix #11545, in which a server-side error, difficult to valide from the client, was causing the submit button to stay disabled until reload. * fix: reenable prize validation * fix: bad indentation * fix: Enable submit button on input change * fix: add throttling to enableSubmit event. * fix: reenable prize client-side validation.
Habitica Client
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Run your unit tests
npm run test:unit
Lints and fixes files
npm run lint
Customize configuration
Storybook
Storybook is mainly used while working on UI-Components to see changes faster instead of using the website.
Start Storybook
npm run storybook:serve
This will start the storybook process, every *.stories.js-File is searched and added to the storybook overview.
Storybook Worklow
Usually when you working on component-name.vue you also create a component-name.stories.js file.
Example of the stories structure - Storybook Docs - CountBadge
Each function or example of this component will be put after storiesOf('Your Component', module),
in a separate .add('function of component', ...
Storybook Build
After each client build, storybook build is also triggered and will be available in dist/storybook