ember-flexberry-account 0.1.0-alpha.7 → 0.1.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/ISSUE_TEMPLATE/bug_report.md +58 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +46 -0
- package/.jscsrc +15 -15
- package/CHANGELOG.md +25 -17
- package/README.md +38 -38
- package/addon/components/flexberry-login.js +163 -158
- package/addon/components/flexberry-pwd-reset.js +123 -123
- package/addon/components/flexberry-recaptcha.js +115 -115
- package/addon/components/flexberry-register.js +226 -226
- package/addon/components/flexberry-user-profile.js +8 -8
- package/addon/controllers/email-confirmation.js +91 -91
- package/addon/controllers/login.js +4 -4
- package/addon/controllers/pwd-reset.js +4 -4
- package/addon/controllers/register.js +4 -4
- package/addon/controllers/user-profile.js +4 -4
- package/addon/locales/en/translations.js +63 -63
- package/addon/locales/ru/translations.js +65 -65
- package/addon/models/user-profile.js +5 -5
- package/addon/routes/email-confirmation.js +4 -4
- package/addon/routes/login.js +4 -4
- package/addon/routes/pwd-reset.js +4 -4
- package/addon/routes/reg-end.js +4 -4
- package/addon/routes/register.js +4 -4
- package/addon/routes/user-profile.js +4 -4
- package/addon/services/user-account.js +184 -184
- package/app/components/flexberry-login.js +1 -1
- package/app/components/flexberry-pwd-reset.js +1 -1
- package/app/components/flexberry-recaptcha.js +1 -1
- package/app/components/flexberry-register.js +1 -1
- package/app/components/flexberry-user-profile.js +1 -1
- package/app/controllers/email-confirmation.js +1 -1
- package/app/controllers/login.js +1 -1
- package/app/controllers/pwd-reset.js +1 -1
- package/app/controllers/register.js +1 -1
- package/app/controllers/user-profile.js +1 -1
- package/app/models/user-profile.js +1 -1
- package/app/routes/login.js +1 -1
- package/app/routes/pwd-reset.js +1 -1
- package/app/routes/register.js +1 -1
- package/app/routes/user-profile.js +1 -1
- package/app/services/user-account.js +82 -82
- package/app/templates/components/flexberry-login.hbs +53 -53
- package/app/templates/components/flexberry-pwd-reset.hbs +38 -38
- package/app/templates/components/flexberry-register.hbs +75 -75
- package/app/templates/components/flexberry-user-profile.hbs +1 -1
- package/app/templates/login.hbs +5 -5
- package/app/templates/pwd-reset.hbs +4 -4
- package/app/templates/register.hbs +4 -4
- package/app/templates/user-profile.hbs +3 -3
- package/blueprints/ember-flexberry-account/index.js +43 -43
- package/config/environment.js +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
- package/scripts/deploy-to-gh-pages.sh +78 -78
- package/yarn.lock +7185 -0
- package/.npmignore +0 -16
- package/jsconfig.json +0 -1
- package/package-lock.json +0 -8894
- package/typings/ember/ember.d.ts +0 -3188
@@ -1,53 +1,53 @@
|
|
1
|
-
<div class="username-div">
|
2
|
-
{{t "components.login.username-label"}}<br/>
|
3
|
-
{{input type="text" value=username}}
|
4
|
-
</div>
|
5
|
-
<div class="password-div">
|
6
|
-
{{t "components.login.password-label"}}<br/>
|
7
|
-
{{input type="password" value=password}}
|
8
|
-
</div>
|
9
|
-
<div class="login-div">
|
10
|
-
{{t "components.login.remember-label"}} {{input type="checkbox" checked=remember}}
|
11
|
-
<button
|
12
|
-
class="ui login-button button"
|
13
|
-
title={{t "components.login.login-button-title"}}
|
14
|
-
disabled={{allowToLogin}}
|
15
|
-
{{action "login"}}>
|
16
|
-
{{t "components.login.login-button-text"}}
|
17
|
-
</button>
|
18
|
-
</div>
|
19
|
-
{{#if useSocialBlock}}
|
20
|
-
<div class="social-div">
|
21
|
-
{{t "components.login.login-with-label"}}<br/>
|
22
|
-
<div class="social-buttons">
|
23
|
-
{{#if vk}}{{input type="button" value="VK"}}{{/if}}
|
24
|
-
{{#if facebook}}{{input type="button" value="Facebook"}}{{/if}}
|
25
|
-
{{#if twitter}}{{input type="button" value="Twitter"}}{{/if}}
|
26
|
-
{{#if google}}{{input type="button" value="Google"}}{{/if}}
|
27
|
-
{{#if microsoft}}{{input type="button" value="Microsoft"}}{{/if}}
|
28
|
-
{{#if github}}{{input type="button" value="GitHub"}}{{/if}}
|
29
|
-
{{#if ok}}{{input type="button" value="OK"}}{{/if}}
|
30
|
-
{{#if mailru}}{{input type="button" value="Mail.ru"}}{{/if}}
|
31
|
-
{{#if yandex}}{{input type="button" value="Yandex"}}{{/if}}
|
32
|
-
{{#if gosuslugi}}{{input type="button" value="Gosuslugi"}}{{/if}}
|
33
|
-
</div>
|
34
|
-
</div>
|
35
|
-
{{/if}}
|
36
|
-
{{#if useNavBlock}}
|
37
|
-
<div class="register-reset-div">
|
38
|
-
{{#if showRegButton}}
|
39
|
-
<button class="ui register-button button"
|
40
|
-
title={{t "components.login.register-button-title"}}
|
41
|
-
{{action "register"}}>
|
42
|
-
{{t "components.login.register-button-text"}}
|
43
|
-
</button>
|
44
|
-
{{/if}}
|
45
|
-
{{#if showPwdResetButton}}
|
46
|
-
<button class="ui pwd-reset-button button"
|
47
|
-
title={{t "components.login.pwd-reset-button-title"}}
|
48
|
-
{{action "pwdReset"}}>
|
49
|
-
{{t "components.login.pwd-reset-button-text"}}
|
50
|
-
</button>
|
51
|
-
{{/if}}
|
52
|
-
</div>
|
53
|
-
{{/if}}
|
1
|
+
<div class="username-div">
|
2
|
+
{{t "components.login.username-label"}}<br/>
|
3
|
+
{{input type="text" keyPress=(action "onKeyPress") value=username}}
|
4
|
+
</div>
|
5
|
+
<div class="password-div">
|
6
|
+
{{t "components.login.password-label"}}<br/>
|
7
|
+
{{input type="password" keyPress=(action "onKeyPress") value=password}}
|
8
|
+
</div>
|
9
|
+
<div class="login-div">
|
10
|
+
{{t "components.login.remember-label"}} {{input type="checkbox" checked=remember}}
|
11
|
+
<button
|
12
|
+
class="ui login-button button"
|
13
|
+
title={{t "components.login.login-button-title"}}
|
14
|
+
disabled={{allowToLogin}}
|
15
|
+
{{action "login"}}>
|
16
|
+
{{t "components.login.login-button-text"}}
|
17
|
+
</button>
|
18
|
+
</div>
|
19
|
+
{{#if useSocialBlock}}
|
20
|
+
<div class="social-div">
|
21
|
+
{{t "components.login.login-with-label"}}<br/>
|
22
|
+
<div class="social-buttons">
|
23
|
+
{{#if vk}}{{input type="button" value="VK"}}{{/if}}
|
24
|
+
{{#if facebook}}{{input type="button" value="Facebook"}}{{/if}}
|
25
|
+
{{#if twitter}}{{input type="button" value="Twitter"}}{{/if}}
|
26
|
+
{{#if google}}{{input type="button" value="Google"}}{{/if}}
|
27
|
+
{{#if microsoft}}{{input type="button" value="Microsoft"}}{{/if}}
|
28
|
+
{{#if github}}{{input type="button" value="GitHub"}}{{/if}}
|
29
|
+
{{#if ok}}{{input type="button" value="OK"}}{{/if}}
|
30
|
+
{{#if mailru}}{{input type="button" value="Mail.ru"}}{{/if}}
|
31
|
+
{{#if yandex}}{{input type="button" value="Yandex"}}{{/if}}
|
32
|
+
{{#if gosuslugi}}{{input type="button" value="Gosuslugi"}}{{/if}}
|
33
|
+
</div>
|
34
|
+
</div>
|
35
|
+
{{/if}}
|
36
|
+
{{#if useNavBlock}}
|
37
|
+
<div class="register-reset-div">
|
38
|
+
{{#if showRegButton}}
|
39
|
+
<button class="ui register-button button"
|
40
|
+
title={{t "components.login.register-button-title"}}
|
41
|
+
{{action "register"}}>
|
42
|
+
{{t "components.login.register-button-text"}}
|
43
|
+
</button>
|
44
|
+
{{/if}}
|
45
|
+
{{#if showPwdResetButton}}
|
46
|
+
<button class="ui pwd-reset-button button"
|
47
|
+
title={{t "components.login.pwd-reset-button-title"}}
|
48
|
+
{{action "pwdReset"}}>
|
49
|
+
{{t "components.login.pwd-reset-button-text"}}
|
50
|
+
</button>
|
51
|
+
{{/if}}
|
52
|
+
</div>
|
53
|
+
{{/if}}
|
@@ -1,38 +1,38 @@
|
|
1
|
-
<div class="captcha-div">
|
2
|
-
{{flexberry-recaptcha onSuccess=(action "captchaSuccess")}}
|
3
|
-
</div>
|
4
|
-
<div class="username-div">
|
5
|
-
{{t "components.pwd-reset.username-label"}}<br/>
|
6
|
-
{{#if captchaPassed}}
|
7
|
-
{{input type="text" value=username}}
|
8
|
-
{{else}}
|
9
|
-
{{input type="text" readonly=true}}
|
10
|
-
{{/if}}
|
11
|
-
</div>
|
12
|
-
<div class="pwd-reset-div">
|
13
|
-
<button
|
14
|
-
class="ui pwd-reset-button button"
|
15
|
-
title={{t "components.pwd-reset.pwd-reset-button-title"}}
|
16
|
-
disabled={{allowReset}}
|
17
|
-
{{action "pwdReset"}}>
|
18
|
-
{{t "components.pwd-reset.pwd-reset-button-text"}}
|
19
|
-
</button>
|
20
|
-
</div>
|
21
|
-
{{#if showNavBlock}}
|
22
|
-
<div class="login-register-div">
|
23
|
-
{{#if showPwdResetButton}}
|
24
|
-
<button class="ui login-button button"
|
25
|
-
title={{t "components.pwd-reset.login-button-title"}}
|
26
|
-
{{action "login"}}>
|
27
|
-
{{t "components.pwd-reset.login-button-text"}}
|
28
|
-
</button>
|
29
|
-
{{/if}}
|
30
|
-
{{#if showRegButton}}
|
31
|
-
<button class="ui register-button button"
|
32
|
-
title={{t "components.pwd-reset.register-button-title"}}
|
33
|
-
{{action "register"}}>
|
34
|
-
{{t "components.pwd-reset.register-button-text"}}
|
35
|
-
</button>
|
36
|
-
{{/if}}
|
37
|
-
</div>
|
38
|
-
{{/if}}
|
1
|
+
<div class="captcha-div">
|
2
|
+
{{flexberry-recaptcha onSuccess=(action "captchaSuccess")}}
|
3
|
+
</div>
|
4
|
+
<div class="username-div">
|
5
|
+
{{t "components.pwd-reset.username-label"}}<br/>
|
6
|
+
{{#if captchaPassed}}
|
7
|
+
{{input type="text" value=username}}
|
8
|
+
{{else}}
|
9
|
+
{{input type="text" readonly=true}}
|
10
|
+
{{/if}}
|
11
|
+
</div>
|
12
|
+
<div class="pwd-reset-div">
|
13
|
+
<button
|
14
|
+
class="ui pwd-reset-button button"
|
15
|
+
title={{t "components.pwd-reset.pwd-reset-button-title"}}
|
16
|
+
disabled={{allowReset}}
|
17
|
+
{{action "pwdReset"}}>
|
18
|
+
{{t "components.pwd-reset.pwd-reset-button-text"}}
|
19
|
+
</button>
|
20
|
+
</div>
|
21
|
+
{{#if showNavBlock}}
|
22
|
+
<div class="login-register-div">
|
23
|
+
{{#if showPwdResetButton}}
|
24
|
+
<button class="ui login-button button"
|
25
|
+
title={{t "components.pwd-reset.login-button-title"}}
|
26
|
+
{{action "login"}}>
|
27
|
+
{{t "components.pwd-reset.login-button-text"}}
|
28
|
+
</button>
|
29
|
+
{{/if}}
|
30
|
+
{{#if showRegButton}}
|
31
|
+
<button class="ui register-button button"
|
32
|
+
title={{t "components.pwd-reset.register-button-title"}}
|
33
|
+
{{action "register"}}>
|
34
|
+
{{t "components.pwd-reset.register-button-text"}}
|
35
|
+
</button>
|
36
|
+
{{/if}}
|
37
|
+
</div>
|
38
|
+
{{/if}}
|
@@ -1,75 +1,75 @@
|
|
1
|
-
<div class="captcha-div">
|
2
|
-
{{flexberry-recaptcha
|
3
|
-
onSuccess=(action "captchaSuccess")
|
4
|
-
}}
|
5
|
-
</div>
|
6
|
-
|
7
|
-
<div class="username-div">
|
8
|
-
{{t "components.register.username-label"}}<br/>
|
9
|
-
{{#if captchaPassed}}
|
10
|
-
{{input type="email" value=username focus-out="validateUsername"}}
|
11
|
-
{{else}}
|
12
|
-
{{input type="email" readonly=true}}
|
13
|
-
{{/if}}
|
14
|
-
|
15
|
-
{{{usernameFlag}}}
|
16
|
-
|
17
|
-
</div>
|
18
|
-
<div class="full-name-div">
|
19
|
-
{{t "components.register.full-name-label"}}<br/>
|
20
|
-
{{#if captchaPassed}}
|
21
|
-
{{input type="text" value=fullName}}
|
22
|
-
{{else}}
|
23
|
-
{{input type="text" readonly=true}}
|
24
|
-
{{/if}}
|
25
|
-
|
26
|
-
{{#if validFullname}}
|
27
|
-
<i class="green check icon"></i>
|
28
|
-
{{/if}}
|
29
|
-
</div>
|
30
|
-
<div class="register-div">
|
31
|
-
<button
|
32
|
-
class="ui register-button button"
|
33
|
-
title={{t "components.register.register-button-title"}}
|
34
|
-
disabled={{allowRegistration}}
|
35
|
-
{{action "register"}}>
|
36
|
-
{{t "components.register.register-button-text"}}
|
37
|
-
</button>
|
38
|
-
</div>
|
39
|
-
{{#if useSocialBlock}}
|
40
|
-
<div class="social-div">
|
41
|
-
{{t "components.register.register-with-label"}}<br/>
|
42
|
-
<div class="social-buttons">
|
43
|
-
{{#if vk}}{{input type="button" value="VK"}}{{/if}}
|
44
|
-
{{#if facebook}}{{input type="button" value="Facebook"}}{{/if}}
|
45
|
-
{{#if twitter}}{{input type="button" value="Twitter"}}{{/if}}
|
46
|
-
{{#if google}}{{input type="button" value="Google"}}{{/if}}
|
47
|
-
{{#if microsoft}}{{input type="button" value="Microsoft"}}{{/if}}
|
48
|
-
{{#if github}}{{input type="button" value="GitHub"}}{{/if}}
|
49
|
-
{{#if ok}}{{input type="button" value="OK"}}{{/if}}
|
50
|
-
{{#if mailru}}{{input type="button" value="Mail.ru"}}{{/if}}
|
51
|
-
{{#if yandex}}{{input type="button" value="Yandex"}}{{/if}}
|
52
|
-
{{#if gosuslugi}}{{input type="button" value="Gosuslugi"}}{{/if}}
|
53
|
-
</div>
|
54
|
-
</div>
|
55
|
-
{{/if}}
|
56
|
-
|
57
|
-
{{#if showNavBlock}}
|
58
|
-
<div class="login-reset-div">
|
59
|
-
{{t "components.register.login-reset-label"}}<br/>
|
60
|
-
{{#if showLoginButton}}
|
61
|
-
<button class="ui login-button button"
|
62
|
-
title={{t "components.register.login-button-title"}}
|
63
|
-
{{action "login"}}>
|
64
|
-
{{t "components.register.login-button-text"}}
|
65
|
-
</button>
|
66
|
-
{{/if}}
|
67
|
-
{{#if showPwdResetButton}}
|
68
|
-
<button class="ui pwd-reset-button button"
|
69
|
-
title={{t "components.register.pwd-reset-button-title"}}
|
70
|
-
{{action "pwdReset"}}>
|
71
|
-
{{t "components.register.pwd-reset-button-text"}}
|
72
|
-
</button>
|
73
|
-
{{/if}}
|
74
|
-
</div>
|
75
|
-
{{/if}}
|
1
|
+
<div class="captcha-div">
|
2
|
+
{{flexberry-recaptcha
|
3
|
+
onSuccess=(action "captchaSuccess")
|
4
|
+
}}
|
5
|
+
</div>
|
6
|
+
|
7
|
+
<div class="username-div">
|
8
|
+
{{t "components.register.username-label"}}<br/>
|
9
|
+
{{#if captchaPassed}}
|
10
|
+
{{input type="email" value=username focus-out="validateUsername"}}
|
11
|
+
{{else}}
|
12
|
+
{{input type="email" readonly=true}}
|
13
|
+
{{/if}}
|
14
|
+
|
15
|
+
{{{usernameFlag}}}
|
16
|
+
|
17
|
+
</div>
|
18
|
+
<div class="full-name-div">
|
19
|
+
{{t "components.register.full-name-label"}}<br/>
|
20
|
+
{{#if captchaPassed}}
|
21
|
+
{{input type="text" value=fullName}}
|
22
|
+
{{else}}
|
23
|
+
{{input type="text" readonly=true}}
|
24
|
+
{{/if}}
|
25
|
+
|
26
|
+
{{#if validFullname}}
|
27
|
+
<i class="green check icon"></i>
|
28
|
+
{{/if}}
|
29
|
+
</div>
|
30
|
+
<div class="register-div">
|
31
|
+
<button
|
32
|
+
class="ui register-button button"
|
33
|
+
title={{t "components.register.register-button-title"}}
|
34
|
+
disabled={{allowRegistration}}
|
35
|
+
{{action "register"}}>
|
36
|
+
{{t "components.register.register-button-text"}}
|
37
|
+
</button>
|
38
|
+
</div>
|
39
|
+
{{#if useSocialBlock}}
|
40
|
+
<div class="social-div">
|
41
|
+
{{t "components.register.register-with-label"}}<br/>
|
42
|
+
<div class="social-buttons">
|
43
|
+
{{#if vk}}{{input type="button" value="VK"}}{{/if}}
|
44
|
+
{{#if facebook}}{{input type="button" value="Facebook"}}{{/if}}
|
45
|
+
{{#if twitter}}{{input type="button" value="Twitter"}}{{/if}}
|
46
|
+
{{#if google}}{{input type="button" value="Google"}}{{/if}}
|
47
|
+
{{#if microsoft}}{{input type="button" value="Microsoft"}}{{/if}}
|
48
|
+
{{#if github}}{{input type="button" value="GitHub"}}{{/if}}
|
49
|
+
{{#if ok}}{{input type="button" value="OK"}}{{/if}}
|
50
|
+
{{#if mailru}}{{input type="button" value="Mail.ru"}}{{/if}}
|
51
|
+
{{#if yandex}}{{input type="button" value="Yandex"}}{{/if}}
|
52
|
+
{{#if gosuslugi}}{{input type="button" value="Gosuslugi"}}{{/if}}
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
{{/if}}
|
56
|
+
|
57
|
+
{{#if showNavBlock}}
|
58
|
+
<div class="login-reset-div">
|
59
|
+
{{t "components.register.login-reset-label"}}<br/>
|
60
|
+
{{#if showLoginButton}}
|
61
|
+
<button class="ui login-button button"
|
62
|
+
title={{t "components.register.login-button-title"}}
|
63
|
+
{{action "login"}}>
|
64
|
+
{{t "components.register.login-button-text"}}
|
65
|
+
</button>
|
66
|
+
{{/if}}
|
67
|
+
{{#if showPwdResetButton}}
|
68
|
+
<button class="ui pwd-reset-button button"
|
69
|
+
title={{t "components.register.pwd-reset-button-title"}}
|
70
|
+
{{action "pwdReset"}}>
|
71
|
+
{{t "components.register.pwd-reset-button-text"}}
|
72
|
+
</button>
|
73
|
+
{{/if}}
|
74
|
+
</div>
|
75
|
+
{{/if}}
|
@@ -1 +1 @@
|
|
1
|
-
User profile edit form
|
1
|
+
User profile edit form
|
package/app/templates/login.hbs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
<div class="flexberry-login">
|
2
|
-
<h3>{{t "forms.login.caption"}}</h3>
|
3
|
-
{{flexberry-login}}
|
4
|
-
</div>
|
5
|
-
|
1
|
+
<div class="flexberry-login">
|
2
|
+
<h3>{{t "forms.login.caption"}}</h3>
|
3
|
+
{{flexberry-login}}
|
4
|
+
</div>
|
5
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="flexberry-pwd-reset">
|
2
|
-
<h3>{{t "forms.pwd-reset.caption"}}</h3>
|
3
|
-
{{flexberry-pwd-reset}}
|
4
|
-
</div>
|
1
|
+
<div class="flexberry-pwd-reset">
|
2
|
+
<h3>{{t "forms.pwd-reset.caption"}}</h3>
|
3
|
+
{{flexberry-pwd-reset}}
|
4
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="flexberry-register">
|
2
|
-
<h3>{{t "forms.register.caption"}}</h3>
|
3
|
-
{{flexberry-register}}
|
4
|
-
</div>
|
1
|
+
<div class="flexberry-register">
|
2
|
+
<h3>{{t "forms.register.caption"}}</h3>
|
3
|
+
{{flexberry-register}}
|
4
|
+
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div class="flexberry-user-profile">
|
2
|
-
<h3>{{t "forms.user-profile.caption"}}</h3>
|
3
|
-
{{flexberry-user-profile}}
|
1
|
+
<div class="flexberry-user-profile">
|
2
|
+
<h3>{{t "forms.user-profile.caption"}}</h3>
|
3
|
+
{{flexberry-user-profile}}
|
4
4
|
</div>
|
@@ -1,43 +1,43 @@
|
|
1
|
-
/* globals module */
|
2
|
-
module.exports = {
|
3
|
-
afterInstall: function() {
|
4
|
-
var _this = this;
|
5
|
-
|
6
|
-
var env1 = ' var ENV = {' +
|
7
|
-
'\n recaptcha: {' +
|
8
|
-
'\n //These values are for automated tests.' +
|
9
|
-
'\n //Values are taken from https://developers.google.com/recaptcha/docs/faq' +
|
10
|
-
'\n //TODO: change them. These are not for production. Remember to change sekret key in backend!' +
|
11
|
-
'\n siteKey: \'6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\'' +
|
12
|
-
' },';
|
13
|
-
|
14
|
-
return _this.insertIntoFile(
|
15
|
-
'app/index.html',
|
16
|
-
'\n <script src="//cdn.polyfill.io/v1/polyfill.js?features=es6"></script> \n <script src="https://www.google.com/recaptcha/api.js"></script>',
|
17
|
-
{
|
18
|
-
after: '{{content-for "head"}}\n'
|
19
|
-
}
|
20
|
-
).then(function() {
|
21
|
-
return _this.insertIntoFile(
|
22
|
-
'config/environment.js',
|
23
|
-
'\n //Read more about CSP:' +
|
24
|
-
'// http://www.ember-cli.com/#content-security-policy' +
|
25
|
-
'// https://github.com/rwjblue/ember-cli-content-security-policy' +
|
26
|
-
'// http://content-security-policy.com' +
|
27
|
-
'ENV.contentSecurityPolicy = {' +
|
28
|
-
'\'style-src\': "\'self\' \'unsafe-inline\' https://fonts.googleapis.com",' +
|
29
|
-
'\'font-src\': "\'self\' data: https://fonts.gstatic.com",' +
|
30
|
-
'\'script-src\': "\'self\' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/",' +
|
31
|
-
'\'frame-src\': "\'self\' https://www.google.com/recaptcha/",' +
|
32
|
-
'\'connect-src\': "\'self\' " + ENV.APP.backendUrls.root' +
|
33
|
-
'};\n\n'
|
34
|
-
).then(function() {
|
35
|
-
return _this.insertIntoFile(
|
36
|
-
'config/environment.js',
|
37
|
-
env1);
|
38
|
-
});
|
39
|
-
});
|
40
|
-
},
|
41
|
-
|
42
|
-
normalizeEntityName: function() {}
|
43
|
-
};
|
1
|
+
/* globals module */
|
2
|
+
module.exports = {
|
3
|
+
afterInstall: function() {
|
4
|
+
var _this = this;
|
5
|
+
|
6
|
+
var env1 = ' var ENV = {' +
|
7
|
+
'\n recaptcha: {' +
|
8
|
+
'\n //These values are for automated tests.' +
|
9
|
+
'\n //Values are taken from https://developers.google.com/recaptcha/docs/faq' +
|
10
|
+
'\n //TODO: change them. These are not for production. Remember to change sekret key in backend!' +
|
11
|
+
'\n siteKey: \'6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI\'' +
|
12
|
+
' },';
|
13
|
+
|
14
|
+
return _this.insertIntoFile(
|
15
|
+
'app/index.html',
|
16
|
+
'\n <script src="//cdn.polyfill.io/v1/polyfill.js?features=es6"></script> \n <script src="https://www.google.com/recaptcha/api.js"></script>',
|
17
|
+
{
|
18
|
+
after: '{{content-for "head"}}\n'
|
19
|
+
}
|
20
|
+
).then(function() {
|
21
|
+
return _this.insertIntoFile(
|
22
|
+
'config/environment.js',
|
23
|
+
'\n //Read more about CSP:' +
|
24
|
+
'// http://www.ember-cli.com/#content-security-policy' +
|
25
|
+
'// https://github.com/rwjblue/ember-cli-content-security-policy' +
|
26
|
+
'// http://content-security-policy.com' +
|
27
|
+
'ENV.contentSecurityPolicy = {' +
|
28
|
+
'\'style-src\': "\'self\' \'unsafe-inline\' https://fonts.googleapis.com",' +
|
29
|
+
'\'font-src\': "\'self\' data: https://fonts.gstatic.com",' +
|
30
|
+
'\'script-src\': "\'self\' https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/",' +
|
31
|
+
'\'frame-src\': "\'self\' https://www.google.com/recaptcha/",' +
|
32
|
+
'\'connect-src\': "\'self\' " + ENV.APP.backendUrls.root' +
|
33
|
+
'};\n\n'
|
34
|
+
).then(function() {
|
35
|
+
return _this.insertIntoFile(
|
36
|
+
'config/environment.js',
|
37
|
+
env1);
|
38
|
+
});
|
39
|
+
});
|
40
|
+
},
|
41
|
+
|
42
|
+
normalizeEntityName: function() {}
|
43
|
+
};
|
package/config/environment.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/*jshint node:true*/
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
module.exports = function(/* environment, appConfig */) {
|
5
|
-
return { };
|
6
|
-
};
|
1
|
+
/*jshint node:true*/
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
module.exports = function(/* environment, appConfig */) {
|
5
|
+
return { };
|
6
|
+
};
|
package/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
/* jshint node: true */
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
module.exports = {
|
5
|
-
name: 'ember-flexberry-account'
|
6
|
-
};
|
1
|
+
/* jshint node: true */
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
module.exports = {
|
5
|
+
name: 'ember-flexberry-account'
|
6
|
+
};
|