Skip to content
This repository was archived by the owner on Apr 3, 2019. It is now read-only.

Commit 8f9588a

Browse files
committed
feat(service): connect another service
1 parent 28fb71f commit 8f9588a

File tree

11 files changed

+143
-1
lines changed

11 files changed

+143
-1
lines changed
11.3 KB
Loading
2.34 KB
Loading
62.5 KB
Loading
54.1 KB
Loading

app/scripts/lib/router.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import CompleteSignUpView from '../views/complete_sign_up';
2424
import ConfirmResetPasswordView from '../views/confirm_reset_password';
2525
import ConfirmView from '../views/confirm';
2626
import ConnectAnotherDeviceView from '../views/connect_another_device';
27+
import ConnectAnotherServiceView from '../views/connect_another_service';
2728
import CookiesDisabledView from '../views/cookies_disabled';
2829
import DeleteAccountView from '../views/settings/delete_account';
2930
import DisplayNameView from '../views/settings/display_name';
@@ -108,6 +109,7 @@ const Router = Backbone.Router.extend({
108109
'confirm_signin(/)': createViewHandler(ConfirmView, { type: VerificationReasons.SIGN_IN }),
109110
'connect_another_device(/)': createViewHandler(ConnectAnotherDeviceView),
110111
'connect_another_device/why(/)': createChildViewHandler(WhyConnectAnotherDeviceView, ConnectAnotherDeviceView),
112+
'connect_another_service(/)': createViewHandler(ConnectAnotherServiceView),
111113
'cookies_disabled(/)': createViewHandler(CookiesDisabledView),
112114
'force_auth(/)': createViewHandler(ForceAuthView),
113115
'legal(/)': createViewHandler('legal'),
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<div id="main-content" class="card connect-another-service">
2+
<header id="fxa-connect-another-service-header"><h1>{{#t}}Connect another service{{/t}}</h1></header>
3+
4+
<p>Do more with your Firefox Account with these new services.</p>
5+
6+
{{#connect-services}}
7+
<div class="connect-service">
8+
<div class="image-container">
9+
<div class="image" data="{{name}}"></div>
10+
</div>
11+
<div class="content">
12+
<div class="service-name">{{name}}</div>
13+
<div class="service-description">{{description}}</div>
14+
</div>
15+
<div class="service-links">
16+
<a class="service-link" target="_blank" href="{{link}}">Connect</a>
17+
</div>
18+
</div>
19+
{{/connect-services}}
20+
21+
<div class="links">
22+
<a href="/connect_another_device">Not now</a>
23+
</div>
24+
</div>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import Cocktail from 'cocktail';
6+
import BaseView from './base';
7+
import Template from 'templates/connect_another_service.mustache';
8+
9+
const View = BaseView.extend({
10+
className: 'connect-another-service',
11+
template: Template,
12+
13+
setInitialContext (context) {
14+
const services = [
15+
{
16+
description: 'A Secure Notepad App.',
17+
image: 'notes',
18+
link: 'https://play.google.com/store/apps/details?id=org.mozilla.testpilot.notes&hl=en',
19+
name: 'Notes',
20+
},
21+
{
22+
description: 'Save articles, videos and stories from any publication, page or app.',
23+
image: 'pocket',
24+
link: 'https://getpocket.com/ff_signin?s=pocket&t=login',
25+
name: 'Pocket',
26+
},
27+
{
28+
description: 'Take your passwords everywhere with Firefox Lockbox.',
29+
image: 'lockbox',
30+
link: 'https://itunes.apple.com/us/app/firefox-lockbox/id1314000270?mt=8',
31+
name: 'Lockbox',
32+
},
33+
{
34+
description: 'Detects threats against your online accounts.',
35+
image: 'monitor',
36+
link: 'https://monitor.firefox.com/',
37+
name: 'Monitor',
38+
}
39+
];
40+
41+
context.set({
42+
'connect-services': services
43+
});
44+
},
45+
});
46+
47+
48+
Cocktail.mixin(
49+
View,
50+
);
51+
52+
module.exports = View;

app/scripts/views/mixins/connect-another-device-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ define(function(require, exports, module) {
9494
*/
9595
replaceCurrentPageWithAppsScreen (account, showSuccessMessage) {
9696
console.log('connect-another-device-mixin::replaceCurrentPageWithAppsScreen');
97-
this.replaceCurrentPage('connect_another_app', { account, showSuccessMessage });
97+
this.replaceCurrentPage('connect_another_service', { account, showSuccessMessage });
9898
},
9999

100100
/**

app/styles/_modules.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import '../../node_modules/jquery-modal/jquery.modal';
22
@import 'modules/iframe';
33
@import 'modules/branding';
4+
@import 'modules/connect-another-service';
45
@import 'modules/tooltip';
56
@import 'modules/input-row';
67
@import 'modules/select-row';
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.connect-another-service {
2+
.connect-service {
3+
display: flex;
4+
flex-direction: row;
5+
margin-bottom: 10px;
6+
7+
.image-container {
8+
align-self: center;
9+
10+
.image {
11+
background-image: url('/images/icon-device-laptop.svg');
12+
background-repeat: no-repeat;
13+
background-size: cover;
14+
height: 42px;
15+
width: 42px;
16+
17+
&[data='Lockbox'] {
18+
background-image: url('/images/connect_another_service/lockbox.png');
19+
}
20+
21+
&[data='Pocket'] {
22+
background-image: url('/images/connect_another_service/pocket.png');
23+
}
24+
25+
&[data='Notes'] {
26+
background-image: url('/images/connect_another_service/notes.png');
27+
}
28+
29+
&[data='Monitor'] {
30+
background-image: url('/images/connect_another_service/monitor.png');
31+
}
32+
}
33+
}
34+
35+
.content {
36+
align-self: center;
37+
line-height: 1.3;
38+
margin-left: 10px;
39+
margin-right: 10px;
40+
text-align: left;
41+
width: 80%;
42+
43+
.service-name {
44+
font-size: 18px;
45+
}
46+
47+
.service-description {
48+
font-size: 12px;
49+
}
50+
}
51+
52+
.service-links {
53+
align-self: center;
54+
justify-content: flex-end;
55+
56+
.service-link {
57+
color: #008000;
58+
font-size: 12px;
59+
}
60+
}
61+
}
62+
}

0 commit comments

Comments
 (0)