From d206a0306f09d6b63a2ca3e5700014fc75c94068 Mon Sep 17 00:00:00 2001 From: theeditor Date: Tue, 27 Feb 2018 22:28:47 -0500 Subject: [PATCH 1/8] update locale translation --- client/src/app/app.module.ts | 2 +- .../src/app/view/about/about.component.html | 12 +- .../activity-detail.component.html | 4 +- .../app/view/activity/activity.component.html | 4 +- client/src/app/view/home/home.component.html | 6 +- .../partical/footer/footer.component.html | 2 +- .../partical/navbar/navbar.component.html | 6 +- .../not-found/not-found.component.html | 8 +- client/src/app/view/qa/qa.component.html | 12 +- .../work-detail/work-detail.component.html | 2 +- client/src/app/view/work/work.component.html | 4 +- client/src/locale/messages.sr-cn.xlf | 236 +++++++++++++++++ client/src/locale/messages.zh-CN.xlf | 249 ++++++++++++++++++ client/src/messages.xlf | 247 +++++++++++++++++ 14 files changed, 763 insertions(+), 31 deletions(-) create mode 100644 client/src/locale/messages.sr-cn.xlf create mode 100644 client/src/locale/messages.zh-CN.xlf create mode 100644 client/src/messages.xlf diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index cf5a66f..262e438 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -1,5 +1,5 @@ import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; +import { LOCALE_ID,NgModule } from '@angular/core'; import { ServiceWorkerModule } from '@angular/service-worker'; diff --git a/client/src/app/view/about/about.component.html b/client/src/app/view/about/about.component.html index 2de1dd7..9559d51 100644 --- a/client/src/app/view/about/about.component.html +++ b/client/src/app/view/about/about.component.html @@ -2,9 +2,9 @@

About Us



-

+

“Is the mic OK? Check,1,2,OK.”

-

+

Hello everyone, we are Starry Sea Volunteers Association, dedicated to delivering the best of Love Live Sunshine Aqours events related support association in China!
@@ -12,11 +12,11 @@

About Us

other souvenirs for Aqours events in China several times, trying hard to pass on the warmth of school idols, and leave a warm and precious memory for everyone who loves school idols!

-

+

From the predecessor of the organization μ’S Final LoveLive Callbook and all the way to today, we made include but not limited to Aqours' 1st and 2nd Callbook and BML-SP's leaflets and other related commemorative badges, and we still committed to providing with more beautiful, more diverse souvenirs!

-

+

The cost of making a souvenir comes from the crowdfunding of the members, we keep a record of all the detailed expenses.Leave footprint of the stories you created with us!We Believe, with the joint efforts of everyone, we can definitely create "The new story that everyone accomplishes together"! @@ -38,8 +38,8 @@

About Us

-

Any Questions?

- +

Any Questions?

+
diff --git a/client/src/app/view/activity-detail/activity-detail.component.html b/client/src/app/view/activity-detail/activity-detail.component.html index 206f402..00fc28b 100644 --- a/client/src/app/view/activity-detail/activity-detail.component.html +++ b/client/src/app/view/activity-detail/activity-detail.component.html @@ -10,8 +10,8 @@ - - + + diff --git a/client/src/app/view/activity/activity.component.html b/client/src/app/view/activity/activity.component.html index ac149e6..c8dd8dc 100644 --- a/client/src/app/view/activity/activity.component.html +++ b/client/src/app/view/activity/activity.component.html @@ -1,6 +1,6 @@
-

Activities

+

Activities

@@ -11,7 +11,7 @@

Activities

{{activity.name}}

{{activity.summary}}

- Learn More + Learn More

diff --git a/client/src/app/view/home/home.component.html b/client/src/app/view/home/home.component.html index ad6edad..d994946 100644 --- a/client/src/app/view/home/home.component.html +++ b/client/src/app/view/home/home.component.html @@ -2,13 +2,13 @@
-

+

We Are Starry Sea Volunteers Association

-

Dedicated to delivering the best of LoveLive Sunshine
Aqours events related support

+

Dedicated to delivering the best of LoveLive Sunshine
Aqours events related support

-

+

The main job of Starry Sea is to make and distribute
callbooks and other goods for Aqours' activities throughout China,
and provide volunteer service as much as possible at live events.
diff --git a/client/src/app/view/partical/footer/footer.component.html b/client/src/app/view/partical/footer/footer.component.html index f008448..f8613e3 100644 --- a/client/src/app/view/partical/footer/footer.component.html +++ b/client/src/app/view/partical/footer/footer.component.html @@ -1,5 +1,5 @@

- ©2018-2019 StarrySea + ©2018-2019 StarrySea
diff --git a/client/src/app/view/partical/navbar/navbar.component.html b/client/src/app/view/partical/navbar/navbar.component.html index b735644..4c720bd 100644 --- a/client/src/app/view/partical/navbar/navbar.component.html +++ b/client/src/app/view/partical/navbar/navbar.component.html @@ -7,13 +7,13 @@ diff --git a/client/src/app/view/partical/not-found/not-found.component.html b/client/src/app/view/partical/not-found/not-found.component.html index 00d7470..aed455a 100644 --- a/client/src/app/view/partical/not-found/not-found.component.html +++ b/client/src/app/view/partical/not-found/not-found.component.html @@ -1,15 +1,15 @@
-

404 +

404
Page Not Found

Error -

Please Try Again Later

+

Please Try Again Later

-

Here is a random picture of cucu

- +

Here is a random picture of cucu

+
-

If you have any questions or any doubt

-

Please write it in the question box

+

If you have any questions or any doubt

+

Please write it in the question box

@@ -11,17 +11,17 @@
- + -

The question is completely anonymous,Please do not ask question that do not meet the core values of socialism,谢谢茄子

+

The question is completely anonymous,Please do not ask question that do not meet the core values of socialism,谢谢茄子

- +
-

Answered Questions

+

Answered Questions

diff --git a/client/src/app/view/work-detail/work-detail.component.html b/client/src/app/view/work-detail/work-detail.component.html index 753ddd8..73af7cf 100644 --- a/client/src/app/view/work-detail/work-detail.component.html +++ b/client/src/app/view/work-detail/work-detail.component.html @@ -8,7 +8,7 @@

{{workData.name}}

{{workData.summary}}
- Download + Download
diff --git a/client/src/app/view/work/work.component.html b/client/src/app/view/work/work.component.html index 3ef976c..cd0ef63 100644 --- a/client/src/app/view/work/work.component.html +++ b/client/src/app/view/work/work.component.html @@ -1,6 +1,6 @@
-

Works Gallery

+

Works Gallery

@@ -11,7 +11,7 @@

Works Gallery

{{work.name}}

{{work.summary}}

- Learn More + Learn More

diff --git a/client/src/locale/messages.sr-cn.xlf b/client/src/locale/messages.sr-cn.xlf new file mode 100644 index 0000000..2db84f4 --- /dev/null +++ b/client/src/locale/messages.sr-cn.xlf @@ -0,0 +1,236 @@ + + + + + + 我们是星之海志愿者公会 + + + app/view/home/home.component.ts + 5 + + 首页heading + + + 致力于传递LoveLive Sunshine的魅力Aqours events相关应援 + + app/view/home/home.component.ts + 9 + + + + + 星之海的主要工作是为Aqours在国内进行的活动 + 制作callbook、应援物进行免费的发放, + 并在live时为大家提供力所能及的志愿服务。 + 想要以那“第十人”为目标,努力做到最好! + + + app/view/home/home.component.ts + 11 + + + + 作品展示 + + app/view/work/work.component.ts + 3 + + 作品展示 + + + 了解更多 + + app/view/work/work.component.ts + 14 + + + app/view/activity/activity.component.ts + 14 + + 了解更多 + + + 活动 + + app/view/activity/activity.component.ts + 3 + + + + 作品阅览 + + app/view/partical/navbar/navbar.component.ts + 10 + + 作品 + + + 活动众筹 + + app/view/partical/navbar/navbar.component.ts + 13 + + 活动 + + + 关于我们 + + app/view/partical/navbar/navbar.component.ts + 16 + + 关于我们 + + + 众筹人名字 + + app/view/activity-detail/activity-detail.component.ts + 13 + + 众筹人名字 + + + 众筹金额 + + app/view/activity-detail/activity-detail.component.ts + 14 + + 众筹金额 + + + 下载 + + app/view/work-detail/work-detail.component.ts + 11 + + + + 404 页面未找到 + + + app/view/partical/not-found/not-found.component.ts + 3 + + + + 请稍后重试 + + app/view/partical/not-found/not-found.component.ts + 8 + + + + 我们的公会之花的照片 + + app/view/partical/not-found/not-found.component.ts + 11 + + 醋图 + + + 显示照片 + + app/view/partical/not-found/not-found.component.ts + 12 + + 展示醋图 + + + "麦克风还正常吗?Check,1,2,OK" + + app/view/about/about.component.ts + 5 + + + + + 大家好,我们是星之海志愿者公会,致力于为校园偶像在中国国内的Event应援、向各位传递LoveLove!Sunshine!!的魅力的组织! + 想要成为Aqours的【第十人】,我们凭借各自微小的力量聚集在了一起,为Aqours在国内的活动多次制作了CallBook,宣传折页,徽章等纪念品, + 力图将校园偶像带给我们的温暖传递下去,为热爱校园偶像的每一个人留下一份温暖而珍贵的回忆! + + + app/view/about/about.component.ts + 7 + + + + + 从组织前身的μ’S Final LoveLive Callbook制作组走来,我们制作了包括但不限于Aqours 的1st 与2nd 的CallBook以及BML-SP的宣传折页和其他相应的纪念徽章在内的应援物, + 并且还在致力于为大家提供更精美,更多样的纪念品! + + + app/view/about/about.component.ts + 15 + + + + + 制作纪念品时的花销来自于成员们的众筹款,每一次的详细花销我们都记录在册, + 留下你与我们一同创造的故事的痕迹!我们相信,在大家共同的努力下,我们定能创造出【大家一起实现的崭新的故事】! + + + app/view/about/about.component.ts + 19 + + + + 任何问题和意见? + + app/view/about/about.component.ts + 41 + + + + 质问箱 + + app/view/about/about.component.ts + 42 + + + + ©2018-2019 StarrySea + + app/view/partical/footer/footer.component.ts + 3 + + + + 如果您对我们有任何意见、建议或者是单纯的留言 + + app/view/qa/qa.component.ts + 5 + + + + 请在质问箱里面提出来吧 + + app/view/qa/qa.component.ts + 6 + + + + 您的消息 + + app/view/qa/qa.component.ts + 14 + + 您的问题 + + + 提问是完全匿名,不符合社会主义核心价值观和让人感到伤心的问题还是请不要提出,谢谢茄子 + + app/view/qa/qa.component.ts + 16 + + + + 确认送出 + + app/view/qa/qa.component.ts + 18 + + 提问 + + + + diff --git a/client/src/locale/messages.zh-CN.xlf b/client/src/locale/messages.zh-CN.xlf new file mode 100644 index 0000000..d9a4091 --- /dev/null +++ b/client/src/locale/messages.zh-CN.xlf @@ -0,0 +1,249 @@ + + + + + + We Are Starry Sea Volunteers Association + + + app/view/home/home.component.ts + 5 + + 首页heading我们是星之海志愿者公会 + + + Dedicated to delivering the best of LoveLive SunshineAqours events related support + + app/view/home/home.component.ts + 9 + 致力于传递LoveLive Sunshine的魅力Aqours events相关应援 + + + + The main job of Starry Sea is to make and distribute + callbooks and other goods for Aqours' activities throughout China, + and provide volunteer service as much as possible at live events. + Aim for that "tenth person", strive to be the best! + + + About us + + + app/view/home/home.component.ts + 11 + 星之海的主要工作是为Aqours在国内进行的活动制作callbook、应援物进行免费的发放,并在live时为大家提供力所能及的志愿服务。想要以那“第十人”为目标,努力做到最好! + + + 关于我们 + + + Works Gallery + + app/view/work/work.component.ts + 3 + + 作品展示作品展示 + + + Learn More + + app/view/work/work.component.ts + 14 + + + app/view/activity/activity.component.ts + 14 + + 了解更多了解更多 + + + Activities + + app/view/activity/activity.component.ts + 3 + 活动 + + + Work + + app/view/partical/navbar/navbar.component.ts + 10 + + 作品作品阅览 + + + Activity + + app/view/partical/navbar/navbar.component.ts + 13 + + 活动活动众筹 + + + About Us + + app/view/partical/navbar/navbar.component.ts + 16 + + 关于我们关于我们 + + + Name + + app/view/activity-detail/activity-detail.component.ts + 13 + + 众筹人名字众筹人名字 + + + Amount + + app/view/activity-detail/activity-detail.component.ts + 14 + + 众筹金额众筹金额 + + + Download + + app/view/work-detail/work-detail.component.ts + 11 + 下载 + + + 404 + + Page Not Found + + + app/view/partical/not-found/not-found.component.ts + 3 + 404 页面未找到 + + + Please Try Again Later + + app/view/partical/not-found/not-found.component.ts + 8 + 请稍后重试 + + + Here is a random picture of cucu + + app/view/partical/not-found/not-found.component.ts + 11 + + 醋图我们的公会之花的照片 + + + Show Picture + + app/view/partical/not-found/not-found.component.ts + 12 + + 展示醋图显示照片 + + + + “Is the mic OK? Check,1,2,OK.” + + app/view/about/about.component.ts + 5 + "麦克风还正常吗?Check,1,2,OK" + + + + Hello everyone, we are Starry Sea Volunteers Association, dedicated to delivering the best of Love Live Sunshine + Aqours events related support association in China! + + Aim to be the "Tenth Person" of Aqours, we gather our own tiny strength together, made callbooks, leaflet, badges + other souvenirs for Aqours events in China several times, trying hard to pass on the warmth of school idols, and + leave a warm and precious memory for everyone who loves school idols! + + + app/view/about/about.component.ts + 7 + 大家好,我们是星之海志愿者公会,致力于为校园偶像在中国国内的Event应援、向各位传递LoveLove!Sunshine!!的魅力的组织!

想要成为Aqours的【第十人】,我们凭借各自微小的力量聚集在了一起,为Aqours在国内的活动多次制作了CallBook,宣传折页,徽章等纪念品,力图将校园偶像带给我们的温暖传递下去,为热爱校园偶像的每一个人留下一份温暖而珍贵的回忆! + + + + From the predecessor of the organization μ’S Final LoveLive Callbook and all the way to today, we made include but + not limited to Aqours' 1st and 2nd Callbook and BML-SP's leaflets and other related commemorative badges, and we + still committed to providing with more beautiful, more diverse souvenirs! + + app/view/about/about.component.ts + 15 + 从组织前身的μ’S Final LoveLive Callbook制作组走来,我们制作了包括但不限于Aqours 的1st 与2nd 的CallBook以及BML-SP的宣传折页和其他相应的纪念徽章在内的应援物,并且还在致力于为大家提供更精美,更多样的纪念品! + + + + The cost of making a souvenir comes from the crowdfunding of the members, we keep a record of all the detailed + expenses.Leave footprint of the stories you created with us!We Believe, with the joint efforts of everyone, we can + definitely create "The new story that everyone accomplishes together"! + + + app/view/about/about.component.ts + 19 + 制作纪念品时的花销来自于成员们的众筹款,每一次的详细花销我们都记录在册,留下你与我们一同创造的故事的痕迹!我们相信,在大家共同的努力下,我们定能创造出【大家一起实现的崭新的故事】! + + + Any Questions? + + app/view/about/about.component.ts + 41 + 任何问题和意见? + + + Question Box + + app/view/about/about.component.ts + 42 + 质问箱 + + + ©2018-2019 StarrySea + + app/view/partical/footer/footer.component.ts + 3 + (c)2018-2019 星之海项目 + + + If you have any questions or any doubt + + app/view/qa/qa.component.ts + 5 + 如果您对我们有任何意见、建议或者是单纯的留言 + + + Please write it in the question box + + app/view/qa/qa.component.ts + 6 + 请在质问箱里面提出来吧 + + + Your Message: + + app/view/qa/qa.component.ts + 14 + + 您的问题您的消息 + + + The question is completely anonymous,Please do not ask question that do not meet the core values of socialism,谢谢茄子 + + app/view/qa/qa.component.ts + 16 + 提问是完全匿名,不符合社会主义核心价值观和让人感到伤心的问题还是请不要提出,谢谢茄子 + + + Send + + app/view/qa/qa.component.ts + 18 + + 提问确认送出 + + + + diff --git a/client/src/messages.xlf b/client/src/messages.xlf new file mode 100644 index 0000000..57a1e65 --- /dev/null +++ b/client/src/messages.xlf @@ -0,0 +1,247 @@ + + + + + + + We Are Starry Sea Volunteers Association + + + app/view/home/home.component.ts + 5 + + 首页heading + + + Dedicated to delivering the best of LoveLive SunshineAqours events related support + + app/view/home/home.component.ts + 9 + + + + + The main job of Starry Sea is to make and distribute + callbooks and other goods for Aqours' activities throughout China, + and provide volunteer service as much as possible at live events. + Aim for that "tenth person", strive to be the best! + + + About us + + + app/view/home/home.component.ts + 11 + + + + Works Gallery + + app/view/work/work.component.ts + 3 + + 作品展示 + + + Learn More + + app/view/work/work.component.ts + 14 + + + app/view/activity/activity.component.ts + 14 + + 了解更多 + + + Activities + + app/view/activity/activity.component.ts + 3 + + + + Work + + app/view/partical/navbar/navbar.component.ts + 10 + + 作品 + + + Activity + + app/view/partical/navbar/navbar.component.ts + 13 + + 活动 + + + About Us + + app/view/partical/navbar/navbar.component.ts + 16 + + 关于我们 + + + Name + + app/view/activity-detail/activity-detail.component.ts + 13 + + 众筹人名字 + + + Amount + + app/view/activity-detail/activity-detail.component.ts + 14 + + 众筹金额 + + + Download + + app/view/work-detail/work-detail.component.ts + 11 + + + + 404 + + Page Not Found + + + app/view/partical/not-found/not-found.component.ts + 3 + + + + Please Try Again Later + + app/view/partical/not-found/not-found.component.ts + 8 + + + + Here is a random picture of cucu + + app/view/partical/not-found/not-found.component.ts + 11 + + 醋图 + + + Show Picture + + app/view/partical/not-found/not-found.component.ts + 12 + + 展示醋图 + + + + “Is the mic OK? Check,1,2,OK.” + + app/view/about/about.component.ts + 5 + + + + + Hello everyone, we are Starry Sea Volunteers Association, dedicated to delivering the best of Love Live Sunshine + Aqours events related support association in China! + + Aim to be the "Tenth Person" of Aqours, we gather our own tiny strength together, made callbooks, leaflet, badges + other souvenirs for Aqours events in China several times, trying hard to pass on the warmth of school idols, and + leave a warm and precious memory for everyone who loves school idols! + + + app/view/about/about.component.ts + 7 + + + + + From the predecessor of the organization μ’S Final LoveLive Callbook and all the way to today, we made include but + not limited to Aqours' 1st and 2nd Callbook and BML-SP's leaflets and other related commemorative badges, and we + still committed to providing with more beautiful, more diverse souvenirs! + + app/view/about/about.component.ts + 15 + + + + + The cost of making a souvenir comes from the crowdfunding of the members, we keep a record of all the detailed + expenses.Leave footprint of the stories you created with us!We Believe, with the joint efforts of everyone, we can + definitely create "The new story that everyone accomplishes together"! + + + app/view/about/about.component.ts + 19 + + + + Any Questions? + + app/view/about/about.component.ts + 41 + + + + Question Box + + app/view/about/about.component.ts + 42 + + + + ©2018-2019 StarrySea + + app/view/partical/footer/footer.component.ts + 3 + + + + If you have any questions or any doubt + + app/view/qa/qa.component.ts + 5 + + + + Please write it in the question box + + app/view/qa/qa.component.ts + 6 + + + + Your Message: + + app/view/qa/qa.component.ts + 14 + + 您的问题 + + + The question is completely anonymous,Please do not ask question that do not meet the core values of socialism,谢谢茄子 + + app/view/qa/qa.component.ts + 16 + + + + Send + + app/view/qa/qa.component.ts + 18 + + 提问 + + + + From e6717695006807ce7f430233956e95ddcd8d2e60 Mon Sep 17 00:00:00 2001 From: theeditor Date: Wed, 28 Feb 2018 16:53:57 -0500 Subject: [PATCH 2/8] complete locale adaptation --- client/src/app/common/locale.ts | 4 ++++ .../activity-management.component.html | 6 ++++++ .../activity-management.component.ts | 8 +++++++- .../work-management.component.html | 6 ++++++ .../work-management/work-management.component.ts | 8 +++++++- client/src/app/view/qa/qa.component.html | 2 +- client/src/index.html | 8 +++++--- server/actions/activity/create.js | 4 ++-- server/actions/activity/fetch.js | 15 ++++++++++++--- server/actions/work/create.js | 3 ++- server/actions/work/fetch.js | 15 ++++++++++++--- server/models/Activity.js | 5 +++++ server/models/Qa.js | 5 +++++ server/models/Works.js | 5 +++++ 14 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 client/src/app/common/locale.ts diff --git a/client/src/app/common/locale.ts b/client/src/app/common/locale.ts new file mode 100644 index 0000000..d18671b --- /dev/null +++ b/client/src/app/common/locale.ts @@ -0,0 +1,4 @@ +export const locale = [ + "en-US", + "ja-JP" +]; diff --git a/client/src/app/view/admin/activity-management/activity-management.component.html b/client/src/app/view/admin/activity-management/activity-management.component.html index 96c8f7e..fcaab82 100644 --- a/client/src/app/view/admin/activity-management/activity-management.component.html +++ b/client/src/app/view/admin/activity-management/activity-management.component.html @@ -1,5 +1,11 @@
+
+ + +
diff --git a/client/src/app/view/admin/activity-management/activity-management.component.ts b/client/src/app/view/admin/activity-management/activity-management.component.ts index 4e4c83d..9734250 100644 --- a/client/src/app/view/admin/activity-management/activity-management.component.ts +++ b/client/src/app/view/admin/activity-management/activity-management.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import {FormControl, FormGroup, Validators} from "@angular/forms"; import {ActivityService} from "../../../service/activity.service"; +import {locale} from "../../../common/locale"; declare var swal:any; @Component({ selector: 'app-activity-management', @@ -15,6 +16,8 @@ export class ActivityManagementComponent implements OnInit { activityForm:FormGroup; + localeArr: Array = locale; + myFile:File; /* property of File type */ fileChange(files: any){ console.log(files); @@ -36,7 +39,10 @@ export class ActivityManagementComponent implements OnInit { ), endTime:new FormControl('', Validators.required - ) + ), + locale:new FormControl('',[ + Validators.required + ]) }) } diff --git a/client/src/app/view/admin/work-management/work-management.component.html b/client/src/app/view/admin/work-management/work-management.component.html index a956df1..5fe0f7e 100644 --- a/client/src/app/view/admin/work-management/work-management.component.html +++ b/client/src/app/view/admin/work-management/work-management.component.html @@ -1,5 +1,11 @@
+
+ + +
diff --git a/client/src/app/view/admin/work-management/work-management.component.ts b/client/src/app/view/admin/work-management/work-management.component.ts index 902e0c4..abd8294 100644 --- a/client/src/app/view/admin/work-management/work-management.component.ts +++ b/client/src/app/view/admin/work-management/work-management.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import {WorkService} from "../../../service/work.service"; import {FormControl, FormGroup, Validators} from "@angular/forms"; +import {locale} from "../../../common/locale"; declare var $: any; declare var swal:any; @Component({ @@ -16,6 +17,8 @@ export class WorkManagementComponent implements OnInit { workForm:FormGroup; + localeArr: Array = locale; + pdf:File; cover:File; images:Array; @@ -26,7 +29,10 @@ export class WorkManagementComponent implements OnInit { ), summary: new FormControl('', Validators.required - ) + ), + locale:new FormControl('',[ + Validators.required + ]) }) } diff --git a/client/src/app/view/qa/qa.component.html b/client/src/app/view/qa/qa.component.html index d868a48..1cf9ea7 100644 --- a/client/src/app/view/qa/qa.component.html +++ b/client/src/app/view/qa/qa.component.html @@ -21,7 +21,7 @@
-

Answered Questions

+

Answered Questions

diff --git a/client/src/index.html b/client/src/index.html index b011bca..0dd123a 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -40,9 +40,11 @@

Loading...

diff --git a/server/actions/activity/create.js b/server/actions/activity/create.js index ab494c3..7278d5d 100644 --- a/server/actions/activity/create.js +++ b/server/actions/activity/create.js @@ -7,8 +7,8 @@ const Funding = require('../../models/Funding'); //@return:JSON Object createActivity = (req,res)=>{ "use strict"; - var { name,content,summary,endTime} = req.body; - const data = {name, content, summary,date:{created:Date.now(),endTime},cover:req.file.filename}; + var { locale,name,content,summary,endTime} = req.body; + const data = {locale,name, content, summary,date:{created:Date.now(),endTime},cover:req.file.filename}; Activity.create(data,(err,docs)=>{ if(err){ res.status(500).json({ diff --git a/server/actions/activity/fetch.js b/server/actions/activity/fetch.js index 43d1eee..5198772 100644 --- a/server/actions/activity/fetch.js +++ b/server/actions/activity/fetch.js @@ -2,12 +2,21 @@ const Activity = require('../../models/Activity'); //Fetch activity by limit and page no. //@method:GET -//@query: page,limit +//@query: page,limit,locale //@return: JSON Object w/ Embed Array fetchActivity = (req,res)=>{ "use strict"; - var { page,limit} = req.query; - Activity.find({}).sort({"date.created":-1}).exec(["name","summary","cover"],(err,docs)=>{ + var { locale,page,limit} = req.query; + if(!locale){ + locale = "en-US" + } + Activity.find({ + locale + }).sort({ + "date.created":-1 + }).exec([ + "name","summary","cover" + ],(err,docs)=>{ if(err){ res.status(500).json({ success:false, diff --git a/server/actions/work/create.js b/server/actions/work/create.js index 897ae86..514d235 100644 --- a/server/actions/work/create.js +++ b/server/actions/work/create.js @@ -2,9 +2,10 @@ const works = require('../../models/Works'); //Create New Work //@body:name,summary createWork = (req,res)=>{ - var {name,summary} = req.body; + var {locale,name,summary} = req.body; "use strict"; var data = { + locale, name, summary, created:Date.now(), diff --git a/server/actions/work/fetch.js b/server/actions/work/fetch.js index 763b043..1088cf6 100644 --- a/server/actions/work/fetch.js +++ b/server/actions/work/fetch.js @@ -1,13 +1,22 @@ const works = require('../../models/Works'); //Fetch work by limit and page no. -//@query: page,limit +//@query: page,limit,locale //@return: JSON Object w/ Embed Array fetchWork = (req,res)=>{ "use strict"; - var { page,limit} = req.query; + var { locale,page,limit} = req.query; var page = parseInt(page); var limit = parseInt(limit); - works.find({}).sort({created:-1}).exec(["name","summary","file.cover"],(err,docs)=>{ + if(!req.query.locale){ + locale = "en-US" + } + works.find({ + locale + }).sort({ + created:-1 + }).exec([ + "name","summary","file.cover" + ],(err,docs)=>{ if(err){ res.status(500).json({ success:false, diff --git a/server/models/Activity.js b/server/models/Activity.js index 888a4f1..2135475 100644 --- a/server/models/Activity.js +++ b/server/models/Activity.js @@ -3,6 +3,11 @@ const mongoose = require('mongoose'); mongoose.connect(require('../config').database); //Init Schema const schema = mongoose.Schema({ + locale:{ + type:String, + required:true, + default:"en-US" + }, name:{ type:String, required:true, diff --git a/server/models/Qa.js b/server/models/Qa.js index 861465a..359f3ac 100644 --- a/server/models/Qa.js +++ b/server/models/Qa.js @@ -2,6 +2,11 @@ const mongoose = require('mongoose'); mongoose.connect(require('../config').database); const schema = mongoose.Schema({ + locale:{ + type:String, + required:true, + default:"en-US" + }, question:{ type:String, required:true, diff --git a/server/models/Works.js b/server/models/Works.js index f4f0de7..2e05822 100644 --- a/server/models/Works.js +++ b/server/models/Works.js @@ -2,6 +2,11 @@ const mongoose = require('mongoose'); mongoose.connect(require('../config').database); const schema = mongoose.Schema({ + locale:{ + type:String, + required:true, + default:"en-US" + }, name:{ type:String, required:true From d945a120db230a69d510a164ade1d568405604d8 Mon Sep 17 00:00:00 2001 From: theeditor Date: Wed, 21 Mar 2018 12:55:03 -0400 Subject: [PATCH 3/8] update client and server --- client/package-lock.json | 1089 +++++++++++++--------- client/package.json | 32 +- client/proxy.js | 98 +- client/src/app/app.module.ts | 69 +- client/src/app/service/locale.service.ts | 28 + client/src/locale/messages.ja-JP.xlf | 260 ++++++ client/src/messages.xlf | 8 + server/app.js | 10 +- server/package-lock.json | 12 + server/package.json | 3 +- server/public/favicon.ico | Bin 0 -> 5430 bytes 11 files changed, 1085 insertions(+), 524 deletions(-) create mode 100644 client/src/app/service/locale.service.ts create mode 100644 client/src/locale/messages.ja-JP.xlf create mode 100644 server/public/favicon.ico diff --git a/client/package-lock.json b/client/package-lock.json index 0076ea8..6f1f39b 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -43,7 +43,7 @@ "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -61,17 +61,17 @@ } }, "@angular/animations": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.6.tgz", - "integrity": "sha512-LMfg1NYTPPu+mEweOcwWEHM7Aaw7OnzjGE7UeUGYHd4ujQlOc8f6u4Z0X4Wfo4vIpHIz8ClNKbSuQ8+5S4Ofsg==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-5.2.7.tgz", + "integrity": "sha512-t/B0z2OYO+yy8SJKB1/evSNPvnLsl+AclhM1p21/NnETxQUqvct1KXeDM7nYDu5hmnGmuavhua8LDo6rN5zS+Q==", "requires": { "tslib": "1.9.0" } }, "@angular/cli": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.7.1.tgz", - "integrity": "sha512-sFftjn+COiNVs7JpeUNQAKT4iZaryZVrne+jw7XtuyRZ0uAm/aaxEdczMgoK0cB98M38t6xsaGnXsKwolpMfaA==", + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-1.7.2.tgz", + "integrity": "sha512-U0RXiG6rNe5GqZazn+FLy3p4rOhBwpf5NWAec/JKe+u/cekIsyeDXLfqGJwzLhMEV4Iv2k4i3o5imejkEc4A9g==", "dev": true, "requires": { "@angular-devkit/build-optimizer": "0.3.2", @@ -81,27 +81,27 @@ "@ngtools/webpack": "1.10.1", "@schematics/angular": "0.3.2", "@schematics/package-update": "0.3.2", - "ajv": "6.1.1", + "ajv": "6.2.1", "autoprefixer": "7.2.6", - "cache-loader": "1.2.0", + "cache-loader": "1.2.2", "chalk": "2.2.2", "circular-dependency-plugin": "4.4.0", - "clean-css": "4.1.9", + "clean-css": "4.1.11", "common-tags": "1.7.2", - "copy-webpack-plugin": "4.4.1", + "copy-webpack-plugin": "4.4.3", "core-object": "3.1.5", "denodeify": "1.2.1", "ember-cli-string-utils": "1.1.0", "extract-text-webpack-plugin": "3.0.2", - "file-loader": "1.1.9", + "file-loader": "1.1.11", "fs-extra": "4.0.3", "glob": "7.1.2", "html-webpack-plugin": "2.30.1", "istanbul-instrumenter-loader": "3.0.0", "karma-source-map-support": "1.2.0", "less": "2.7.3", - "less-loader": "4.0.5", - "license-webpack-plugin": "1.1.1", + "less-loader": "4.0.6", + "license-webpack-plugin": "1.2.3", "loader-utils": "1.1.0", "lodash": "4.17.4", "memory-fs": "0.4.1", @@ -113,48 +113,48 @@ "portfinder": "1.0.13", "postcss": "6.0.19", "postcss-import": "11.1.0", - "postcss-loader": "2.1.0", - "postcss-url": "7.3.0", + "postcss-loader": "2.1.1", + "postcss-url": "7.3.1", "raw-loader": "0.5.1", "resolve": "1.5.0", "rxjs": "5.5.6", - "sass-loader": "6.0.6", + "sass-loader": "6.0.7", "semver": "5.5.0", "silent-error": "1.1.0", "source-map-support": "0.4.18", "style-loader": "0.19.1", "stylus": "0.54.5", - "stylus-loader": "3.0.1", - "uglifyjs-webpack-plugin": "1.2.0", + "stylus-loader": "3.0.2", + "uglifyjs-webpack-plugin": "1.2.2", "url-loader": "0.6.2", "webpack": "3.11.0", "webpack-dev-middleware": "1.12.2", - "webpack-dev-server": "2.11.1", + "webpack-dev-server": "2.11.2", "webpack-merge": "4.1.2", "webpack-sources": "1.1.0", "webpack-subresource-integrity": "1.0.4" } }, "@angular/common": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.6.tgz", - "integrity": "sha512-gJrUKW9rDeVGP0pBNGDEEP/U+vBtgIVd1+52X5mc+dNFuUQdQ2kNTK5+fbDfwVstEWE86gloHlG2GS2Ga94R3Q==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-5.2.7.tgz", + "integrity": "sha512-TqsDMmPX1JlEH2QIneuAVzEO4ubzxLBAdV4XbKWDQKC/UfbWIIpSrSp2cIi85NV1tKkg0WAaodCIZ02NucHIHg==", "requires": { "tslib": "1.9.0" } }, "@angular/compiler": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.6.tgz", - "integrity": "sha512-RVIIIbCmJwkfmL1jYmwTV2ve5k2JaNqVXKg8eT/wWiaCeqqZOydbIdcBUfgRxqn4ABZYgaeDNmjrsMl6acKv0A==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-5.2.7.tgz", + "integrity": "sha512-26RG+Dy+M/95OyNNqM+OAruarIPOmbndiaglz2dMrNYzenfbSgG/AoPlL5uCdSqZDiXgnlKnS2K6/ePWXDSKNw==", "requires": { "tslib": "1.9.0" } }, "@angular/compiler-cli": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.6.tgz", - "integrity": "sha512-HKA6AvM6LZVkNFEDoQ9cRzPkiUpLIuJ+ndACg8cXkEDV30FetBiNC2p8viB14fdSzcuTnU+MULODhW/Tk3OAqA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-5.2.7.tgz", + "integrity": "sha512-91gQolzsKyOlmBNW1J7lyu+dXHe/KHbAXU459hn6rycMHuTt60XvxA5O3xy3Pqt28VgbOOSrQfq5eVjZodKjWg==", "dev": true, "requires": { "chokidar": "1.7.0", @@ -172,63 +172,63 @@ } }, "@angular/core": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.6.tgz", - "integrity": "sha512-BOkF7RM4VcqfIlQeOz17FucfocUmyZBsGIWxVSggeCBz2pQDyOUJ1IqrDh5c4yldW9G4Gjhhn/AkPykvPevI3w==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-5.2.7.tgz", + "integrity": "sha512-DQuL6n7cjBfZmWX5RCV271g6PW9N8b93g2skWnM/zjm+BL9tfHPgvmsjMNB7QEHSxW8VBaaQ6gjj422O01A87g==", "requires": { "tslib": "1.9.0" } }, "@angular/forms": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.6.tgz", - "integrity": "sha512-Zo0uADD9nx6esfRx7oLLqw4uiA4zjvBh+MVeJj6ZfL7TYOJzLYyawt4qsvJFQ02tweldjs/duWaaf4tLHf6L0g==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-5.2.7.tgz", + "integrity": "sha512-43oLKdzMjMV/hOLpSTg8aOggcx+veTnPp/JN+KzMGo2qtbim5nk3fnuscWDeDOdkh8hPRPGarKxeFNEE9ZZSTg==", "requires": { "tslib": "1.9.0" } }, "@angular/http": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.6.tgz", - "integrity": "sha512-8ecA0HrDY88vO9YKl6aG82budd0+vwFoECmZ9xRCiNu+HqlgJ7siyLzwdjllmoi90pJbvhQITytfy2zEmDBNIA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-5.2.7.tgz", + "integrity": "sha512-048+tCbsNYc9xVvIn5/sOvO4fXVkbB5b1IRYRGiRYXpTz6+JWIm5AwOqZIOeVDgqgZHFf96QllXDcFbdNVDgSA==", "requires": { "tslib": "1.9.0" } }, "@angular/language-service": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-5.2.6.tgz", - "integrity": "sha512-46PaLwRCVhzOb3/zvvznSqF1WQ7ITADCnFuhc09TS1YKH2yf62sOjnnuAo1ZZDdN6UI/Y1zajaBrhpupTit9Rw==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-5.2.7.tgz", + "integrity": "sha512-Tqd9ll6QBSKa2PKzhbyRiKfKZh4MOB6um3aiedC+m3IBB8zMgrY+EJbfP/SN52LsZdShEnLjuKcBZG0eqTjgEQ==", "dev": true }, "@angular/platform-browser": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.6.tgz", - "integrity": "sha512-5jP0TeOCCM2SfXjC8306x6p3hdj7+GLuWsXuKyqozqdnr69RKI0vssY0XUzU0If/YsLWVoW/aY6wuiF8ybfIuA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-5.2.7.tgz", + "integrity": "sha512-SdLx4F6tOy4/s3y1KZ/Z3YA6fiIrydaO2bry2FJglDxJh24p6TZIob+zC16N2MTuFW819KY5OlacNhc8aj6Yag==", "requires": { "tslib": "1.9.0" } }, "@angular/platform-browser-dynamic": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.6.tgz", - "integrity": "sha512-forNn/W2nYDGfHTw7qWX20d6FCICeI1hYoGGAXcjuODmFix1ebzFaxG1IOzGZqf/J3Zj43pEMdPMEp5tiukSVA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.2.7.tgz", + "integrity": "sha512-95Rwf1JcGF/BI48k+VG2moLTVC863jPSjmHaGkz7cA9bi/QrRFGvFghl1qIm4Ezp3dj8CH8TE3TWB+1AmAg3AQ==", "requires": { "tslib": "1.9.0" } }, "@angular/router": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.6.tgz", - "integrity": "sha512-10Otnr5nmDWrlCpR5DTuDZmLj2hGf8WX1yFkfQ8H4EJWYe3YCTwGvz5D/smrWL6m6I2rOFgYOO3rFj9iYvMumA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-5.2.7.tgz", + "integrity": "sha512-ppl0X7EfEgKYXIEPtdy8cOKj5KXuwCQ5Ila+IuGnSjKIRXt/olhBLJMprVl1VJgoxXj7z2i14U7kKaqSvGtpXw==", "requires": { "tslib": "1.9.0" } }, "@angular/service-worker": { - "version": "5.2.6", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.6.tgz", - "integrity": "sha512-1D56xTg4jrOgtZnIkf0X8KkugK13ReAFA1M7VMgEwLMVzEEgDIlHO8SpLdtKQ8Eoq/26I9jPaKW587E1VcwceA==", + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-5.2.7.tgz", + "integrity": "sha512-pHHaboqA+5SaIiKEGIh/NVZMjmhhGgoDy/rfXArEhSWKOfqXJBUg1P95aD/lqOYFrapxXgQ8zKAllez7AsmEzQ==", "requires": { "tslib": "1.9.0" } @@ -332,9 +332,9 @@ } }, "acorn": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.4.1.tgz", - "integrity": "sha512-XLmq3H/BVvW6/GbxKryGxWORz1ebilSsUDlyC27bXhWGWAZWkGwS6FLHjOlwFXNFoWFQEO/Df4u0YYd0K3BQgQ==", + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.5.1.tgz", + "integrity": "sha512-D/KGiCpM/VOtTMDS+wfjywEth926WUrArrzYov4N4SI7t+3y8747dPpCmmAvrm/Z3ygqMHnyPxvYYO0yTdn/nQ==", "dev": true }, "acorn-dynamic-import": { @@ -385,12 +385,12 @@ } }, "ajv": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.1.1.tgz", - "integrity": "sha1-l41Zf7wrfQ5aXD3esUmmgvKr+g4=", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.2.1.tgz", + "integrity": "sha1-KKarxJOiq+D7TIUHrK7bQ/pVBnE=", "dev": true, "requires": { - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -481,9 +481,9 @@ } }, "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "1.0.3" @@ -657,7 +657,7 @@ "dev": true, "requires": { "browserslist": "2.11.3", - "caniuse-lite": "1.0.30000810", + "caniuse-lite": "1.0.30000813", "normalize-range": "0.1.2", "num2fraction": "1.2.2", "postcss": "6.0.19", @@ -676,15 +676,6 @@ "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=", "dev": true }, - "axios": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", - "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", - "requires": { - "follow-redirects": "1.4.1", - "is-buffer": "1.1.6" - } - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -724,9 +715,9 @@ } }, "babel-generator": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz", - "integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=", + "version": "6.26.1", + "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", + "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "dev": true, "requires": { "babel-messages": "6.23.0", @@ -737,14 +728,6 @@ "lodash": "4.17.4", "source-map": "0.5.7", "trim-right": "1.0.1" - }, - "dependencies": { - "jsesc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", - "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", - "dev": true - } } }, "babel-messages": { @@ -792,7 +775,7 @@ "babylon": "6.18.0", "debug": "2.6.9", "globals": "9.18.0", - "invariant": "2.2.2", + "invariant": "2.2.3", "lodash": "4.17.4" } }, @@ -1119,8 +1102,8 @@ "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", "dev": true, "requires": { - "caniuse-lite": "1.0.30000810", - "electron-to-chromium": "1.3.34" + "caniuse-lite": "1.0.30000813", + "electron-to-chromium": "1.3.36" } }, "buffer": { @@ -1210,14 +1193,14 @@ } }, "cache-loader": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.0.tgz", - "integrity": "sha512-E95knP7jxy2bF/HKuw5gCEXm06tp7/sEjewNF39ezyVBnVmNzB9bnXflEFBvrqZrswsCmgiCbiIc7xIeVXW7Gw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cache-loader/-/cache-loader-1.2.2.tgz", + "integrity": "sha512-rsGh4SIYyB9glU+d0OcHwiXHXBoUgDhHZaQ1KAbiXqfz1CDPxtTboh1gPbJ0q2qdO8a9lfcjgC5CJ2Ms32y5bw==", "dev": true, "requires": { - "async": "2.6.0", "loader-utils": "1.1.0", "mkdirp": "0.5.1", + "neo-async": "2.5.0", "schema-utils": "0.4.5" } }, @@ -1254,9 +1237,9 @@ } }, "caniuse-lite": { - "version": "1.0.30000810", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000810.tgz", - "integrity": "sha512-/0Q00Oie9C72P8zQHtFvzmkrMC3oOFUnMWjCy5F2+BE8lzICm91hQPhh0+XIsAFPKOe2Dh3pKgbRmU3EKxfldA==", + "version": "1.0.30000813", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000813.tgz", + "integrity": "sha512-A8ITSmH5SFdMFdC704ggjg+x2z5PzQmVlG8tavwnfvbC33Q1UYrj0+G+Xm0SNAnd4He36fwUE/KEWytOEchw+A==", "dev": true }, "caseless": { @@ -1273,14 +1256,6 @@ "requires": { "align-text": "0.1.4", "lazy-cache": "1.0.4" - }, - "dependencies": { - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - } } }, "chalk": { @@ -1431,9 +1406,9 @@ } }, "clean-css": { - "version": "4.1.9", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.9.tgz", - "integrity": "sha1-Nc7ornaHpJuYA09w3gDE7dOCYwE=", + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.1.11.tgz", + "integrity": "sha1-Ls3xRaujj1R0DybO/Q/z4D4SXWo=", "dev": true, "requires": { "source-map": "0.5.7" @@ -1457,15 +1432,23 @@ "dev": true }, "clone-deep": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-0.3.0.tgz", - "integrity": "sha1-NIxhrpzb4O3+BT2R/0zFIdeQ7eg=", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-2.0.2.tgz", + "integrity": "sha512-SZegPTKjCgpQH63E+eN6mVEEPdQBOUzjyJm5Pora4lrwWRFS8I0QAxV/KD6vV/i0WuijHZWQC1fMsPEdxfdVCQ==", "dev": true, "requires": { "for-own": "1.0.0", "is-plain-object": "2.0.4", - "kind-of": "3.2.2", - "shallow-clone": "0.1.2" + "kind-of": "6.0.2", + "shallow-clone": "1.0.0" + }, + "dependencies": { + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } } }, "co": { @@ -1481,9 +1464,9 @@ "dev": true }, "codelyzer": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.1.0.tgz", - "integrity": "sha512-a3FCIAS3FNQIACvj7KA4iKvH3c6r7X6t6zXsrtV797QGYPQyCwD1fIEd9yV+ZDamijF3YaZ5fbB7QbUMOJGC/g==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/codelyzer/-/codelyzer-4.2.1.tgz", + "integrity": "sha512-CKwfgpfkqi9dyzy4s6ELaxJ54QgJ6A8iTSsM4bzHbLuTpbKncvNc3DUlCvpnkHBhK47gEf4qFsWoYqLrJPhy6g==", "dev": true, "requires": { "app-root-path": "2.0.1", @@ -1621,9 +1604,9 @@ "dev": true }, "concat-stream": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.0.tgz", - "integrity": "sha1-CqxmL9Ur54lk1VMvaUeE5wEQrPc=", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.1.tgz", + "integrity": "sha512-gslSSJx03QKa59cIKqeJO9HQ/WZMotvYJCuaUULrLpjj8oG40kV2Z+gz82pVxlTkOADi4PJxQPPfhl1ELYrrXw==", "dev": true, "requires": { "inherits": "2.0.3", @@ -1734,33 +1717,19 @@ "dev": true }, "copy-webpack-plugin": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.1.tgz", - "integrity": "sha512-ojaz8MpS3zoLJT/JbYMusYM+dCEArhW24hGAUPYPydTCS+87NFh2TWr85sywG3So4Q4E68QoerqQ+Ns1g0fhDg==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-4.4.3.tgz", + "integrity": "sha512-v4THQ24Tks2NkyOvZuFDgZVfDD9YaA9rwYLZTrWg2GHIA8lrH5DboEyeoorh5Skki+PUbgSmnsCwhMWqYrQZrA==", "dev": true, "requires": { "cacache": "10.0.4", "find-cache-dir": "1.0.0", "globby": "7.1.1", "is-glob": "4.0.0", - "loader-utils": "0.2.17", + "loader-utils": "1.1.0", "minimatch": "3.0.4", "p-limit": "1.2.0", "serialize-javascript": "1.4.0" - }, - "dependencies": { - "loader-utils": { - "version": "0.2.17", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-0.2.17.tgz", - "integrity": "sha1-+G5jdNQyBabmxg6RlvF8Apm/s0g=", - "dev": true, - "requires": { - "big.js": "3.2.0", - "emojis-list": "2.1.0", - "json5": "0.5.1", - "object-assign": "4.1.1" - } - } } }, "core-js": { @@ -1790,7 +1759,7 @@ "dev": true, "requires": { "is-directory": "0.3.1", - "js-yaml": "3.7.0", + "js-yaml": "3.11.0", "minimist": "1.2.0", "object-assign": "4.1.1", "os-homedir": "1.0.2", @@ -2272,9 +2241,9 @@ } }, "duplexify": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.3.tgz", - "integrity": "sha512-g8ID9OroF9hKt2POf8YLayy+9594PzmM3scI00/uBXocX3TWNgoB67hjzkFe9ITAbQOne/lLdBxHXvYUM4ZgGA==", + "version": "3.5.4", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.5.4.tgz", + "integrity": "sha512-JzYSLYMhoVVBe8+mbHQ4KgpvHpm0DZpJuL8PY93Vyv1fW7jYJ90LoXa1di/CVbJM+TgMs91rbDapE/RNIfnJsA==", "dev": true, "requires": { "end-of-stream": "1.4.1", @@ -2305,9 +2274,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.34", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.34.tgz", - "integrity": "sha1-2TSY9AORuwwWpgPYJBuZUUBBV+0=", + "version": "1.3.36", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.36.tgz", + "integrity": "sha1-Dqv3Gp6+qQE/scw1o5DgaGJPJ+g=", "dev": true }, "elliptic": { @@ -2609,24 +2578,23 @@ "requires": { "es6-map": "0.1.5", "es6-weak-map": "2.0.2", - "esrecurse": "4.2.0", + "esrecurse": "4.2.1", "estraverse": "4.2.0" } }, "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==", "dev": true }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "dev": true, "requires": { - "estraverse": "4.2.0", - "object-assign": "4.1.1" + "estraverse": "4.2.0" } }, "estraverse": { @@ -2895,7 +2863,7 @@ "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -2918,9 +2886,9 @@ "dev": true }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", + "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=", "dev": true }, "fast-json-stable-stringify": { @@ -2945,9 +2913,9 @@ } }, "file-loader": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.9.tgz", - "integrity": "sha512-6ql03hOSoJHBkTB+3De/f7NJse+JXkUwvAf3y4Q5rIcTD0kqJiE3btvLnDcZT+P4t1QYLb9dJ9EI4auzfo3wFA==", + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-1.1.11.tgz", + "integrity": "sha512-TGR4HU7HUsGg6GCOPJnFk06RhWgEWFLAGWiT6rcD+GRC2keU3s9RGJ+b3Z6/U73jwwNb2gKLJ7YCrp+jvU4ALg==", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -3038,24 +3006,6 @@ "readable-stream": "2.3.3" } }, - "follow-redirects": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.4.1.tgz", - "integrity": "sha512-uxYePVPogtya1ktGnAAXOacnbIuRMB4dkvqeNz2qTtTQsuzSfbDolV+wMMKxAmCx0bLgAKLbBOkjItMbbkR1vg==", - "requires": { - "debug": "3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - } - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -4581,19 +4531,19 @@ "dev": true }, "html-minifier": { - "version": "3.5.9", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.9.tgz", - "integrity": "sha512-EZqO91XJwkj8BeLx9C12sKB/AHoTANaZax39vEOP9f/X/9jgJ3r1O2+neabuHqpz5kJO71TapP9JrtCY39su1A==", + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-3.5.10.tgz", + "integrity": "sha512-5c8iAyeIGAiuFhVjJ0qy1lgvyQxxuZgjeOuMnoK/wjEyy8DF3xKUnE9pO+6H7VMir976K6SGlZV8ZEmIOea/Zg==", "dev": true, "requires": { "camel-case": "3.0.0", - "clean-css": "4.1.9", + "clean-css": "4.1.11", "commander": "2.14.1", "he": "1.1.1", "ncname": "1.0.0", "param-case": "2.1.1", "relateurl": "0.2.7", - "uglify-js": "3.3.12" + "uglify-js": "3.3.13" }, "dependencies": { "commander": { @@ -4611,7 +4561,7 @@ "dev": true, "requires": { "bluebird": "3.5.1", - "html-minifier": "3.5.9", + "html-minifier": "3.5.10", "loader-utils": "0.2.17", "lodash": "4.17.4", "pretty-error": "2.1.1", @@ -4880,9 +4830,9 @@ "dev": true }, "invariant": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz", - "integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.3.tgz", + "integrity": "sha512-7Z5PPegwDTyjbaeCnV0efcyS6vdKAU51kpEmS7QFib3P4822l8ICYyMn7qvJnc+WzLoDsuI9gPMKbJ8pCu8XtA==", "dev": true, "requires": { "loose-envify": "1.3.1" @@ -4940,7 +4890,8 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true }, "is-builtin-module": { "version": "1.0.0", @@ -5234,20 +5185,20 @@ "dev": true }, "istanbul-api": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.2.1.tgz", - "integrity": "sha512-oFCwXvd65amgaPCzqrR+a2XjanS1MvpXN6l/MlMUTv6uiA1NOgGX+I0uyq8Lg3GDxsxPsaP1049krz3hIJ5+KA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.2.2.tgz", + "integrity": "sha512-kH5YRdqdbs5hiH4/Rr1Q0cSAGgjh3jTtg8vu9NLebBAoK3adVO4jk81J+TYOkTr2+Q4NLeb1ACvmEt65iG/Vbw==", "dev": true, "requires": { "async": "2.6.0", "fileset": "2.0.3", - "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-coverage": "1.1.2", "istanbul-lib-hook": "1.1.0", - "istanbul-lib-instrument": "1.9.1", - "istanbul-lib-report": "1.1.2", - "istanbul-lib-source-maps": "1.2.2", - "istanbul-reports": "1.1.3", - "js-yaml": "3.7.0", + "istanbul-lib-instrument": "1.9.2", + "istanbul-lib-report": "1.1.3", + "istanbul-lib-source-maps": "1.2.3", + "istanbul-reports": "1.1.4", + "js-yaml": "3.11.0", "mkdirp": "0.5.1", "once": "1.4.0" } @@ -5259,7 +5210,7 @@ "dev": true, "requires": { "convert-source-map": "1.5.1", - "istanbul-lib-instrument": "1.9.1", + "istanbul-lib-instrument": "1.9.2", "loader-utils": "1.1.0", "schema-utils": "0.3.0" }, @@ -5271,7 +5222,7 @@ "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -5288,9 +5239,9 @@ } }, "istanbul-lib-coverage": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz", - "integrity": "sha512-0+1vDkmzxqJIn5rcoEqapSB4DmPxE31EtI2dF2aCkV5esN9EWHxZ0dwgDClivMXJqE7zaYQxq30hj5L0nlTN5Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.2.tgz", + "integrity": "sha512-tZYA0v5A7qBSsOzcebJJ/z3lk3oSzH62puG78DbBA1+zupipX2CakDyiPV3pOb8He+jBwVimuwB0dTnh38hX0w==", "dev": true }, "istanbul-lib-hook": { @@ -5303,27 +5254,27 @@ } }, "istanbul-lib-instrument": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz", - "integrity": "sha512-RQmXeQ7sphar7k7O1wTNzVczF9igKpaeGQAG9qR2L+BS4DCJNTI9nytRmIVYevwO0bbq+2CXvJmYDuz0gMrywA==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.2.tgz", + "integrity": "sha512-nz8t4HQ2206a/3AXi+NHFWEa844DMpPsgbcUteJbt1j8LX1xg56H9rOMnhvcvVvPbW60qAIyrSk44H8ZDqaSSA==", "dev": true, "requires": { - "babel-generator": "6.26.0", + "babel-generator": "6.26.1", "babel-template": "6.26.0", "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", - "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-coverage": "1.1.2", "semver": "5.5.0" } }, "istanbul-lib-report": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz", - "integrity": "sha512-UTv4VGx+HZivJQwAo1wnRwe1KTvFpfi/NYwN7DcsrdzMXwpRT/Yb6r4SBPoHWj4VuQPakR32g4PUUeyKkdDkBA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz", + "integrity": "sha512-D4jVbMDtT2dPmloPJS/rmeP626N5Pr3Rp+SovrPn1+zPChGHcggd/0sL29jnbm4oK9W0wHjCRsdch9oLd7cm6g==", "dev": true, "requires": { - "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-coverage": "1.1.2", "mkdirp": "0.5.1", "path-parse": "1.0.5", "supports-color": "3.2.3" @@ -5347,13 +5298,13 @@ } }, "istanbul-lib-source-maps": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz", - "integrity": "sha512-8BfdqSfEdtip7/wo1RnrvLpHVEd8zMZEDmOFEnpC6dg0vXflHt9nvoAyQUzig2uMSXfF2OBEYBV3CVjIL9JvaQ==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz", + "integrity": "sha512-fDa0hwU/5sDXwAklXgAoCJCOsFsBplVQ6WBldz5UwaqOzmDhUK4nfuR7/G//G2lERlblUNJB8P6e8cXq3a7MlA==", "dev": true, "requires": { "debug": "3.1.0", - "istanbul-lib-coverage": "1.1.1", + "istanbul-lib-coverage": "1.1.2", "mkdirp": "0.5.1", "rimraf": "2.6.2", "source-map": "0.5.7" @@ -5371,9 +5322,9 @@ } }, "istanbul-reports": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.3.tgz", - "integrity": "sha512-ZEelkHh8hrZNI5xDaKwPMFwDsUf5wIEI2bXAFGp1e6deR2mnEKBPhLJEgr4ZBt8Gi6Mj38E/C8kcy9XLggVO2Q==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.1.4.tgz", + "integrity": "sha512-DfSTVOTkuO+kRmbO8Gk650Wqm1WRGr6lrdi2EwDK1vxpS71vdlLd613EpzOKdIFioB5f/scJTjeWBnvd1FWejg==", "dev": true, "requires": { "handlebars": "4.0.11" @@ -5438,13 +5389,13 @@ "dev": true }, "js-yaml": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.7.0.tgz", - "integrity": "sha1-XJZ93YN6m/3KXy3oQlOr6KHAO4A=", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", "dev": true, "requires": { - "argparse": "1.0.9", - "esprima": "2.7.3" + "argparse": "1.0.10", + "esprima": "4.0.0" } }, "jsbn": { @@ -5455,9 +5406,9 @@ "optional": true }, "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", + "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=", "dev": true }, "json-loader": { @@ -5610,12 +5561,12 @@ } }, "karma-coverage-istanbul-reporter": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.1.tgz", - "integrity": "sha512-5og0toMjgLvsL9+TzGH4Rk1D0nr7pMIRJBg29xP4mHMKy/1KUJ12UzoqI6mBNCRFa4nDvZS2MRrN7p+RkZNWxQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/karma-coverage-istanbul-reporter/-/karma-coverage-istanbul-reporter-1.4.2.tgz", + "integrity": "sha512-sQHexslLF+QHzaKfK8+onTYMyvSwv+p5cDayVxhpEELGa3z0QuB+l0IMsicIkkBNMOJKQaqueiRoW7iuo7lsog==", "dev": true, "requires": { - "istanbul-api": "1.2.1", + "istanbul-api": "1.2.2", "minimatch": "3.0.4" } }, @@ -5659,9 +5610,9 @@ } }, "lazy-cache": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-0.2.7.tgz", - "integrity": "sha1-f+3fLctu23fRHvHRF6tf/fCrG2U=", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", "dev": true }, "lcid": { @@ -5690,28 +5641,20 @@ } }, "less-loader": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.5.tgz", - "integrity": "sha1-rhVadAbKxqzSk9eFWH/P8PR4xN0=", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-4.0.6.tgz", + "integrity": "sha512-WPFY3NMJGJna8kIxtgSu6AVG7K6uRPdfE2J7vpQqFWMN/RkOosV09rOVUt3wghNClWH2Pg7YumD1dHiv1Thfug==", "dev": true, "requires": { "clone": "2.1.1", "loader-utils": "1.1.0", - "pify": "2.3.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } + "pify": "3.0.0" } }, "license-webpack-plugin": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.1.1.tgz", - "integrity": "sha512-TjKOyiC0exqd4Idy/4M8/DETR22dXBZks387DuS5LbslxHiMRXGx/Q2F/j9IUtvEoH5uFvt72vRgk/G6f8j3Dg==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-1.2.3.tgz", + "integrity": "sha512-+sie46vNe5L48N94LEzEvreJqAdi+N3x3mXUx+iujuAmftWdJUh68RSDPgWK3DRJuu50dwiyH7MdVAx95zfKQA==", "dev": true, "requires": { "ejs": "2.5.7" @@ -5784,24 +5727,6 @@ "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.endswith": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.endswith/-/lodash.endswith-4.2.1.tgz", - "integrity": "sha1-/tWawXOO0+I27dcGTsRWRIs3vAk=", - "dev": true - }, - "lodash.isfunction": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", - "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, "lodash.mergewith": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz", @@ -5809,12 +5734,6 @@ "dev": true, "optional": true }, - "lodash.startswith": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/lodash.startswith/-/lodash.startswith-4.2.1.tgz", - "integrity": "sha1-xZjErc4YiiflMUVzHNxsDnF3YAw=", - "dev": true - }, "lodash.tail": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.tail/-/lodash.tail-4.1.1.tgz", @@ -6143,8 +6062,8 @@ "integrity": "sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw==", "dev": true, "requires": { - "concat-stream": "1.6.0", - "duplexify": "3.5.3", + "concat-stream": "1.6.1", + "duplexify": "3.5.4", "end-of-stream": "1.4.1", "flush-write-stream": "1.0.2", "from2": "2.3.0", @@ -6262,7 +6181,7 @@ "object.pick": "1.3.0", "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "arr-diff": { @@ -6299,6 +6218,12 @@ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, + "neo-async": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.0.tgz", + "integrity": "sha512-nJmSswG4As/MkRq7QZFuH/sf/yuv8ODdMZrY4Bedjp77a5MK4A6s7YbBB64c9u79EBUOfXUXBvArmvzTD0X+6g==", + "dev": true + }, "no-case": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", @@ -6308,6 +6233,11 @@ "lower-case": "1.1.4" } }, + "node-fetch": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.1.1.tgz", + "integrity": "sha1-NpynC4L1DIZJYQSmx3bSdPTkotQ=" + }, "node-forge": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.7.1.tgz", @@ -6529,7 +6459,7 @@ "hosted-git-info": "2.5.0", "is-builtin-module": "1.0.0", "semver": "5.5.0", - "validate-npm-package-license": "3.0.1" + "validate-npm-package-license": "3.0.3" } }, "normalize-path": { @@ -7122,20 +7052,29 @@ "integrity": "sha512-f13HRz0HtVwVaEuW6J6cOUCBLFtymhgyLPV7t4QEk2UD3twRI9IluDcQNdzQdBpiixkXj2OmzejhhTbSbDxNTg==", "dev": true, "requires": { - "chalk": "2.3.1", + "chalk": "2.3.2", "source-map": "0.6.1", - "supports-color": "5.2.0" + "supports-color": "5.3.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, "chalk": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.1.tgz", - "integrity": "sha512-QUU4ofkDoMIVO7hcx1iPTISs88wsO8jA92RQIm4JAwZvFGGAV2hSAA1NX7oVj2Ej2Q6NDTcRDjPTFrMCRZoJ6g==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.3.2.tgz", + "integrity": "sha512-ZM4j2/ld/YZDc3Ma8PgN7gyAk+kHMMMyzLNryCPGhWrsfAuDVeuid5bpRFTDgMH9JBK2lA4dyyAkkZYF/WcqDQ==", "dev": true, "requires": { - "ansi-styles": "3.2.0", + "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "5.2.0" + "supports-color": "5.3.0" } }, "has-flag": { @@ -7151,9 +7090,9 @@ "dev": true }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -7206,9 +7145,9 @@ } }, "postcss-loader": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.0.tgz", - "integrity": "sha512-S/dKzpDwGFmP9g8eyCu9sUIV+/+3UooeTpYlsKf23qKDdrhHuA4pTSfytVu0rEJ0iDqUavXrgtOPq5KhNyNMOw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-2.1.1.tgz", + "integrity": "sha512-f0J/DWE/hyO9/LH0WHpXkny/ZZ238sSaG3p1SRBtVZnFWUtD7GXIEgHoBg8cnAeRbmEvUxHQptY46zWfwNYj/w==", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -7218,9 +7157,9 @@ } }, "postcss-url": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.0.tgz", - "integrity": "sha512-VBP6uf6iL3AZra23nkPkOEkS/5azj1xf/toRrjfkolfFEgg9Gyzg9UhJZeIsz12EGKZTNVeGbPa2XtaZm/iZvg==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/postcss-url/-/postcss-url-7.3.1.tgz", + "integrity": "sha512-Ya5KIjGptgz0OtrVYfi2UbLxVAZ6Emc4Of+Grx4Sf1deWlRpFwLr8FrtkUxfqh+XiZIVkXbjQrddE10ESpNmdA==", "dev": true, "requires": { "mime": "1.6.0", @@ -7451,7 +7390,7 @@ "integrity": "sha512-2kmNR9ry+Pf45opRVirpNuIFotsxUGLaYqxIwuR77AYrYRMuFCz9eryHBS52L360O+NcR383CL4QYlMKPq4zYA==", "dev": true, "requires": { - "duplexify": "3.5.3", + "duplexify": "3.5.4", "inherits": "2.0.3", "pump": "2.0.1" } @@ -7750,6 +7689,14 @@ "dev": true, "requires": { "jsesc": "0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } } }, "relateurl": { @@ -7969,15 +7916,15 @@ } }, "sass-loader": { - "version": "6.0.6", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.6.tgz", - "integrity": "sha512-c3/Zc+iW+qqDip6kXPYLEgsAu2lf4xz0EZDplB7EmSUMda12U1sGJPetH55B/j9eu0bTtKzKlNPWWyYC7wFNyQ==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-6.0.7.tgz", + "integrity": "sha512-JoiyD00Yo1o61OJsoP2s2kb19L1/Y2p3QFcCdWdF6oomBGKVYuZyqHWemRBfQ2uGYsk+CH3eCguXNfpjzlcpaA==", "dev": true, "requires": { - "async": "2.6.0", - "clone-deep": "0.3.0", + "clone-deep": "2.0.2", "loader-utils": "1.1.0", "lodash.tail": "4.1.1", + "neo-async": "2.5.0", "pify": "3.0.0" } }, @@ -8002,7 +7949,7 @@ "integrity": "sha512-yYrjb9TX2k/J1Y5UNy3KYdZq10xhYcF8nMpAW6o3hy6Q8WSIEf9lJHG/ePnOBfziPM3fvQwfOwa13U/Fh8qTfA==", "dev": true, "requires": { - "ajv": "6.1.1", + "ajv": "6.2.1", "ajv-keywords": "3.1.0" } }, @@ -8216,25 +8163,21 @@ } }, "shallow-clone": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-0.1.2.tgz", - "integrity": "sha1-WQnodLp3EG1zrEFM/sH/yofZcGA=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-1.0.0.tgz", + "integrity": "sha512-oeXreoKR/SyNJtRJMAKPDSvd28OqEwG4eR/xc856cRGBII7gX9lvAqDxusPm0846z/w/hWYjI1NpKwJ00NHzRA==", "dev": true, "requires": { "is-extendable": "0.1.1", - "kind-of": "2.0.1", - "lazy-cache": "0.2.7", + "kind-of": "5.1.0", "mixin-object": "2.0.1" }, "dependencies": { "kind-of": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-2.0.1.tgz", - "integrity": "sha1-AY7HpM5+OobLkUG+UZ0kyPqpgbU=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true } } }, @@ -8625,24 +8568,35 @@ "dev": true }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", + "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "dev": true, "requires": { - "spdx-license-ids": "1.2.2" + "spdx-expression-parse": "3.0.0", + "spdx-license-ids": "3.0.0" } }, - "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", + "spdx-exceptions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", "dev": true }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "2.1.0", + "spdx-license-ids": "3.0.0" + } + }, "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", + "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", "dev": true }, "spdy": { @@ -8936,7 +8890,7 @@ "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -8998,9 +8952,9 @@ } }, "stylus-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.1.tgz", - "integrity": "sha1-d/SzT9Aw0lsmF7z1UT21sHMMQIk=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/stylus-loader/-/stylus-loader-3.0.2.tgz", + "integrity": "sha512-+VomPdZ6a0razP+zinir61yZgpw2NfljeSsdUF5kJuEzlo3khXhY19Fn6l8QQz1GRJGtMCo8nG5C04ePyV7SUA==", "dev": true, "requires": { "loader-utils": "1.1.0", @@ -9123,91 +9077,15 @@ } }, "to-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.1.tgz", - "integrity": "sha1-FTWL7kosg712N3uh3ASdDxiDeq4=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, "requires": { - "define-property": "0.2.5", - "extend-shallow": "2.0.1", - "regex-not": "1.0.2" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "0.1.6" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "0.1.1" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "3.2.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "1.1.6" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "0.1.6", - "is-data-descriptor": "0.1.4", - "kind-of": "5.1.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "regex-not": "1.0.2", + "safe-regex": "1.1.0" } }, "to-regex-range": { @@ -9445,9 +9323,9 @@ "dev": true }, "uglify-js": { - "version": "3.3.12", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.12.tgz", - "integrity": "sha512-4jxrTXlV0HaXTsNILfXW0eey7Qo8qHYM6ih5ZNh45erDWU2GHmKDmekwBTskDb12h+kdd2DBvdzqVb47YzNmTA==", + "version": "3.3.13", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.3.13.tgz", + "integrity": "sha512-7rdn/bDOG1ElSTPdh7AI5TCjLv63ZD4k8BBadN3ssIkhlaQL2c0yRxmXCyOYhZK0wZTgGgUSnYQ4CGu+Jos5cA==", "dev": true, "requires": { "commander": "2.14.1", @@ -9476,9 +9354,9 @@ "optional": true }, "uglifyjs-webpack-plugin": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.0.tgz", - "integrity": "sha512-Bc2NeyTTSJAy2JuKaBpdvWyuySPSPHNcj70KFqu7FhfrfsjPo0Kta9jgAvPrQxnz86mOH1tk4n/I8wvZrXvetA==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.2.2.tgz", + "integrity": "sha512-CG/NvzXfemUAm5Y4Guh5eEaJYHtkG7kKNpXEJHp9QpxsFVB5/qKvYWoMaq4sa99ccZ0hM3MK8vQV9XPZB4357A==", "dev": true, "requires": { "cacache": "10.0.4", @@ -9488,7 +9366,7 @@ "source-map": "0.6.1", "uglify-es": "3.3.9", "webpack-sources": "1.1.0", - "worker-farm": "1.5.2" + "worker-farm": "1.5.4" }, "dependencies": { "commander": { @@ -9626,16 +9504,10 @@ } }, "upath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.2.tgz", - "integrity": "sha512-fCmij7T5LnwUme3dbnVSejvOHHlARjB3ikJFwgZfz386pHmf/gueuTLRFU94FZEaeCLlbQrweiUU700gG41tUw==", - "dev": true, - "requires": { - "lodash.endswith": "4.2.1", - "lodash.isfunction": "3.0.9", - "lodash.isstring": "4.0.1", - "lodash.startswith": "4.2.1" - } + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.0.4.tgz", + "integrity": "sha512-d4SJySNBXDaQp+DPrziv3xGS6w3d2Xt69FijJr86zMPBy23JEloMCEOUBBzuN7xCtjLCnmB9tI/z7SBCahHBOw==", + "dev": true }, "upper-case": { "version": "1.1.3", @@ -9685,7 +9557,7 @@ "dev": true, "requires": { "co": "4.6.0", - "fast-deep-equal": "1.0.0", + "fast-deep-equal": "1.1.0", "fast-json-stable-stringify": "2.0.0", "json-schema-traverse": "0.3.1" } @@ -9875,13 +9747,13 @@ } }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.3.tgz", + "integrity": "sha512-63ZOUnL4SIXj4L0NixR3L1lcjO38crAbgrTpl28t8jjrfuiOBL5Iygm+60qPs/KsZGzPNg6Smnc/oY16QTjF0g==", "dev": true, "requires": { - "spdx-correct": "1.0.2", - "spdx-expression-parse": "1.0.4" + "spdx-correct": "3.0.0", + "spdx-expression-parse": "3.0.0" } }, "vary": { @@ -9930,14 +9802,317 @@ "dev": true }, "watchpack": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.4.0.tgz", - "integrity": "sha1-ShRyvLuVK9Cpu0A2gB+VTfs5+qw=", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.5.0.tgz", + "integrity": "sha512-RSlipNQB1u48cq0wH/BNfCu1tD/cJ8ydFIkNYhp9o+3d+8unClkIovpW5qpFPgmL9OE48wfAnlZydXByWP82AA==", "dev": true, "requires": { - "async": "2.6.0", - "chokidar": "1.7.0", - "graceful-fs": "4.1.11" + "chokidar": "2.0.2", + "graceful-fs": "4.1.11", + "neo-async": "2.5.0" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "3.1.9", + "normalize-path": "2.1.1" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.1.tgz", + "integrity": "sha512-SO5lYHA3vO6gz66erVvedSCkp7AKWdv6VcQ2N4ysXfPxdAlxAMMAdwegGGcv1Bqwm7naF1hNdk5d6AAIEHV2nQ==", + "dev": true, + "requires": { + "arr-flatten": "1.1.0", + "array-unique": "0.3.2", + "define-property": "1.0.0", + "extend-shallow": "2.0.1", + "fill-range": "4.0.0", + "isobject": "3.0.1", + "kind-of": "6.0.2", + "repeat-element": "1.1.2", + "snapdragon": "0.8.1", + "snapdragon-node": "2.1.1", + "split-string": "3.1.0", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "chokidar": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.2.tgz", + "integrity": "sha512-l32Hw3wqB0L2kGVmSbK/a+xXLDrUEsc84pSgMkmwygHvD7ubRsP/vxxHa5BtB6oix1XLLVCHyYMsckRXxThmZw==", + "dev": true, + "requires": { + "anymatch": "2.0.0", + "async-each": "1.0.1", + "braces": "2.3.1", + "fsevents": "1.1.3", + "glob-parent": "3.1.0", + "inherits": "2.0.3", + "is-binary-path": "1.0.1", + "is-glob": "4.0.0", + "normalize-path": "2.1.1", + "path-is-absolute": "1.0.1", + "readdirp": "2.1.0", + "upath": "1.0.4" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "2.6.9", + "define-property": "0.2.5", + "extend-shallow": "2.0.1", + "posix-character-classes": "0.1.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "0.1.6" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "0.1.6", + "is-data-descriptor": "0.1.4", + "kind-of": "5.1.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "0.3.2", + "define-property": "1.0.0", + "expand-brackets": "2.1.4", + "extend-shallow": "2.0.1", + "fragment-cache": "0.2.1", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "1.0.2" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "2.0.1", + "is-number": "3.0.0", + "repeat-string": "1.6.1", + "to-regex-range": "2.1.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "0.1.1" + } + } + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "3.1.0", + "path-dirname": "1.0.2" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "2.1.1" + } + } + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "3.2.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "1.1.6" + } + } + } + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", + "dev": true, + "requires": { + "arr-diff": "4.0.0", + "array-unique": "0.3.2", + "braces": "2.3.1", + "define-property": "2.0.2", + "extend-shallow": "3.0.2", + "extglob": "2.0.4", + "fragment-cache": "0.2.1", + "kind-of": "6.0.2", + "nanomatch": "1.2.9", + "object.pick": "1.3.0", + "regex-not": "1.0.2", + "snapdragon": "0.8.1", + "to-regex": "3.0.2" + } + } } }, "wbuf": { @@ -10008,9 +10183,9 @@ "integrity": "sha512-3kOFejWqj5ISpJk4Qj/V7w98h9Vl52wak3CLiw/cDOfbVTq7FeoZ0SdoHHY9PYlHr50ZS42OfvzE2vB4nncKQg==", "dev": true, "requires": { - "acorn": "5.4.1", + "acorn": "5.5.1", "acorn-dynamic-import": "2.0.2", - "ajv": "6.1.1", + "ajv": "6.2.1", "ajv-keywords": "3.1.0", "async": "2.6.0", "enhanced-resolve": "3.4.1", @@ -10027,7 +10202,7 @@ "supports-color": "4.5.0", "tapable": "0.2.8", "uglifyjs-webpack-plugin": "0.4.6", - "watchpack": "1.4.0", + "watchpack": "1.5.0", "webpack-sources": "1.1.0", "yargs": "8.0.2" }, @@ -10308,9 +10483,9 @@ } }, "webpack-dev-server": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.1.tgz", - "integrity": "sha512-ombhu5KsO/85sVshIDTyQ5HF3xjZR3N0sf5Ao6h3vFwpNyzInEzA1GV3QPVjTMLTNckp8PjfG1PFGznzBwS5lg==", + "version": "2.11.2", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz", + "integrity": "sha512-zrPoX97bx47vZiAXfDrkw8pe9QjJ+lunQl3dypojyWwWr1M5I2h0VSrMPfTjopHQPRNn+NqfjcMmhoLcUJe2gA==", "dev": true, "requires": { "ansi-html": "0.0.7", @@ -10337,7 +10512,7 @@ "sockjs-client": "1.1.4", "spdy": "3.4.7", "strip-ansi": "3.0.1", - "supports-color": "5.2.0", + "supports-color": "5.3.0", "webpack-dev-middleware": "1.12.2", "yargs": "6.6.0" }, @@ -10348,7 +10523,7 @@ "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "dev": true, "requires": { - "micromatch": "3.1.8", + "micromatch": "3.1.9", "normalize-path": "2.1.1" } }, @@ -10381,7 +10556,7 @@ "snapdragon": "0.8.1", "snapdragon-node": "2.1.1", "split-string": "3.1.0", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -10427,7 +10602,7 @@ "normalize-path": "2.1.1", "path-is-absolute": "1.0.1", "readdirp": "2.1.0", - "upath": "1.0.2" + "upath": "1.0.4" } }, "debug": { @@ -10451,7 +10626,7 @@ "posix-character-classes": "0.1.1", "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "debug": { @@ -10513,7 +10688,7 @@ "fragment-cache": "0.2.1", "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" }, "dependencies": { "define-property": { @@ -10653,9 +10828,9 @@ "dev": true }, "micromatch": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.8.tgz", - "integrity": "sha512-/XeuOQqYg+B5kwjDWekXseSwGS7CzE0w9Gjo4Cjkf/uFitNh47NrZHAY2vp/oS2YQVfebPIdbEIvgdy+kIcAog==", + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.9.tgz", + "integrity": "sha512-SlIz6sv5UPaAVVFRKodKjCg48EbNoIhgetzfK/Cy0v5U52Z6zB136M8tp0UC9jM53LYbmIRihJszvvqpKkfm9g==", "dev": true, "requires": { "arr-diff": "4.0.0", @@ -10670,13 +10845,13 @@ "object.pick": "1.3.0", "regex-not": "1.0.2", "snapdragon": "0.8.1", - "to-regex": "3.0.1" + "to-regex": "3.0.2" } }, "supports-color": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.2.0.tgz", - "integrity": "sha512-F39vS48la4YvTZUPVeTqsjsFNrvcMwrV3RLZINsmHo+7djCvuUzSIeXOnZ5hmjef4bajL1dNccN+tg5XAliO5Q==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.3.0.tgz", + "integrity": "sha512-0aP01LLIskjKs3lq52EC0aGBAJhLq7B2Rd8HC/DR/PtNNpcLilNmHC12O+hu0usQpo7wtHNRqtrhBwtDb0+dNg==", "dev": true, "requires": { "has-flag": "3.0.0" @@ -10823,9 +10998,9 @@ "dev": true }, "worker-farm": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.2.tgz", - "integrity": "sha512-XxiQ9kZN5n6mmnW+mFJ+wXjNNI/Nx4DIdaAKLX1Bn6LYBWlN/zaBhu34DQYPZ1AJobQuu67S2OfDdNSVULvXkQ==", + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.5.4.tgz", + "integrity": "sha512-ITyClEvcfv0ozqJl1vmWFWhvI+OIrkbInYqkEPE50wFPXj8J9Gd3FYf8+CkZJXJJsQBYe+2DvmoK9Zhx5w8W+w==", "dev": true, "requires": { "errno": "0.1.7", diff --git a/client/package.json b/client/package.json index 3f3f763..2647272 100644 --- a/client/package.json +++ b/client/package.json @@ -12,39 +12,39 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.2.6", - "@angular/common": "^5.2.6", - "@angular/compiler": "^5.2.6", - "@angular/core": "^5.2.6", - "@angular/forms": "^5.2.6", - "@angular/http": "^5.2.6", - "@angular/platform-browser": "^5.2.6", - "@angular/platform-browser-dynamic": "^5.2.6", - "@angular/router": "^5.2.6", - "@angular/service-worker": "^5.2.6", - "axios": "^0.18.0", + "@angular/animations": "^5.2.7", + "@angular/common": "^5.2.7", + "@angular/compiler": "^5.2.7", + "@angular/core": "^5.2.7", + "@angular/forms": "^5.2.7", + "@angular/http": "^5.2.7", + "@angular/platform-browser": "^5.2.7", + "@angular/platform-browser-dynamic": "^5.2.7", + "@angular/router": "^5.2.7", + "@angular/service-worker": "^5.2.7", "bootstrap": "^4.0.0", "core-js": "^2.4.1", "express": "^4.16.2", "jquery": "^3.3.1", + "node-fetch": "^2.1.1", "rxjs": "^5.5.2", "sweetalert": "^2.1.0", "zone.js": "^0.8.14" }, "devDependencies": { - "@angular/cli": "^1.7.1", - "@angular/compiler-cli": "^5.2.6", - "@angular/language-service": "^5.2.6", + "@angular/cli": "^1.7.2", + "@angular/compiler-cli": "^5.2.7", + "@angular/language-service": "^5.2.7", "@types/jasmine": "~2.5.53", "@types/jasminewd2": "~2.0.2", "@types/node": "^6.0.101", - "codelyzer": "^4.0.1", + "codelyzer": "^4.2.1", "jasmine-core": "~2.6.2", "jasmine-spec-reporter": "~4.1.0", "karma": "~1.7.0", "karma-chrome-launcher": "~2.1.1", "karma-cli": "~1.0.1", - "karma-coverage-istanbul-reporter": "^1.2.1", + "karma-coverage-istanbul-reporter": "^1.4.2", "karma-jasmine": "~1.1.0", "karma-jasmine-html-reporter": "^0.2.2", "protractor": "~5.1.2", diff --git a/client/proxy.js b/client/proxy.js index 681fb82..cf5910c 100644 --- a/client/proxy.js +++ b/client/proxy.js @@ -1,20 +1,96 @@ const express = require('express'); -const axios = require('axios'); - +const fetch = require('node-fetch'); +const url = require('url'); const appUri = "https://starrysea.org/"; -const renderUri = "http://localhost:8080/render"; +const renderUri = "https://rendertron.tes-project.xyz/render"; const app = express(); -app.get('*',(req,res)=>{ - axios.get(`${renderUri}/${appUri + req.originalUrl}`) - .then((data)=>{ - res.set('Cache-Control','public, max-age=300, s-maxage=600'); - res.send(data.data.toString()); - }) +// Generates the URL +function generateUrl(request) { + return url.format({ + protocol: request.protocol, + host: appUrl, + pathname: request.originalUrl + }); +} -}); +function detectBot(userAgent) { + // List of bots to target, add more if you'd like + + const bots = [ + // crawler bots + 'googlebot', + 'bingbot', + 'yandexbot', + 'duckduckbot', + 'slurp', + // link bots + 'twitterbot', + 'facebookexternalhit', + 'linkedinbot', + 'embedly', + 'baiduspider', + 'pinterest', + 'slackbot', + 'vkShare', + 'facebot', + 'outbrain', + 'W3C_Validator' + ] + + const agent = userAgent.toLowerCase(); + + for (const bot of bots) { + if (agent.indexOf(bot) > -1) { + console.log('bot detected', bot, agent) + return true + } + } + + console.log('no bots found') + return false + +} + + +app.get('*', (req, res) => { + + + const isBot = detectBot(req.headers['user-agent']); -app.listen(4300); + if (isBot) { + + const botUrl = generateUrl(req); + // If Bot, fetch url via rendertron + + fetch(`${renderUri}/${botUrl}`) + .then(res => res.text() ) + .then(body => { + + // Set the Vary header to cache the user agent, based on code from: + // https://github.com/justinribeiro/pwa-firebase-functions-botrender + res.set('Cache-Control', 'public, max-age=300, s-maxage=600'); + res.set('Vary', 'User-Agent'); + + res.send(body.toString()) + + }); + + } else { + + + // Not a bot, fetch the regular Angular app + // Possibly faster to serve directly from from the functions directory? + fetch(`${appUri}`) + .then(res => res.text()) + .then(body => { + res.send(body.toString()); + }) + } + +}); + +app.listen(4400); diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 262e438..5240618 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -1,44 +1,45 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { LOCALE_ID,NgModule } from '@angular/core'; -import { ServiceWorkerModule } from '@angular/service-worker'; +import {BrowserModule} from '@angular/platform-browser'; +import {NgModule} from '@angular/core'; +import {ServiceWorkerModule} from '@angular/service-worker'; -import { AppRoutingModule } from './app-routing.module'; +import {AppRoutingModule} from './app-routing.module'; -import { AppComponent } from './app.component'; -import { HomeComponent } from './view/home/home.component'; -import { ActivityService } from './service/activity.service'; -import { FundingService } from './service/funding.service'; -import { WorkService } from './service/work.service'; -import { WorkComponent } from './view/work/work.component'; -import { ActivityComponent } from './view/activity/activity.component'; -import { NavbarComponent } from './view/partical/navbar/navbar.component'; -import { ActivityDetailComponent } from './view/activity-detail/activity-detail.component'; -import { WorkDetailComponent } from './view/work-detail/work-detail.component'; -import { NotFoundComponent } from './view/partical/not-found/not-found.component'; -import { AboutComponent } from './view/about/about.component'; -import { DashboardComponent } from './view/admin/dashboard/dashboard.component'; -import { UserManagementComponent } from './view/admin/user-management/user-management.component'; -import { ActivityManagementComponent } from './view/admin/activity-management/activity-management.component'; -import { WorkManagementComponent } from './view/admin/work-management/work-management.component'; +import {AppComponent} from './app.component'; +import {HomeComponent} from './view/home/home.component'; +import {ActivityService} from './service/activity.service'; +import {FundingService} from './service/funding.service'; +import {WorkService} from './service/work.service'; +import {WorkComponent} from './view/work/work.component'; +import {ActivityComponent} from './view/activity/activity.component'; +import {NavbarComponent} from './view/partical/navbar/navbar.component'; +import {ActivityDetailComponent} from './view/activity-detail/activity-detail.component'; +import {WorkDetailComponent} from './view/work-detail/work-detail.component'; +import {NotFoundComponent} from './view/partical/not-found/not-found.component'; +import {AboutComponent} from './view/about/about.component'; +import {DashboardComponent} from './view/admin/dashboard/dashboard.component'; +import {UserManagementComponent} from './view/admin/user-management/user-management.component'; +import {ActivityManagementComponent} from './view/admin/activity-management/activity-management.component'; +import {WorkManagementComponent} from './view/admin/work-management/work-management.component'; import {FormsModule, ReactiveFormsModule} from "@angular/forms"; import {HttpModule, BrowserXhr} from "@angular/http"; import {cros} from "./common/cros"; -import { FooterComponent } from './view/partical/footer/footer.component'; +import {FooterComponent} from './view/partical/footer/footer.component'; import {AdminGuardService} from "./common/guard/admin-guard.service"; -import { AuthComponent } from './view/admin/auth/auth.component'; +import {AuthComponent} from './view/admin/auth/auth.component'; import {AuthService} from "./service/auth.service"; -import { FundingManagementComponent } from './view/admin/funding-management/funding-management.component'; +import {FundingManagementComponent} from './view/admin/funding-management/funding-management.component'; import {VersionService} from "./service/version.service"; import {environment} from "../environments/environment"; -import { QaComponent } from './view/qa/qa.component'; -import { QaService } from './service/qa.service'; -import { QaManagementComponent } from './view/admin/qa-management/qa-management.component'; -import { TextSlicePipe } from './common/pipe/text-slice.pipe'; -import { SpinnerComponent } from './view/partical/spinner/spinner.component'; +import {QaComponent} from './view/qa/qa.component'; +import {QaService} from './service/qa.service'; +import {QaManagementComponent} from './view/admin/qa-management/qa-management.component'; +import {TextSlicePipe} from './common/pipe/text-slice.pipe'; +import {SpinnerComponent} from './view/partical/spinner/spinner.component'; import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; -import { WorkListComponent } from './view/admin/work-list/work-list.component'; -import { ActivityListComponent } from './view/admin/activity-list/activity-list.component'; +import {WorkListComponent} from './view/admin/work-list/work-list.component'; +import {ActivityListComponent} from './view/admin/activity-list/activity-list.component'; +import {LocaleService} from "./service/locale.service"; @NgModule({ @@ -82,12 +83,14 @@ import { ActivityListComponent } from './view/admin/activity-list/activity-list. WorkService, AdminGuardService, VersionService, + LocaleService, { - provide: BrowserXhr, - useClass:cros, + provide: BrowserXhr, + useClass: cros, }, QaService ], bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule { +} diff --git a/client/src/app/service/locale.service.ts b/client/src/app/service/locale.service.ts new file mode 100644 index 0000000..d5127a4 --- /dev/null +++ b/client/src/app/service/locale.service.ts @@ -0,0 +1,28 @@ +import { Injectable } from '@angular/core'; + +@Injectable() +export class LocaleService { + + constructor() { } + + getUALang(){ + if(!localStorage.getItem('lang')){ + if(window.navigator.language){ + + }else{ + return 'en-US' + } + }else{ + return 'en-US' + } + } + + getLocale(){ + return localStorage.getItem('lang'); + } + + setUALang(lang:string){ + localStorage.setItem('lang',lang) + } + +} diff --git a/client/src/locale/messages.ja-JP.xlf b/client/src/locale/messages.ja-JP.xlf new file mode 100644 index 0000000..cf65b0c --- /dev/null +++ b/client/src/locale/messages.ja-JP.xlf @@ -0,0 +1,260 @@ + + + + + + We Are Starry Sea Volunteers Association + + + app/view/home/home.component.ts + 5 + + 首页heading僕たちは星の海ボランティアギルド + + + Dedicated to delivering the best of LoveLive SunshineAqours events related support + + app/view/home/home.component.ts + 9 + LoveLive Sunshineの魅力を伝えることに一生懸命頑張ります。 + + + + The main job of Starry Sea is to make and distribute + callbooks and other goods for Aqours' activities throughout China, + and provide volunteer service as much as possible at live events. + Aim for that "tenth person", strive to be the best! + + + About us + + + app/view/home/home.component.ts + 11 + 星之海的主要工作是为Aqours在国内进行的活动制作callbook、应援物进行免费的发放,并在live时为大家提供力所能及的志愿服务。想要以那“第十人”为目标,努力做到最好! + + + 关于我们 + + + Works Gallery + + app/view/work/work.component.ts + 3 + + 作品展示作品を見る + + + Learn More + + app/view/work/work.component.ts + 14 + + + app/view/activity/activity.component.ts + 14 + + 了解更多もっとを見る + + + Activities + + app/view/activity/activity.component.ts + 3 + イベントクラウドファンディング + + + Work + + app/view/partical/navbar/navbar.component.ts + 10 + + 作品作品展示 + + + Activity + + app/view/partical/navbar/navbar.component.ts + 13 + + 活动イベント + + + About Us + + app/view/partical/navbar/navbar.component.ts + 16 + + 关于我们星の海について + + + Name + + app/view/activity-detail/activity-detail.component.ts + 13 + + 众筹人名字クラウドファンダ + + + Amount + + app/view/activity-detail/activity-detail.component.ts + 14 + + 众筹金额クラウドファンダ金額 + + + Download + + app/view/work-detail/work-detail.component.ts + 11 + ダウンロード + + + 404 + + Page Not Found + + + app/view/partical/not-found/not-found.component.ts + 3 + 404 ページが見つかりません + + + Please Try Again Later + + app/view/partical/not-found/not-found.component.ts + 8 + しばらく待ってやり直してください + + + Here is a random picture of cucu + + app/view/partical/not-found/not-found.component.ts + 11 + + 醋图ミスホシノウミ(男)の写真 + + + Show Picture + + app/view/partical/not-found/not-found.component.ts + 12 + + 展示醋图写真を表示する + + + + “Is the mic OK? Check,1,2,OK.” + + app/view/about/about.component.ts + 5 + "麦克风还正常吗?Check,1,2,OK" + + + + Hello everyone, we are Starry Sea Volunteers Association, dedicated to delivering the best of Love Live Sunshine + Aqours events related support association in China! + + Aim to be the "Tenth Person" of Aqours, we gather our own tiny strength together, made callbooks, leaflet, badges + other souvenirs for Aqours events in China several times, trying hard to pass on the warmth of school idols, and + leave a warm and precious memory for everyone who loves school idols! + + + app/view/about/about.component.ts + 7 + 大家好,我们是星之海志愿者公会,致力于为校园偶像在中国国内的Event应援、向各位传递LoveLove!Sunshine!!的魅力的组织!

想要成为Aqours的【第十人】,我们凭借各自微小的力量聚集在了一起,为Aqours在国内的活动多次制作了CallBook,宣传折页,徽章等纪念品,力图将校园偶像带给我们的温暖传递下去,为热爱校园偶像的每一个人留下一份温暖而珍贵的回忆! + + + + From the predecessor of the organization μ’S Final LoveLive Callbook and all the way to today, we made include but + not limited to Aqours' 1st and 2nd Callbook and BML-SP's leaflets and other related commemorative badges, and we + still committed to providing with more beautiful, more diverse souvenirs! + + app/view/about/about.component.ts + 15 + 从组织前身的μ’S Final LoveLive Callbook制作组走来,我们制作了包括但不限于Aqours 的1st 与2nd 的CallBook以及BML-SP的宣传折页和其他相应的纪念徽章在内的应援物,并且还在致力于为大家提供更精美,更多样的纪念品! + + + + The cost of making a souvenir comes from the crowdfunding of the members, we keep a record of all the detailed + expenses.Leave footprint of the stories you created with us!We Believe, with the joint efforts of everyone, we can + definitely create "The new story that everyone accomplishes together"! + + + app/view/about/about.component.ts + 19 + 制作纪念品时的花销来自于成员们的众筹款,每一次的详细花销我们都记录在册,留下你与我们一同创造的故事的痕迹!我们相信,在大家共同的努力下,我们定能创造出【大家一起实现的崭新的故事】! + + + Any Questions? + + app/view/about/about.component.ts + 41 + 問題と建议? + + + Question Box + + app/view/about/about.component.ts + 42 + 質問ボックス + + + ©2018-2019 StarrySea + + app/view/partical/footer/footer.component.ts + 3 + (c)2018-2019 Starrysea + + + If you have any questions or any doubt + + app/view/qa/qa.component.ts + 5 + ご意見やご建议がありましたら、 + + + Please write it in the question box + + app/view/qa/qa.component.ts + 6 + 僕たちにメッセージを残してください + + + Your Message: + + app/view/qa/qa.component.ts + 14 + + 您的问题メッセージ + + + The question is completely anonymous,Please do not ask question that do not meet the core values of socialism,谢谢茄子 + + app/view/qa/qa.component.ts + 16 + 質問は完全に匿名です。変な質問に言及しないように注意してください。。。 + + + Send + + app/view/qa/qa.component.ts + 18 + + 提问送信確認 + + + Answered Questions + + app/view/qa/qa.component.ts + 24 + + 已答问题 + + 回答した質問 + + + + + diff --git a/client/src/messages.xlf b/client/src/messages.xlf index 57a1e65..eb1f6d1 100644 --- a/client/src/messages.xlf +++ b/client/src/messages.xlf @@ -242,6 +242,14 @@ 提问 + + Answered Questions + + app/view/qa/qa.component.ts + 24 + + 已答问题 + diff --git a/server/app.js b/server/app.js index d81ed7e..fe55f26 100644 --- a/server/app.js +++ b/server/app.js @@ -5,7 +5,7 @@ var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var Ddos = require('ddos'); -var config = require('./config'); +var favicon = require('serve-favicon'); //Import Routing var index = require('./routes/index'); var users = require('./routes/users'); @@ -14,6 +14,7 @@ var works = require('./routes/works'); var funding = require('./routes/funding'); var version = require('./routes/version'); var qa = require('./routes/qa'); +var config = require('./config'); //Init Ddos Protection var ddos = new Ddos({burst:120, limit:800}); @@ -34,13 +35,11 @@ app.all('*', function(req, res, next) { res.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS,PATCH"); next(); }else{ - res.header("Access-Control-Allow-Origin", '*'); - res.header("Access-Control-Allow-Headers", "Content-Type"); - res.header("Access-Control-Allow-Methods", "GET,PUT,POST,DELETE,OPTIONS,PATCH"); next(); } }); //Init Express Routing +app.use(favicon(path.join(__dirname,'public','favicon.ico'))); app.use('/static',express.static(path.join(__dirname, 'public'))); app.use('/', index); app.use('/activity',activity); @@ -60,8 +59,7 @@ app.use(function(err, req, res, next) { // set locals, only providing error in development res.locals.message = err.message; res.locals.error = req.app.get('env') === 'development' ? err : {}; - console.log(err) - res.status(err.status || 500).send(err) + res.status(err.status || 500).send(err.toString()) }); module.exports = app; diff --git a/server/package-lock.json b/server/package-lock.json index 90b3f9c..97d8a3c 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -3061,6 +3061,18 @@ } } }, + "serve-favicon": { + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.4.5.tgz", + "integrity": "sha512-s7F8h2NrslMkG50KxvlGdj+ApSwaLex0vexuJ9iFf3GLTIp1ph/l1qZvRe9T9TJEYZgmq72ZwJ2VYiAEtChknw==", + "requires": { + "etag": "1.8.1", + "fresh": "0.5.2", + "ms": "2.0.0", + "parseurl": "1.3.2", + "safe-buffer": "5.1.1" + } + }, "serve-static": { "version": "1.12.6", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.6.tgz", diff --git a/server/package.json b/server/package.json index caec17a..b9700db 100644 --- a/server/package.json +++ b/server/package.json @@ -19,7 +19,8 @@ "mongoose": "^5.0.1", "morgan": "~1.9.0", "multer": "^1.3.0", - "node-rsa": "^0.4.2" + "node-rsa": "^0.4.2", + "serve-favicon": "^2.4.5" }, "devDependencies": { "nodemon": "^1.14.11" diff --git a/server/public/favicon.ico b/server/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..9d1354c766cd5a8981b711021cb568b0d581ea23 GIT binary patch literal 5430 zcmdT|TS!z<6upgB^p?OLL^NfY^@nG6 z)E@SEQ>PJRxDy+1zkA7x%_Zjx(cs*y%o#UN>E-dyvkG_ebDiU<2H%Es&zAY71PdE{DdzF$>6nIO{8hiQYo^*1ia$tsWsTHu?se zYb;ziRSJYZFN$E|`Fi-#xeSI{bEd>Vf8y^8`2g|w%4P=SM}NY2w--ik&YBd%2|xLx zjrXpDuXh(%F?j#Ckvc%Uy0(=8bKrgH9`hLuFER7+u)30dsv%#$(Qv-GSBzL_9`l#i zuY^5=ftQ^i!<&H~Y5h=#@6b+VpUC-3Ss$o+oBT!fLk%i_>J_pTWjg?Iz`qyvo!q7L zuRm9A^&7?@|FYA?aQOUwrN2s_YF&6Jq%n!-jMv0=6L=oUE>K)5ovL+3c;&JxzG_`b z;L--_k5twrDruPL;AaR_9h}s+IF1f}lKSW@G&NLO??bA5Rcj4(J{@|N-_Ne)Fci#T z=Ovz*IzWANKFF*n2i%M2_IUSd7`ZiDiyQS4e_Klp$RN{2-wpQdXE zOVifi7C+Tu?CC1@EqB@rBL2VcF9HvWO_rVqjqNu6Y%Rn>^BvWK_$j8y;vPG2pPiQ< zCx1)iD>V?mtoLwUq)Ek3TE?ENgyFWCQXQG*M;-B=0*Kw2E7Xt;e$;@^ Date: Thu, 22 Mar 2018 14:56:40 -0400 Subject: [PATCH 4/8] language services update --- client/package.json | 3 +- client/src/app/app.component.ts | 8 +++- client/src/app/app.module.ts | 4 +- client/src/app/service/cookie.service.ts | 35 +++++++++++++++++ client/src/app/service/locale.service.ts | 42 ++++++++++++++------- client/src/environments/environment.prod.ts | 8 +++- client/src/environments/environment.ts | 8 +++- 7 files changed, 88 insertions(+), 20 deletions(-) create mode 100644 client/src/app/service/cookie.service.ts diff --git a/client/package.json b/client/package.json index 2647272..9bd51a6 100644 --- a/client/package.json +++ b/client/package.json @@ -7,8 +7,7 @@ "build": "ng build --prod", "test": "ng test", "lint": "ng lint", - "e2e": "ng e2e", - "analyzer": "webpack-bundle-analyzer dist/stats.json" + "e2e": "ng e2e" }, "private": true, "dependencies": { diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index f49b106..2c24c6a 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,5 +1,6 @@ -import {Component, OnInit,HostBinding, ViewChild} from '@angular/core'; +import {Component, OnInit} from '@angular/core'; import {routeAnimation} from "./common/animation"; +import {LocaleService} from "./service/locale.service"; @Component({ selector: 'app-root', @@ -10,12 +11,15 @@ import {routeAnimation} from "./common/animation"; export class AppComponent implements OnInit{ loaded:Boolean = false; - constructor(){ + constructor( + private locale:LocaleService + ){ } ngOnInit(){ this.loaded = true; + this.locale.onInit(); } public getRouteAnimation(outlet) { diff --git a/client/src/app/app.module.ts b/client/src/app/app.module.ts index 5240618..d82fe59 100644 --- a/client/src/app/app.module.ts +++ b/client/src/app/app.module.ts @@ -40,6 +40,7 @@ import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; import {WorkListComponent} from './view/admin/work-list/work-list.component'; import {ActivityListComponent} from './view/admin/activity-list/activity-list.component'; import {LocaleService} from "./service/locale.service"; +import {CookieService} from "./service/cookie.service"; @NgModule({ @@ -88,7 +89,8 @@ import {LocaleService} from "./service/locale.service"; provide: BrowserXhr, useClass: cros, }, - QaService + QaService, + CookieService ], bootstrap: [AppComponent] }) diff --git a/client/src/app/service/cookie.service.ts b/client/src/app/service/cookie.service.ts new file mode 100644 index 0000000..8f8c10d --- /dev/null +++ b/client/src/app/service/cookie.service.ts @@ -0,0 +1,35 @@ +import { Injectable } from '@angular/core'; +import {environment} from "../../environments/environment"; + +@Injectable() +export class CookieService { + + constructor() { } + + setCookie(cookieName:string,cookieValue:string,expireDays:number) :string { + var d = new Date(); + d.setTime(d.getTime() + (expireDays*24*60*60*1000)); + var expires = "expires=" + d.toUTCString(); + return document.cookie = cookieName + "=" + cookieValue + ";" + expires + ";path=/;domain="+environment.cookieDomain+';'; + } + + + getCookie(cookieName:string): string { + var name = cookieName + "="; + var decodedCookie = decodeURIComponent(document.cookie); + var ca = decodedCookie.split(';'); + for(var i = 0; i < ca.length; i++) { + var c = ca[i]; + while (c.charAt(0) == ' ') { + c = c.substring(1); + } + if (c.indexOf(name) == 0) { + return c.substring(name.length, c.length); + } + } + return ""; + } + + + +} diff --git a/client/src/app/service/locale.service.ts b/client/src/app/service/locale.service.ts index d5127a4..3052d15 100644 --- a/client/src/app/service/locale.service.ts +++ b/client/src/app/service/locale.service.ts @@ -1,28 +1,44 @@ import { Injectable } from '@angular/core'; +import {CookieService} from "./cookie.service"; +import {environment} from "../../environments/environment"; @Injectable() export class LocaleService { - constructor() { } + constructor( + private cookie:CookieService + ) { } - getUALang(){ - if(!localStorage.getItem('lang')){ - if(window.navigator.language){ - - }else{ - return 'en-US' - } + getUALang() : string{ + if(navigator.language){ + return navigator.language }else{ return 'en-US' } } - getLocale(){ - return localStorage.getItem('lang'); + saveLocale():void{ + this.cookie.setCookie("lang",this.getUALang(),9999) } - setUALang(lang:string){ - localStorage.setItem('lang',lang) + onInit():void{ + if(this.cookie.getCookie("lang")===""){ + this.saveLocale(); + this.onInit(); + }else{ + switch (this.cookie.getCookie("lang")){ + case "en-US": + window.location.replace(environment.multiDomain.en); + break; + case "ja-JP": + window.location.replace(environment.multiDomain.jp); + break; + case "zh-CN": + window.location.replace(environment.multiDomain.cn); + break; + default: + window.location.replace(environment.multiDomain.en); + } + } } - } diff --git a/client/src/environments/environment.prod.ts b/client/src/environments/environment.prod.ts index 8386f6a..ee66a1f 100644 --- a/client/src/environments/environment.prod.ts +++ b/client/src/environments/environment.prod.ts @@ -1,4 +1,10 @@ export const environment = { production: true, - apiBase:'https://api.starrysea.org' + apiBase:'https://api.starrysea.org', + cookieDomain:".starrysea.org", + multiDomain:{ + en:"https://starrysea.org", + jp:"https://jp.starrysea.org", + cn:"https://cn.starrysea.org" + } }; diff --git a/client/src/environments/environment.ts b/client/src/environments/environment.ts index 1b02404..cd95547 100644 --- a/client/src/environments/environment.ts +++ b/client/src/environments/environment.ts @@ -5,5 +5,11 @@ export const environment = { production: false, - apiBase:"http://localhost:3000" + apiBase:"http://localhost:3000", + cookieDomain:"localhost", + multiDomain:{ + en:"http://localhost:4200", + jp:"http://localhost:4200", + cn:"http://localhost:4200" + } }; From f6b005780f1c5036b59673187e5b06e326bfffe6 Mon Sep 17 00:00:00 2001 From: theeditor Date: Fri, 23 Mar 2018 15:31:58 -0400 Subject: [PATCH 5/8] finish client locale adaptation --- client/.angular-cli.json | 1 + client/package-lock.json | 10 +++++ client/package.json | 2 + client/src/app/service/activity.service.ts | 6 ++- client/src/app/service/locale.service.ts | 44 +++++++++++++------ client/src/app/service/work.service.ts | 6 ++- .../partical/footer/footer.component.html | 10 +++++ .../view/partical/footer/footer.component.ts | 12 ++++- client/src/styles.css | 1 + 9 files changed, 73 insertions(+), 19 deletions(-) diff --git a/client/.angular-cli.json b/client/.angular-cli.json index cb11193..da1cc5c 100644 --- a/client/.angular-cli.json +++ b/client/.angular-cli.json @@ -25,6 +25,7 @@ ], "scripts": [ "../node_modules/jquery/dist/jquery.min.js", + "../node_modules/popper.js/dist/umd/popper.min.js", "../node_modules/bootstrap/dist/js/bootstrap.min.js" ], "environmentSource": "environments/environment.ts", diff --git a/client/package-lock.json b/client/package-lock.json index 6f1f39b..1bae25a 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -2996,6 +2996,11 @@ "locate-path": "2.0.0" } }, + "flag-icon-css": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/flag-icon-css/-/flag-icon-css-3.0.0.tgz", + "integrity": "sha512-Dy5xpXT2wKIx7oxTuimedeNymmCAFf1Tnq4ec9o3wxTBD9qESVMYti2SBLh4XMiKZzlTIy+msEtOfa/e5Na5iQ==" + }, "flush-write-stream": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.0.2.tgz", @@ -7021,6 +7026,11 @@ "find-up": "2.1.0" } }, + "popper.js": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.14.1.tgz", + "integrity": "sha1-uIFeXNpvYvwgQuR2GGSfdYZuZ1M=" + }, "portfinder": { "version": "1.0.13", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.13.tgz", diff --git a/client/package.json b/client/package.json index 9bd51a6..6aac2dd 100644 --- a/client/package.json +++ b/client/package.json @@ -24,8 +24,10 @@ "bootstrap": "^4.0.0", "core-js": "^2.4.1", "express": "^4.16.2", + "flag-icon-css": "^3.0.0", "jquery": "^3.3.1", "node-fetch": "^2.1.1", + "popper.js": "^1.14.1", "rxjs": "^5.5.2", "sweetalert": "^2.1.0", "zone.js": "^0.8.14" diff --git a/client/src/app/service/activity.service.ts b/client/src/app/service/activity.service.ts index 6007ddf..ec5773a 100644 --- a/client/src/app/service/activity.service.ts +++ b/client/src/app/service/activity.service.ts @@ -1,17 +1,19 @@ import { Injectable } from '@angular/core'; import {Http, RequestOptions} from "@angular/http"; import {environment} from "../../environments/environment"; +import {LocaleService} from "./locale.service"; @Injectable() export class ActivityService { constructor( - private http:Http + private http:Http, + private locale:LocaleService ) { } fetchActivityList(page:Number,limit:Number){ return this.http - .get(environment.apiBase+'/activity?page='+page+'&limit='+limit) + .get(environment.apiBase+'/activity?page='+page+'&limit='+limit+'&locale='+this.locale.getLocale()) } getActivity(uid:String){ diff --git a/client/src/app/service/locale.service.ts b/client/src/app/service/locale.service.ts index 3052d15..c42d034 100644 --- a/client/src/app/service/locale.service.ts +++ b/client/src/app/service/locale.service.ts @@ -21,23 +21,41 @@ export class LocaleService { this.cookie.setCookie("lang",this.getUALang(),9999) } - onInit():void{ + getLocale():string{ if(this.cookie.getCookie("lang")===""){ + return "en-US" + }else{ + return this.cookie.getCookie("lang"); + } + } + + onInit():void{ + if(this.cookie.getCookie("lang")===""&&!this.cookie.getCookie("auto_jump")){ this.saveLocale(); this.onInit(); }else{ - switch (this.cookie.getCookie("lang")){ - case "en-US": - window.location.replace(environment.multiDomain.en); - break; - case "ja-JP": - window.location.replace(environment.multiDomain.jp); - break; - case "zh-CN": - window.location.replace(environment.multiDomain.cn); - break; - default: - window.location.replace(environment.multiDomain.en); + if(this.cookie.getCookie("auto_jump")==="true"){ + + } + else { + switch (this.cookie.getCookie("lang")) { + case "en-US": + window.location.replace(environment.multiDomain.en); + this.cookie.setCookie("auto_jump", "true", 999); + break; + case "ja-JP": + window.location.replace(environment.multiDomain.jp); + this.cookie.setCookie("auto_jump", "true", 999); + break; + case "zh-CN": + window.location.replace(environment.multiDomain.cn); + this.cookie.setCookie("auto_jump", "true", 999); + break; + default: + window.location.replace(environment.multiDomain.en); + this.cookie.setCookie("auto_jump", "true", 999); + break; + } } } } diff --git a/client/src/app/service/work.service.ts b/client/src/app/service/work.service.ts index a64ae3e..ebbec82 100644 --- a/client/src/app/service/work.service.ts +++ b/client/src/app/service/work.service.ts @@ -1,17 +1,19 @@ import { Injectable } from '@angular/core'; import {Http, RequestOptions} from "@angular/http"; import {environment} from "../../environments/environment"; +import {LocaleService} from "./locale.service"; @Injectable() export class WorkService { constructor( - private http:Http + private http:Http, + private locale:LocaleService ) { } fetchWorkList(page:Number,limit:Number){ return this.http - .get(environment.apiBase+'/work?page='+page+'&limit='+limit) + .get(environment.apiBase+'/work?page='+page+'&limit='+limit+'&locale='+this.locale.getLocale()) } getWorkDetail(uid:String){ diff --git a/client/src/app/view/partical/footer/footer.component.html b/client/src/app/view/partical/footer/footer.component.html index f8613e3..a8522bc 100644 --- a/client/src/app/view/partical/footer/footer.component.html +++ b/client/src/app/view/partical/footer/footer.component.html @@ -1,5 +1,15 @@ diff --git a/client/src/app/view/partical/footer/footer.component.ts b/client/src/app/view/partical/footer/footer.component.ts index 67f1378..1d4e584 100644 --- a/client/src/app/view/partical/footer/footer.component.ts +++ b/client/src/app/view/partical/footer/footer.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; - +import {CookieService} from "../../../service/cookie.service"; +declare var $:any; @Component({ selector: 'app-footer', templateUrl: './footer.component.html', @@ -7,9 +8,16 @@ import { Component, OnInit } from '@angular/core'; }) export class FooterComponent implements OnInit { - constructor() { } + constructor( + private cookie:CookieService + ) { } ngOnInit() { } + selectLang(locale:string):void{ + this.cookie.setCookie("lang",locale,9999); + window.location.reload(); + } + } diff --git a/client/src/styles.css b/client/src/styles.css index 4210710..9c15dbd 100644 --- a/client/src/styles.css +++ b/client/src/styles.css @@ -1,4 +1,5 @@ @import "~bootstrap/dist/css/bootstrap.min.css"; +@import "~flag-icon-css/css/flag-icon.min.css"; @import "https://fonts.googleapis.com/css?family=Open+Sans:300,400"; html { position: relative; From a8404a6a8ecd45b3a8a72e46b79d4793a11b5264 Mon Sep 17 00:00:00 2001 From: theeditor Date: Fri, 23 Mar 2018 15:35:56 -0400 Subject: [PATCH 6/8] update admin lang --- client/src/app/common/locale.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/app/common/locale.ts b/client/src/app/common/locale.ts index d18671b..7176e58 100644 --- a/client/src/app/common/locale.ts +++ b/client/src/app/common/locale.ts @@ -1,4 +1,5 @@ export const locale = [ "en-US", - "ja-JP" + "ja-JP", + "zh-CN" ]; From 44f99a0bb00800a67053af6b1f5a0ce9c956ad06 Mon Sep 17 00:00:00 2001 From: theeditor Date: Sat, 24 Mar 2018 09:28:00 -0400 Subject: [PATCH 7/8] update language --- client/src/locale/messages.zh-CN.xlf | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/client/src/locale/messages.zh-CN.xlf b/client/src/locale/messages.zh-CN.xlf index d9a4091..d446e94 100644 --- a/client/src/locale/messages.zh-CN.xlf +++ b/client/src/locale/messages.zh-CN.xlf @@ -31,7 +31,11 @@ app/view/home/home.component.ts 11 - 星之海的主要工作是为Aqours在国内进行的活动制作callbook、应援物进行免费的发放,并在live时为大家提供力所能及的志愿服务。想要以那“第十人”为目标,努力做到最好! + 星之海的主要工作是为Aqours在国内进行的活动制作callbook、应援物进行免费的发放, + + 并在live时为大家提供力所能及的志愿服务。 + + 想要以那“第十人”为目标,努力做到最好! 关于我们 @@ -244,6 +248,14 @@ 提问确认送出 + + Answered Questions + + app/view/qa/qa.component.ts + 24 + + 已答问题已答问题 + From 4d0d9cf20ad152955944332cbde69218d2cc3736 Mon Sep 17 00:00:00 2001 From: theeditor Date: Sat, 24 Mar 2018 12:24:05 -0400 Subject: [PATCH 8/8] update api and locale change --- client/src/app/service/cookie.service.ts | 11 +++++++++++ .../src/app/view/partical/footer/footer.component.ts | 8 ++++++-- server/config.js | 4 +++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/client/src/app/service/cookie.service.ts b/client/src/app/service/cookie.service.ts index 8f8c10d..95dd028 100644 --- a/client/src/app/service/cookie.service.ts +++ b/client/src/app/service/cookie.service.ts @@ -30,6 +30,17 @@ export class CookieService { return ""; } + deleteCookie(): void{ + var cookies = document.cookie.split(";"); + + for (var i = 0; i < cookies.length; i++) { + var cookie = cookies[i]; + var eqPos = cookie.indexOf("="); + var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; + document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain="+environment.cookieDomain+';'; + } + } + } diff --git a/client/src/app/view/partical/footer/footer.component.ts b/client/src/app/view/partical/footer/footer.component.ts index 1d4e584..4c5b49c 100644 --- a/client/src/app/view/partical/footer/footer.component.ts +++ b/client/src/app/view/partical/footer/footer.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import {CookieService} from "../../../service/cookie.service"; +import {LocaleService} from "../../../service/locale.service"; declare var $:any; @Component({ selector: 'app-footer', @@ -9,15 +10,18 @@ declare var $:any; export class FooterComponent implements OnInit { constructor( - private cookie:CookieService + private cookie:CookieService, + private locale:LocaleService ) { } ngOnInit() { } selectLang(locale:string):void{ + this.cookie.deleteCookie(); this.cookie.setCookie("lang",locale,9999); - window.location.reload(); + this.cookie.setCookie("auto_jump","false",9999); + this.locale.onInit(); } } diff --git a/server/config.js b/server/config.js index 3b70fbd..203654e 100644 --- a/server/config.js +++ b/server/config.js @@ -5,6 +5,8 @@ module.exports={ "http://localhost:3000", "https://starrysea.org", "https://www.starrysea.org", - "http://www.starrysea.top" + "https://cn.starrysea.org", + "https://jp.starrysea.org", + "http://www.starrysea.top", ], };
NameAmountNameAmount