Skip to content

Commit

Permalink
feat(cad): Update CAD pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vbudhram committed Sep 23, 2024
1 parent 8dab06e commit 83f6e2e
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{{/isSignedIn}}
{{/showSuccessMessage}}
<section>
<div class="{{graphicId}}" role="img" aria-label="{{#t}}Devices with hearts on their screens{{/t}}"></div>
<div class="bg-image-triple-device-hearts" role="img" aria-label="{{#t}}Devices with hearts on their screens{{/t}}"></div>
{{#showSuccessMessage}}
{{#isSignedIn}}
{{#isFirefoxDesktop}}
Expand Down Expand Up @@ -65,33 +65,10 @@
{{/isSignedIn}}
</p>
{{/isFirefoxDesktop}}
{{#isFirefoxIos}}
<!-- user verifies in Fx for iOS, assume they are not signed in -->
<p id="signin-fxios">
{{#t}}Still adding devices? Sign in to Firefox on another device to complete set-up{{/t}}
</p>
{{/isFirefoxIos}}
{{#isOtherAndroid}}
<!-- Another android browser, encourage Fx for Android installation -->
<p id="install-mobile-firefox-android">
{{#t}}Sign in to Firefox for Android to complete set-up{{/t}}
</p>
{{/isOtherAndroid}}
{{#isOtherIos}}
<!-- Safari or Chrome for iOS, encourage installation of Fx -->
<p id="install-mobile-firefox-ios">
{{#t}}Sign in to Firefox for iOS to complete set-up{{/t}}
</p>
{{/isOtherIos}}
{{#isOther}}
<!-- probably some desktop browser -->
<p id="install-mobile-firefox-other">
{{#isSignIn}}
{{#t}}Still adding devices?{{/t}}
{{/isSignIn}}
{{#t}}Sign in to Firefox on another device to complete set-up{{/t}}
</p>
{{/isOther}}

{{#isMobileAndSignedIn}}
{{{ unsupportedPairHtml }}}
{{/isMobileAndSignedIn}}

{{^isFirefoxDesktop}}
<div class="marketing-area"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{#isMobile}}
{{#isSystemCameraUrl}}
<div class="bg-image-pair-fail"></div>
<h2 id="pair-unsupported-header" class="card-header" tabindex="-1">{{#t}}Pair using an app{{/t}}</h1>
<h2 id="pair-unsupported-header" class="card-header" tabindex="-1">{{#t}}Pair using an app{{/t}}</h2>
<p class="mt-4">{{#t}}Did you use the system camera? You must pair from within a Firefox app.{{/t}}</p>
{{/isSystemCameraUrl}}
{{^isSystemCameraUrl}}
Expand All @@ -37,11 +37,9 @@
{{/isFirefox}}

<div class="bg-image-triple-device-hearts" role="img" aria-label="{{#t}}Devices with hearts on their screens{{/t}}"></div>
{{{ unsupportedPairHtml }}}

<h1 class="card-header">{{#t}}Connecting your mobile device with your Mozilla account{{/t}}</h1>
<p class="mt-4 text-base">Open Firefox on your computer, visit <b class="whitespace-nowrap">firefox.com/pair</b>, and follow the on-screen instructions to connect your mobile device.</p>
<p class="mt-3"><a href="https://support.mozilla.org/kb/how-do-i-set-sync-my-computer" target="_blank" class="link-blue" data-glean-id="cad_redirect_mobile_learn_more">{{#t}}Learn more{{/t}}</a></p>
{{/isSystemCameraUrl}}
{{/isSystemCameraUrl}}
{{/isMobile}}
{{^isMobile}}
{{^isDesktopNonFirefox}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1 class="card-header">{{#t}}Connecting your mobile device with your Mozilla account{{/t}}</h1>
<p class="mt-4 text-base">Open Firefox on your computer, visit <b class="whitespace-nowrap">firefox.com/pair</b>, and
follow the on-screen instructions to connect your mobile device.</p>
<p class="mt-3"><a href="https://support.mozilla.org/kb/how-do-i-set-sync-my-computer" target="_blank" class="link-blue"
data-glean-id="cad_redirect_mobile_learn_more">{{#t}}Learn more{{/t}}</a></p>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import MarketingMixin from './mixins/marketing-mixin';
import PairingGraphicsMixin from './mixins/pairing-graphics-mixin';
import SyncAuthMixin from './mixins/sync-auth-mixin';
import VerificationReasonMixin from './mixins/verification-reason-mixin';
import UnsupportedPairTemplate from '../templates/partial/unsupported-pair.mustache';

const entrypoints = Object.keys(Constants)
.filter((k) => k.endsWith('_ENTRYPOINT'))
Expand Down Expand Up @@ -192,7 +193,9 @@ const ConnectAnotherDeviceView = FormView.extend({
isSignIn,
isSignUp,
pairingUrl,
isMobileAndSignedIn: this.getUserAgent().isMobile() && this._isSignedIn(),
showSuccessMessage,
unsupportedPairHtml: this.renderTemplate(UnsupportedPairTemplate),
});
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Template from '../../templates/pair/unsupported.mustache';
import GleanMetrics from '../../lib/glean';
import UserAgentMixin from '../../lib/user-agent-mixin';
import UrlMixin from 'lib/url-mixin';
import UnsupportedPairTemplate from '../../templates/partial/unsupported-pair.mustache';

class PairUnsupportedView extends FormView {
template = Template;
Expand Down Expand Up @@ -53,6 +54,7 @@ class PairUnsupportedView extends FormView {
isSystemCameraUrl,
escapedMobileDownloadLink,
showCADHeader: !(isMobile && !isSystemCameraUrl),
unsupportedPairHtml: this.renderTemplate(UnsupportedPairTemplate),
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/fxa-settings/src/pages/Signin/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export function getSyncNavigate(

searchParams.set('showSuccessMessage', 'true');
return {
to: `/connect_another_device?${searchParams}`,
to: `/pair?${searchParams}`,
shouldHardNavigate: true,
};
}
Expand Down

0 comments on commit 83f6e2e

Please sign in to comment.