browser/components/preferences/in-content/sync.xul
author Mark Hammond <mhammond@skippinet.com.au>
Thu, 12 Jul 2018 23:26:15 +0000
changeset 480466 d7ab2f3df0840cdb8557659afd46f61afa310379
parent 470476 c7c5fd50d1756369638cac12f446faa84b0d29ec
child 506620 004331df8823ee887cc787e29ef7efe4fa4e596f
permissions -rwxr-xr-x
Bug 1471906 - ensure FxA error icons are centered to prevent distortion. r=eoger a=lizzard MozReview-Commit-ID: FzRiQzVoryK Differential Revision: https://phabricator.services.mozilla.com/D2091

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

<!-- Sync panel -->

<script type="application/javascript"
        src="chrome://browser/content/preferences/in-content/sync.js"/>

<hbox id="firefoxAccountCategory"
      class="subcategory"
      hidden="true"
      data-category="paneSync">
  <label class="header-name" flex="1" data-l10n-id="pane-sync-title" />
</hbox>

<deck id="weavePrefsDeck" data-category="paneSync" hidden="true"
      data-hidden-from-search="true">
  <groupbox id="noFxaAccount">
    <hbox>
      <vbox flex="1">
        <caption><label id="noFxaCaption" data-l10n-id="sync-signedout-caption"/></caption>
        <description id="noFxaDescription" flex="1" data-l10n-id="sync-signedout-description"/>
      </vbox>
      <vbox>
        <image class="fxaSyncIllustration"/>
      </vbox>
    </hbox>
    <hbox id="fxaNoLoginStatus" align="center" flex="1">
      <vbox>
        <image class="fxaProfileImage"/>
      </vbox>
      <vbox flex="1">
        <hbox align="center" flex="1">
          <hbox align="center" flex="1">
            <caption><label id="signedOutAccountBoxTitle" data-l10n-id="sync-signedout-account-title"/></caption>
          </hbox>
          <button id="noFxaSignIn"
                  class="accessory-button"
                  data-l10n-id="sync-signedout-account-signin"/>
        </hbox>
        <hbox align="center" flex="1">
          <html:a id="noFxaSignUp"
                  class="openLink"
                  data-l10n-id="sync-signedout-account-create" />
        </hbox>
      </vbox>
    </hbox>
    <label class="fxaMobilePromo" data-l10n-id="sync-mobile-promo">
      <html:img
        src="chrome://browser/skin/preferences/in-content/logo-android.svg"
        data-l10n-name="android-icon"
        class="androidIcon"/>
      <html:a
        id="fxaMobilePromo-android"
        data-l10n-name="android-link"
        class="text-link" target="_blank"/>
      <html:img
        src="chrome://browser/skin/preferences/in-content/logo-ios.svg"
        data-l10n-name="ios-icon"
        class="iOSIcon"/>
      <html:a
        id="fxaMobilePromo-ios"
        data-l10n-name="ios-link"
        class="text-link" target="_blank"/>
    </label>
  </groupbox>

  <vbox id="hasFxaAccount">
    <hbox>
      <vbox id="fxaContentWrapper" flex="1">
        <groupbox id="fxaGroup">
          <caption class="search-header" hidden="true"><label data-l10n-id="pane-sync-title"/></caption>

          <deck id="fxaLoginStatus" flex="1">

            <!-- logged in and verified and all is good -->
            <hbox id="fxaLoginVerified" align="center" flex="1">
              <image class="fxaProfileImage actionable"
                     role="button"
                     onclick="gSyncPane.openChangeProfileImage(event);"
                     onkeypress="gSyncPane.openChangeProfileImage(event);"
                     data-l10n-id="sync-profile-picture"/>
              <vbox flex="1" pack="center">
                <hbox flex="1" align="baseline">
                  <caption><label id="fxaDisplayName" hidden="true"/></caption>
                  <label id="fxaEmailAddress" flex="1" crop="end"/>
                  <button id="fxaUnlinkButton"
                          class="accessory-button"
                          data-l10n-id="sync-disconnect"/>
                </hbox>
                <hbox>
                  <html:a id="verifiedManage" class="openLink"
                          data-l10n-id="sync-manage-account"
                          onkeypress="gSyncPane.openManageFirefoxAccount(event);"/>
                </hbox>
              </vbox>
            </hbox>

            <!-- logged in to an unverified account -->
            <hbox id="fxaLoginUnverified">
              <vbox>
                <image class="fxaProfileImage"/>
              </vbox>
              <vbox flex="1" pack="center">
                <hbox align="center">
                  <image class="fxaLoginRejectedWarning"/>
                  <description flex="1"
                    class="l10nArgsEmailAddress"
                    data-l10n-id="sync-signedin-unverified"
                    data-l10n-args='{"email": ""}'/>
                </hbox>
                <hbox class="fxaAccountBoxButtons">
                  <button id="verifyFxaAccount" data-l10n-id="sync-resend-verification"/>
                  <button id="unverifiedUnlinkFxaAccount" data-l10n-id="sync-remove-account"/>
                </hbox>
              </vbox>
            </hbox>

            <!-- logged in locally but server rejected credentials -->
            <hbox id="fxaLoginRejected">
              <vbox>
                <image class="fxaProfileImage"/>
              </vbox>
              <vbox flex="1" pack="center">
                <hbox align="center">
                  <image class="fxaLoginRejectedWarning"/>
                  <description flex="1"
                    class="l10nArgsEmailAddress"
                    data-l10n-id="sync-signedin-login-failure"
                    data-l10n-args='{"email": ""}'/>
                </hbox>
                <hbox class="fxaAccountBoxButtons">
                  <button id="rejectReSignIn" data-l10n-id="sync-sign-in"/>
                  <button id="rejectUnlinkFxaAccount" data-l10n-id="sync-remove-account"/>
                </hbox>
              </vbox>
            </hbox>
          </deck>
        </groupbox>
        <groupbox id="syncOptions">
          <caption><label data-l10n-id="sync-signedin-settings-header"/></caption>
          <description data-l10n-id="sync-signedin-settings-desc"/>
          <hbox id="fxaSyncEngines">
            <vbox flex="1">
              <!-- by design, no tooltip for bookmarks or history -->
              <checkbox data-l10n-id="sync-engine-bookmarks"
                        preference="engine.bookmarks"/>
              <checkbox data-l10n-id="sync-engine-history"
                        preference="engine.history"/>
              <checkbox data-l10n-id="sync-engine-tabs"
                        preference="engine.tabs"/>
              <checkbox data-l10n-id="sync-engine-logins"
                        preference="engine.passwords"/>
            </vbox>
            <vbox flex="1">
              <checkbox data-l10n-id="sync-engine-addresses"
                        preference="engine.addresses"/>
              <checkbox data-l10n-id="sync-engine-creditcards"
                        preference="engine.creditcards"/>
              <checkbox data-l10n-id="sync-engine-addons"
                        preference="engine.addons"/>
              <checkbox data-l10n-id="sync-engine-prefs"
                        preference="engine.prefs"/>
            </vbox>
            <spacer/>
          </hbox>
        </groupbox>
      </vbox>
    </hbox>
    <groupbox>
      <caption>
        <label control="fxaSyncComputerName" data-l10n-id="sync-device-name-header"/>
      </caption>
      <hbox id="fxaDeviceName">
        <textbox id="fxaSyncComputerName" flex="1" disabled="true"/>
        <button id="fxaChangeDeviceName"
                data-l10n-id="sync-device-name-change"/>
        <button id="fxaCancelChangeDeviceName"
                data-l10n-id="sync-device-name-cancel"
                hidden="true"/>
        <button id="fxaSaveChangeDeviceName"
                data-l10n-id="sync-device-name-save"
                hidden="true"/>
      </hbox>
    </groupbox>
    <vbox align="start">
      <label id="mobilePromo-singledevice"
             class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-single"/>
      <label id="mobilePromo-multidevice"
             class="text-link fxaMobilePromo" data-l10n-id="sync-mobilepromo-multi"/>
    </vbox>
    <vbox id="tosPP-small" align="start">
      <label id="tosPP-small-ToS" class="text-link" data-l10n-id="sync-tos-link"/>
      <label id="tosPP-small-PP" class="text-link" data-l10n-id="sync-fxa-privacy-notice"/>
    </vbox>
  </vbox>
</deck>