Bug 1434078 - Devices actions links touch-ups. r?markh draft
authorEdouard Oger <eoger@fastmail.com>
Mon, 29 Jan 2018 17:11:16 -0500
changeset 748487 99438c556c52dd2f225c6816cc20cef78b84a93f
parent 748403 117e0c0d1ebe2cf5bdffc3474744add2416fc511
push id97187
push userbmo:eoger@fastmail.com
push dateMon, 29 Jan 2018 22:12:20 +0000
reviewersmarkh
bugs1434078
milestone60.0a1
Bug 1434078 - Devices actions links touch-ups. r?markh MozReview-Commit-ID: I0q915ku8o8
browser/components/preferences/in-content/sync.js
browser/components/preferences/in-content/sync.xul
browser/themes/shared/incontentprefs/preferences.inc.css
--- a/browser/components/preferences/in-content/sync.js
+++ b/browser/components/preferences/in-content/sync.js
@@ -324,20 +324,21 @@ var gSyncPane = {
       };
       img.src = state.avatarURL;
     }
     // The "manage account" link embeds the uid, so we need to update this
     // if the account state changes.
     fxAccounts.promiseAccountsManageURI(this._getEntryPoint()).then(accountsManageURI => {
       document.getElementById("verifiedManage").setAttribute("href", accountsManageURI);
     });
+    let isUnverified = state.status == UIState.STATUS_NOT_VERIFIED;
     // The mobile promo links - which one is shown depends on the number of devices.
     let isMultiDevice = Weave.Service.clientsEngine.stats.numClients > 1;
-    document.getElementById("mobilePromo-singledevice").hidden = isMultiDevice;
-    document.getElementById("mobilePromo-multidevice").hidden = !isMultiDevice;
+    document.getElementById("mobilePromo-singledevice").hidden = isUnverified || isMultiDevice;
+    document.getElementById("mobilePromo-multidevice").hidden = isUnverified || !isMultiDevice;
   },
 
   _getEntryPoint() {
     let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || "");
     return params.get("entrypoint") || "preferences";
   },
 
   openContentInBrowser(url, options) {
--- a/browser/components/preferences/in-content/sync.xul
+++ b/browser/components/preferences/in-content/sync.xul
@@ -200,20 +200,22 @@
                 accesskey="&cancelChangeSyncDeviceName.accesskey;"
                 hidden="true"/>
         <button id="fxaSaveChangeDeviceName"
                 label="&saveChangeSyncDeviceName.label;"
                 accesskey="&saveChangeSyncDeviceName.accesskey;"
                 hidden="true"/>
       </hbox>
     </groupbox>
-    <label id="mobilePromo-singledevice"
-           class="text-link fxaMobilePromo">&mobilepromo.singledevice;</label>
-    <label id="mobilePromo-multidevice"
-           class="text-link fxaMobilePromo">&mobilepromo.multidevice;</label>
+    <vbox align="start">
+      <label id="mobilePromo-singledevice"
+             class="text-link fxaMobilePromo">&mobilepromo.singledevice;</label>
+      <label id="mobilePromo-multidevice"
+             class="text-link fxaMobilePromo">&mobilepromo.multidevice;</label>
+    </vbox>
     <vbox id="tosPP-small" align="start">
       <label id="tosPP-small-ToS" class="text-link">
         &prefs.tosLink.label;
       </label>
       <label id="tosPP-small-PP" class="text-link">
         &fxaPrivacyNotice.link.label;
       </label>
     </vbox>
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -543,16 +543,20 @@ button > hbox > label {
   margin-bottom: 4px;
 }
 
 #fxaChangeDeviceName {
   margin-top: 4px;
   margin-bottom: 4px;
 }
 
+#tosPP-small {
+  margin-top: 32px;
+}
+
 #tosPP-small-ToS {
   margin-bottom: 14px;
 }
 
 #noFxaCaption {
   line-height: 30px;
   margin-top: 0;
   margin-bottom: 4px;
@@ -603,17 +607,17 @@ button > hbox > label {
   margin-inline-end: 8px;
 }
 
 #fxaSyncEngines > vbox > checkbox {
   max-width: 224px;
 }
 
 .fxaMobilePromo {
-  margin: 2px 0 32px 0 !important;
+  margin-top: 2px !important;
 }
 
 .androidLink {
   list-style-image: url("chrome://browser/skin/preferences/in-content/logo-android.svg");
 }
 
 .iOSLink {
   list-style-image: url("chrome://browser/skin/preferences/in-content/logo-ios.svg");