habitica/website/client
negue f72f71fd32 [WIP] New Client - Shops/Market (#8884)
* initial market - routing - store - load market data

* move drawer/drawerSlider / count/star badge to components/ui

* filter market categories

* shopItem with gem / gold

* show count of purchable items

* show count of purchable itemsshow drawer with currently owned items + DrawerHeaderTabs-Component

* show featured gear

* show Gear - filter by class - sort by (type, price, stats) - sort market items

* Component: ItemRows - shows only the max items in one row (depending on the available width)

* Sell Dialog + Balance Component

* generic buy-dialog / attributes grid with highlight

* buyItem - hide already owned gear

* filter: hide locked/pinned - lock items if not enough gold

* API: Sell multiple items

* show avatar in buy-equipment-dialog with changed gear

* market banner

* misc fixes

* filter by text

* pin/unpin gear store actions

* Sell API: amount as query-parameter

* Update user.js

* fixes

* fix sell api amount test

* add back stroke/fill currentColor

* use scss variables
2017-07-27 19:41:23 +02:00
..
assets [WIP] New Client - Shops/Market (#8884) 2017-07-27 19:41:23 +02:00
components [WIP] New Client - Shops/Market (#8884) 2017-07-27 19:41:23 +02:00
directives Client Tasks (#8889) 2017-07-22 20:30:08 +02:00
filters Client Tasks (#8889) 2017-07-22 20:30:08 +02:00
libs Client Tasks v1 (#8823) 2017-06-26 23:55:14 +02:00
merch New client random catchup (#8891) 2017-07-25 08:24:40 -06:00
mixins New client random catchup (#8891) 2017-07-25 08:24:40 -06:00
store [WIP] New Client - Shops/Market (#8884) 2017-07-27 19:41:23 +02:00
.babelrc Client: Header & Menu & Icons (#8770) 2017-06-08 12:04:19 -07:00
.eslintrc Client: Header & Menu & Icons (#8770) 2017-06-08 12:04:19 -07:00
app.vue New client random catchup (#8891) 2017-07-25 08:24:40 -06:00
index.html New client random catchup (#8891) 2017-07-25 08:24:40 -06:00
main.js New client random catchup (#8891) 2017-07-25 08:24:40 -06:00
README.md minor text fixes: accurate flavour text for Golden Knight testimonies collection quest, etc (#8826) 2017-06-26 22:35:29 +01:00
readme.md minor text fixes: accurate flavour text for Golden Knight testimonies collection quest, etc (#8826) 2017-06-26 22:35:29 +01:00
router.js [WIP] New Client - Shops/Market (#8884) 2017-07-27 19:41:23 +02:00

#Running

  • Open a terminal and type npm run client:dev
  • Open a second terminal and type npm start

#Preparation Reading

  • Vue 2 (https://vuejs.org)

  • Webpack (https://webpack.github.io/) is the build system and it includes plugins for code transformation, right now we have: BabelJS for ES6 transpilation, eslint for code style, less and postcss for css compilation. The code comes from https://github.com/vuejs-templates/webpack which is a Webpack template for Vue, with some small modifications to adapt it to our use case. Docs http://vuejs-templates.github.io/webpack/

  • Were using .vue files that make it possible to have HTML, JS and CSS for each component together in a single location. Theyre implemented as a webpack plugin and the docs can be found here http://vue-loader.vuejs.org/en/

  • SemanticUI is the UI framework http://semantic-ui.com/. So far Ive only used the CSS part, it also has JS plugins but Ive yet to use them. It supports theming so if its not too difficult well want to customize the base theme with our own styles instead of writing CSS rules to override the original styling.

The code is in /website/client. Were using something very similar to Vuex (equivalent of Reacts Redux) for state management http://vuex.vuejs.org/en/index.html

The API is almost the same except that we dont use mutations but only actions because it would make it difficult to work with common code

The project is developed directly in the develop branch as long as well be able to avoid splitting it into a different branch.

So far most of the work has been on the template, so theres no complex logic to understand. The only thing I would suggest you to read about is Vuex for data management: its basically a Flux implementation: theres a central store that hold the data for the entire app, and every change to the data must happen through an action, the data cannot be mutated directly.