Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 14+ #2

Open
wants to merge 114 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
6c8bd9b
add .editorconfig file
val-fom Mar 7, 2018
32d0492
update webpack.config.js
val-fom Mar 7, 2018
a5c4c62
update package.json
val-fom Mar 7, 2018
ba60d4f
refactor to employ components
val-fom Mar 8, 2018
1181050
move @media into components style
val-fom Mar 8, 2018
2b1811e
add Clock component
val-fom Mar 8, 2018
82ff83c
add `insertChildren` util
val-fom Mar 8, 2018
6782e67
add basic router
val-fom Mar 8, 2018
02328d9
update the links
val-fom Mar 8, 2018
5658025
add classNames for hosts for App and Login
val-fom Mar 9, 2018
2a31acd
login-form styling
val-fom Mar 9, 2018
5f3e51b
add Register component
val-fom Mar 9, 2018
6efd2c3
add README
val-fom Mar 9, 2018
363cdee
`npm update`
val-fom Mar 9, 2018
9ceb947
update README
val-fom Mar 9, 2018
842e4f8
change labels color
val-fom Mar 9, 2018
a59ad1e
add handleRedirect and handleOnEnter
val-fom Mar 9, 2018
e5b6c87
add `Choose your store` select in Register form
val-fom Mar 12, 2018
bb70eda
fix Error message
val-fom Mar 12, 2018
2d55e1b
add store password
val-fom Mar 12, 2018
f2a89b4
add basic login and registration services
val-fom Mar 13, 2018
d39cefa
fix clock
val-fom Mar 14, 2018
e649583
fix Component.update
val-fom Mar 15, 2018
ae55577
add Message component
val-fom Mar 15, 2018
8844eaf
point `Vals store` as a default option
val-fom Mar 15, 2018
7eb001b
add `Message` component to `RegisterForm`
val-fom Mar 15, 2018
2c83dc2
LoginForm and RegisterForm small refactor
val-fom Mar 15, 2018
a97f5bc
fix: prevent form reload. Update only the message
val-fom Mar 15, 2018
b5cca33
try to make auth http request
val-fom Mar 15, 2018
5c25ecf
receive user_info
val-fom Mar 16, 2018
8fa2f4c
now cors works, so I can send headers
val-fom Mar 16, 2018
07b776b
add user info basic render
val-fom Mar 16, 2018
104ad77
add buttons to UserInfo, some refactor and styling
val-fom Mar 16, 2018
a08c160
add basic guard with redirection when non-authzed
val-fom Mar 16, 2018
fa91611
use isAuthorized instead of authguard
val-fom Mar 16, 2018
51edb1e
implement logout feature
val-fom Mar 16, 2018
1df688d
fix: `===` instead of `=`
val-fom Mar 16, 2018
8bef78a
update readme
val-fom Mar 16, 2018
4cc6bb7
fix message class name
val-fom Mar 17, 2018
418fb68
add claims
val-fom Mar 17, 2018
ab0cb7d
update readme
val-fom Mar 19, 2018
cc8aa5e
rename script name
val-fom Mar 27, 2018
072d4a3
add stylelint packages and config files
val-fom Mar 27, 2018
5aefae3
refactor headers
val-fom Mar 27, 2018
61f7f62
add exp- and fix canActivate- check
val-fom Mar 27, 2018
bd802c5
add `props` into every constructor wich extends `Componnet`
val-fom Mar 27, 2018
f00c7a2
disable spread rest es7 feature
val-fom Mar 27, 2018
1f04769
some cleanup
val-fom Mar 27, 2018
8dedf20
refactor `logout` using `onEnter`
val-fom Mar 28, 2018
73daf9a
remove getter literal for the `isAuthorized` method that caused bugs
val-fom Mar 28, 2018
8ba6d69
update readme
val-fom Mar 28, 2018
8ca32a4
update readme
val-fom Mar 28, 2018
8d648a7
make API_SERVICE
val-fom Mar 28, 2018
3998249
move files
val-fom Mar 28, 2018
fd0592e
export api services from `api/index.js`
val-fom Mar 28, 2018
c924f9b
fix typo
val-fom Mar 29, 2018
85d387e
move `auth-http` logic to api-service
val-fom Mar 29, 2018
dfae2d5
convert static `login` button to component
val-fom Mar 29, 2018
3cb1327
split static `login` button into 2 dynamic
val-fom Mar 29, 2018
ed784b2
fix /register link
val-fom Mar 29, 2018
d4c3ef4
fix inputs appearance
val-fom Mar 30, 2018
6285f12
some cleanup
val-fom Apr 6, 2018
2d28b86
add very basic page component for pizza creating
val-fom Apr 6, 2018
d62bb8f
now a `main` element is present on every page
val-fom Apr 7, 2018
01417df
start making canvas
val-fom Apr 9, 2018
0eed9d0
preload all pizza data and encapsulate it
val-fom Apr 10, 2018
96d8f88
pizza-create__form styling
val-fom Apr 10, 2018
ed679cb
more create-pizza form styling
val-fom Apr 11, 2018
90c945f
add pizza description
val-fom Apr 11, 2018
a5d03f6
complete create-pizza form styling
val-fom Apr 11, 2018
48c31bf
now canvas draws ingredients on form change
val-fom Apr 11, 2018
263380e
add basic ingredients map
val-fom Apr 11, 2018
563d371
now the ingredients are well spread!
val-fom Apr 12, 2018
1ba7ae1
cleanup
val-fom Apr 13, 2018
5d3e52e
add total price component
val-fom Apr 13, 2018
fe132b1
some styling
val-fom Apr 13, 2018
e9adb4c
add create- heading and cleanup
val-fom Apr 13, 2018
5682eca
limit number of ingredients
val-fom Apr 13, 2018
f848adc
start collect FormData
val-fom Apr 13, 2018
28184d6
now it remains to collect the pizza image in the FromData
val-fom Apr 13, 2018
6c67925
try to get blob from canvas
val-fom Apr 13, 2018
cb8f0dc
try to play with `crossOrigin` attribute
val-fom Apr 13, 2018
5705df8
now cors works only when cache is clear
val-fom Apr 13, 2018
1788c3d
without bg images works!
val-fom Apr 13, 2018
0037a68
paste usr of bg imgs from preloaded obj
val-fom Apr 13, 2018
dcaaf95
now post pizzaCreate with 500 error
val-fom Apr 13, 2018
dcf69d4
replace bg-imgs with preloaded imgs
val-fom Apr 13, 2018
91746db
put imgs directly into form with `crossOrigin` attr
val-fom Apr 13, 2018
372e9bb
fix wrong endpoint
val-fom Apr 14, 2018
54dfbee
stying validatation of ingredits
val-fom Apr 14, 2018
34d4550
define `maxNumberOfIngredients` in the PIZZA_SERVICE
val-fom Apr 17, 2018
9351174
draw sprites with a random angle
val-fom Apr 17, 2018
82003c3
show validation massage on `Create` page
val-fom Apr 17, 2018
e1d41b5
get and render list of non-accepted pizzas
val-fom Apr 17, 2018
5cebd06
cleanup
val-fom Apr 17, 2018
f0110f1
now additional auth check is not needed
val-fom Apr 17, 2018
2e36602
refactor API_SERVICE.post() method
val-fom Apr 17, 2018
4835bc2
Fix bug due to lack of FormData support
val-fom Apr 17, 2018
daa6e8d
fix `tokenIsNotExpired()` check
val-fom Apr 18, 2018
d1b7d39
no longer need to handle error 403
val-fom Apr 18, 2018
a5b6153
cleanup
val-fom Apr 18, 2018
d1a00f6
update readme
val-fom Apr 18, 2018
4871566
update readme: add screenshots
val-fom Apr 18, 2018
8460b69
fix regiser button color
val-fom Apr 18, 2018
9bcda40
add websocket service and real time pizza-list update
val-fom Apr 19, 2018
17af490
fix memory leak in EventEmitter callbacks array
val-fom Apr 20, 2018
c5331f9
add timer
val-fom Apr 23, 2018
5b24576
README: add guest credentials for test
val-fom Apr 24, 2018
027488f
change url `#/` to `#/list`
val-fom Apr 25, 2018
763157e
clear timer intervals when removing pizza or leave /list
val-fom Apr 25, 2018
1ea8bb7
Math.floor instead of Math.round in the Timer
val-fom Apr 25, 2018
d8b7898
fix ws reconnect on close
val-fom Apr 26, 2018
20f7cde
close WS when leaving `/list`
val-fom Apr 26, 2018
94dc74b
show price of empty pizza crust when opening `/create` page
val-fom Apr 26, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = tab
indent_size = 2

[*.js]
indent_style = tab
indent_size = 4
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules/
dist/
sublime-gulp.log
.sublime-gulp.cache
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esversion": 6
}
3 changes: 3 additions & 0 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-recommended-scss"
}
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# pizza-app_val-fom

### Current Task:

* [x] [Task 14: Pizza Creation](https://github.com/kottans/frontend/blob/master/test14.md)

### Routes:

* [x] [/list](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/list) (authorization required)
* [x] [/login](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/login)
* [x] [/register](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/register)
* [x] [/user](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/user) (authorization required)
* [x] [/logout](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/logout) (will log you out `onEnter`!)
* [x] [/create](https://kottans-frontend-2018.github.io/pizza-app_val-fom/dist/#/create) (authorization required)

### To try the app you can take following credentials:

* login: `guest`
* password: `guestpizza`

### Screenshots:

##### `/create` page

<img src=https://monosnap.com/image/4y6L2ThR1c6YWAR9Qtds3HiWbiJNKP.png alt="CellularMap.dwg" width="400">

##### Sketch of `CellularMap` for the distribution of ingredients

<img src="https://monosnap.com/image/To9ZwEeVRmWKFElLQW0OC3A6JDhF7D.png" alt="CellularMap.dwg" width="400">
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Pizza App</title>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div id="root"></div>
</body>
</html>
9 changes: 9 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import './src/scss/main.scss';

import routes from './src/routes';
import Router from './src/framework/Router';

const router = new Router(routes);

const root = document.getElementById('root');
root.appendChild(router.host);
Loading