Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
filrak committed Dec 7, 2018
2 parents c157434 + cb2337c commit ee27d09
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ module.exports = {
{
title: 'Modules',
collapsable: false,
children: ['modules/introduction', 'modules/cart'],
children: ['modules/introduction', 'modules/cart', 'modules/user'],
},
{
title: 'Integrations',
Expand Down
14 changes: 12 additions & 2 deletions docs/guide/basics/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Please take a look at the `node-config` docs as the library is open for some oth
:::

:::tip NOTE
Currently, the configuration files are being processed by the webpack during the build process. This means that whenever you apply some configuration changes you shall re-build the app - even when using the `yarn dev` mode.
Currently, the configuration files are being processed by the webpack during the build process. This means that whenever you apply some configuration changes you shall re-build the app - even when using the `yarn dev` mode. This limitation can by however solved with VS 1.4 special config variable. Now the config can be reloaded on-fly with each server request if config.server.dynamicConfigReload is set to true. However in that case the config is added to window.**INITIAL_STATE** with the responses.
:::

Please find the configuration properties reference below.
Expand Down Expand Up @@ -57,14 +57,24 @@ This is optional GraphQL endpoint; we're now supporting graphQL for the [catalog
"elasticsearch": {
"httpAuth": "",
"host": "localhost:8080/api/catalog",
"index": "vue_storefront_catalog"
"index": "vue_storefront_catalog",
"min_score": 0.02,
"csrTimeout": 5000,
"ssrTimeout": 1000,
"queryMethod": "POST"
},
```

Vue Storefront uses the Elastic Search Query Language to query for data. However, here you're putting the Vue Storefront API `/api/catalog` endpoint which is kind of Elastic Search Proxy (dealing with the taxes, security itd.).

If your `vue-storefront-api` instance is running on the `localhost`, port `8080` then the correct elasticsearch endpoint is as presented here.

Starting from Vue Storefront v1.6 user may set the: `config.elasticsearch.queryMethod` to either "POST" (default) / "GET". When "GET" is set, the ElasticSearch Query object is passed to vue-storefront-api as a request parameter named "request". By doing so Service Worker will now able to cache the results from ElasticSearch. Service Workers can not cache any POST requests currently.

:::tip Notice
Service worker is not caching the /api requests on development envs. (localhost) as the vue-storefront-api by default runs on different port (8080)
:::

## SSR

```json
Expand Down
66 changes: 66 additions & 0 deletions docs/guide/installation/prod.vuestorefront.io
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
server {
listen 80;
server_name prod.vuestorefront.io;
return 301 https://prod.vuestorefront.io$request_uri;
}

server {
listen 443 ssl;
server_name prod.vuestorefront.io http2;

ssl on;

ssl_certificate /etc/nginx/ssl/prod.vuestorefront.io.chained.crt;
ssl_certificate_key /etc/nginx/ssl/prod.vuestorefront.io.key;

ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
ssl_ecdh_curve secp384r1;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;

ssl_dhparam /etc/nginx/ssl/dhparam.pem;

add_header Strict-Transport-Security "max-age=31536000" always;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;

gzip on;
gzip_proxied any;
gzip_types
text/css
text/javascript
text/xml
application/javascript
application/json
text/json
text/html;

location / {
proxy_pass http://localhost:3000/;
}

location /assets/ {
proxy_pass http://localhost:3000/assets/;
}

location /api/ {
proxy_pass http://localhost:8080/api/;
}

location /graphql {
proxy_pass http://localhost:8080/graphql;
}

location /img/ {
proxy_pass http://localhost:8080/img/;
}
}
4 changes: 2 additions & 2 deletions docs/guide/installation/production-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ Some additional materials:

#### Nginx configuration

[Here is the complete `/etc/nginx/sites-enabled/prod.vuestorefront.io` file](https://github.com/DivanteLtd/vue-storefront/tree/develop/doc/production-setup/etc/nginx/sites-enabled).
[Here is the complete `/etc/nginx/sites-enabled/prod.vuestorefront.io` file](https://raw.githubusercontent.com/DivanteLtd/vue-storefront/develop/docs/guide/installation/prod.vuestorefront.io).

Create nginx config file from the template (please run as a root user):

```bash
curl https://raw.githubusercontent.com/DivanteLtd/vue-storefront/develop/doc/production-setup/etc/nginx/sites-enabled/prod.vuestorefront.io > /etc/nginx/sites-available/prod.vuestorefront.io
curl https://raw.githubusercontent.com/DivanteLtd/vue-storefront/develop/docs/guide/installation/prod.vuestorefront.io > /etc/nginx/sites-available/prod.vuestorefront.io
ln -s /etc/nginx/sites-available/prod.vuestorefront.io /etc/nginx/sites-enabled/prod.vuestorefront.io
```

Expand Down
28 changes: 26 additions & 2 deletions docs/guide/modules/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,43 @@ A component to handle redirects to user account page and user logout. Usually us

**Methods**

- `close` - closes signup modal
- `close` - closes sign-up modal
- `callLogin` - starts authentication process with emitting `notification-progress-start`, calls `user/login` action with user's email and password.
- `switchElem` - triggers `setAuthElem` mutation with `register` parameter
- `callForgotPassword` - triggers `setAuthElem` mutation with `forgot-pass` parameter

### Register

_Work in progress_
**Methods**

- `switchElem` - triggers `setAuthElem` mutation with `register` parameter
- `close` - closes sign-up modal
- `callRegister` - starts registration process with emitting `notification-progress-start`, calls `user/register` action with user's email, password, first name and last name.

### UserAccount

**Methods**

- `onLoggedIn` - sets `currentUser` and `userCompany`. This method is called on `user-after-loggedin` bus event
- `edit` - sets `isEdited` flag to `true`
- `objectsEqual (a, b, excludedFields = [])` - checks if two passed objects are equal to each other
- `updateProfile` - updates user profile with new data. Calls a method `exitSection(null, updatedProfile)`
- `exitSection` - emits `myAccount-before-updateUser` bus event with updated user profile. Resets component user data to default values.
- `getUserCompany` - finds user company
- `getCountryName` - finds user country name

### UserShippingDetails

**Methods**

- `onLoggedIn` - sets `currentUser` and `shippingDetails`. This method is called on `user-after-loggedin` bus event
- `edit` - sets `isEdited` flag to `true`
- `updateDetails` - updates shipping details with new data. Calls a method `updatedShippingDetails`
- `exitSection` - emits `myAccount-before-updateUser` bus event with updated shipping details. Resets component user data to default values
- `fillCompanyAddress` - finds shipping details
- `getCountryName` - finds country name
- `hasBillingAddres` - returns `true` if user has a billing address

## Store

User Store is designed to handle all actions related to the user account.
Expand Down
6 changes: 5 additions & 1 deletion docs/guide/upgrade-notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@ Required action: Add moved content and remove core import. In case of additional
- [`Compare.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-0aa476fa2f0314806d4afd620c80be54)
#### Other
- [`ProductBundleOption.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-32809917812e7c8c4571be70a693d65b) - splitted single option from `ProductBundleOptions.vue` component.
- [`ProductBundleOption.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-32809917812e7c8c4571be70a693d65b) - splitted single option from `ProductBundleOptions.vue` component.
- [`ProductBundleOptions.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-7ccee94c636406b1a82feddea3a7f520) - single option moved to separate component `ProductBundleOption.vue`, moved to module.
- [`ThankYouPage.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-84c29c5b22568c31b021dc864221563f) added order id display, order confirmation, pulled notifications from core and added mail confirmation
- [`main.scss`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-c65e47159738f3552a22f16ec5c5974f) removed duplicated flexbox grid
<<<<<<< HEAD
- [`index.template.html`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-bf0804a2329350f8e9d9071e40cf1429) (+ all other templates that you may have like minimal, basic etc), added output.appendHead(), renderStyles()
=======
- [`index.template.html`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-bf0804a2329350f8e9d9071e40cf1429) (+ all other templates that you may have like minimal, basic etc), added ` output.appendHead(), renderStyles()`
>>>>>>> main/develop
- [`Category.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-eb709969add1ca4a266ac072cddde954) notifications moved to theme
- [`Checkout.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-1c6544c28d075f275812201fa42755de) notifications moved to theme
- [`MyAccount.vue`](https://github.com/DivanteLtd/vue-storefront/commit/cc17b5bfa43a9510815aea14dce8bafac382bc7f#diff-bb873f532ed9a2efbb157af79a70e0f7) notifications moved to theme
Expand Down

0 comments on commit ee27d09

Please sign in to comment.