browser/components/preferences/in-content/sync.xul
author Edouard Oger <edouard.oger@gmail.com>
Thu, 06 Aug 2015 10:25:00 -0400
changeset 288458 3e6d4d0f2e268ce676c0d9c77b523e79aed7c394
parent 288453 ff027361bff1cf7afcbca49714bbd369b3297f7b
child 288859 96cdc9bfc6512fc7db6b2748e38dc6bacf273971
permissions -rw-r--r--
Bug 1191898 - In sync prefs, legal links should not be blocks. r=markh

# 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 -->

<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync"
             onchange="gSyncPane.onPreferenceChanged();">
  <preference id="engine.addons"
              name="services.sync.engine.addons"
              type="bool"/>
  <preference id="engine.bookmarks"
              name="services.sync.engine.bookmarks"
              type="bool"/>
  <preference id="engine.history"
              name="services.sync.engine.history"
              type="bool"/>
  <preference id="engine.tabs"
              name="services.sync.engine.tabs"
              type="bool"/>
  <preference id="engine.prefs"
              name="services.sync.engine.prefs"
              type="bool"/>
  <preference id="engine.passwords"
              name="services.sync.engine.passwords"
              type="bool"/>
</preferences>

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

<hbox id="header-sync"
      class="header"
      hidden="true"
      data-category="paneSync">
  <label class="header-name">&paneSync.title;</label>
</hbox>

<hbox id="sync-migration-container"
       data-category="paneSync"
       hidden="true">

  <vbox id="sync-migration" flex="1" hidden="true">

    <deck id="sync-migration-deck">
      <!-- When we are in the "need FxA user" state -->
      <hbox align="center">
        <description id="sync-migrate-upgrade-description" flex="1"/>
        <spacer flex="1"/>
        <button id="sync-migrate-unlink"/>
        <button id="sync-migrate-upgrade"/>
      </hbox>

      <!-- When we are in the "need the user to be verified" state -->
      <hbox align="center">
        <label id="sync-migrate-verify-label"/>
        <spacer flex="1"/>
        <button id="sync-migrate-forget"/>
        <button id="sync-migrate-resend"/>
      </hbox>
    </deck>
  </vbox>
</hbox>

<deck id="weavePrefsDeck" data-category="paneSync" hidden="true">
  <!-- These panels are for the "legacy" sync provider -->
  <vbox id="noAccount" align="center">
    <spacer flex="1"/>
    <description id="syncDesc">
      &weaveDesc.label;
    </description>
    <separator/>
    <label id="noAccountSetup" class="text-link">
      &setupButton.label;
    </label>
    <vbox id="pairDevice">
      <separator/>
      <label id="noAccountPair" class="text-link">
        &pairDevice.label;
      </label>
    </vbox>
    <spacer flex="3"/>
  </vbox>

  <vbox id="hasAccount">
    <groupbox class="syncGroupBox">
      <!-- label is set to account name -->
      <caption id="accountCaption" align="center">
        <image id="accountCaptionImage"/>
        <label id="accountName"/>
      </caption>

      <hbox>
        <button type="menu"
                label="&manageAccount.label;"
                accesskey="&manageAccount.accesskey;">
          <menupopup>
            <menuitem id="syncChangePassword" label="&changePassword2.label;"/>
            <menuitem id="syncResetPassphrase" label="&myRecoveryKey.label;"/>
            <menuseparator/>
            <menuitem id="syncReset" label="&resetSync2.label;"/>
          </menupopup>
        </button>
      </hbox>

      <hbox>
        <label id="syncAddDeviceLabel"
               class="text-link">
          &pairDevice.label;
        </label>
      </hbox>

      <vbox>
        <label>&syncMy.label;</label>
        <richlistbox id="syncEnginesList"
                     orient="vertical">
          <richlistitem>
            <checkbox label="&engine.addons.label;"
                      accesskey="&engine.addons.accesskey;"
                      preference="engine.addons"/>
          </richlistitem>
          <richlistitem>
            <checkbox label="&engine.bookmarks.label;"
                      accesskey="&engine.bookmarks.accesskey;"
                      preference="engine.bookmarks"/>
          </richlistitem>
          <richlistitem>
            <checkbox label="&engine.passwords.label;"
                      accesskey="&engine.passwords.accesskey;"
                      preference="engine.passwords"/>
          </richlistitem>
          <richlistitem>
            <checkbox label="&engine.prefs.label;"
                      accesskey="&engine.prefs.accesskey;"
                      preference="engine.prefs"/>
          </richlistitem>
          <richlistitem>
            <checkbox label="&engine.history.label;"
                      accesskey="&engine.history.accesskey;"
                      preference="engine.history"/>
          </richlistitem>
          <richlistitem>
            <checkbox label="&engine.tabs.label;"
                      accesskey="&engine.tabs.accesskey;"
                      preference="engine.tabs"/>
          </richlistitem>
        </richlistbox>
      </vbox>
    </groupbox>

    <groupbox class="syncGroupBox">
      <grid>
        <columns>
          <column/>
          <column flex="1"/>
        </columns>
        <rows>
          <row align="center">
            <label accesskey="&syncDeviceName.accesskey;"
                   control="syncComputerName">
              &syncDeviceName.label;
            </label>
            <textbox id="syncComputerName"/>
          </row>
        </rows>
      </grid>
      <hbox>
        <label id="unlinkDevice" class="text-link">
          &unlinkDevice.label;
        </label>
      </hbox>
    </groupbox>
    <vbox id="tosPP-normal">
      <label id="tosPP-normal-ToS" class="text-link">
        &prefs.tosLink.label;
      </label>
      <label id="tosPP-normal-PP" class="text-link">
        &prefs.ppLink.label;
      </label>
    </vbox>
  </vbox>

  <vbox id="needsUpdate" align="center" pack="center">
    <hbox>
      <label id="loginError"/>
      <label id="loginErrorUpdatePass" class="text-link">
        &updatePass.label;
      </label>
      <label id="loginErrorResetPass" class="text-link">
        &resetPass.label;
      </label>
    </hbox>
    <label id="loginErrorStartOver" class="text-link">
      &unlinkDevice.label;
    </label>
  </vbox>

  <!-- These panels are for the Firefox Accounts identity provider -->
  <vbox id="noFxaAccount">
    <hbox>
      <groupbox id="noFxaGroup">
        <vbox>
          <label id="noFxaCaption">&signedOut.caption;</label>
          <description id="noFxaDescription" flex="1">&signedOut.description;</description>
          <hbox class="fxaAccountBox">
            <image class="fxaFirefoxLogo"/>
            <vbox>
              <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label>
              <hbox>
                <button id="noFxaSignUp" label="&signedOut.accountBox.create;"/>
                <button id="noFxaSignIn" label="&signedOut.accountBox.signin;"/>
              </hbox>
            </vbox>
          </hbox>
        </vbox>
      </groupbox>
      <image class="fxaSyncIllustration"/>
    </hbox>
    <hbox class="fxaMobilePromo">
      <label>&mobilePromo.start;</label>
      <image class="androidLogo"/>
      <label class="text-link"
             href="https://www.mozilla.org/firefox/android/">
        &mobilePromo.androidLink;
      </label>
      <label>&mobilePromo.end;</label>
    </hbox>
    <label class="androidAttribution">&androidAttribution;</label>
  </vbox>

  <vbox id="hasFxaAccount">
    <hbox>
      <vbox>
        <groupbox id="fxaGroup">
          <caption><label>&syncBrand.fxAccount.label;</label></caption>

              <deck id="fxaLoginStatus">

                <!-- logged in and verified and all is good -->
                <hbox id="fxaLoginVerified" class="fxaAccountBox">
                  <image id="fxaProfileImage"
                      onclick="gSyncPane.openChangeProfileImage();" hidden="true"
                      tooltiptext="&profilePicture.tooltip;" class="actionable"/>
                  <vbox>
                    <label id="fxaEmailAddress1"/>
                    <label id="fxaDisplayName" hidden="true"/>
                    <hbox class="fxaAccountBoxButtons">
                      <button id="verifiedManage" label="&manage.label;"/>
                      <button id="fxaUnlinkButton" label="&disconnect.label;"/>
                    </hbox>
                  </vbox>
                </hbox>

                <!-- logged in to an unverified account -->
                <hbox id="fxaLoginUnverified" class="fxaAccountBox">
                  <image id="fxaProfileImage"/>
                  <vbox>
                    <hbox>
                      <vbox><image id="fxaLoginRejectedWarning"/></vbox>
                      <description>
                        &signedInUnverified.beforename.label;
                        <label id="fxaEmailAddress2"/>
                        &signedInUnverified.aftername.label;
                      </description>
                    </hbox>
                    <hbox class="fxaAccountBoxButtons">
                      <button id="verifyFxaAccount" label="&verify.label;"/>
                      <button id="unverifiedUnlinkFxaAccount" label="&forget.label;"/>
                    </hbox>
                  </vbox>
                </hbox>

                <!-- logged in locally but server rejected credentials -->
                <hbox id="fxaLoginRejected" class="fxaAccountBox">
                  <image id="fxaProfileImage"/>
                  <vbox>
                    <hbox>
                      <vbox><image id="fxaLoginRejectedWarning"/></vbox>
                      <description>
                        &signedInLoginFailure.beforename.label;
                        <label id="fxaEmailAddress3"/>
                        &signedInLoginFailure.aftername.label;
                      </description>
                    </hbox>
                    <hbox class="fxaAccountBoxButtons">
                      <button id="rejectReSignIn" label="&signIn.label;"/>
                      <button id="rejectUnlinkFxaAccount" label="&forget.label;"/>
                    </hbox>
                  </vbox>
                </hbox>
              </deck>
        </groupbox>
        <groupbox id="syncOptions">
          <caption><label>&signedIn.engines.label;</label></caption>
          <hbox id="fxaSyncEngines">
            <vbox align="start">
              <checkbox label="&engine.tabs.label;"
                        accesskey="&engine.tabs.accesskey;"
                        preference="engine.tabs"/>
              <checkbox label="&engine.bookmarks.label;"
                        accesskey="&engine.bookmarks.accesskey;"
                        preference="engine.bookmarks"/>
              <checkbox label="&engine.passwords.label;"
                        accesskey="&engine.passwords.accesskey;"
                        preference="engine.passwords"/>
            </vbox>
            <vbox align="start">
              <checkbox label="&engine.history.label;"
                        accesskey="&engine.history.accesskey;"
                        preference="engine.history"/>
              <checkbox label="&engine.addons.label;"
                        accesskey="&engine.addons.accesskey;"
                        preference="engine.addons"/>
              <checkbox label="&engine.prefs.label;"
                        accesskey="&engine.prefs.accesskey;"
                        preference="engine.prefs"/>
            </vbox>
            <spacer/>
          </hbox>
        </groupbox>
      </vbox>
      <spacer flex="1"/>
      <image class="fxaSyncIllustration"/>
    </hbox>
    <spacer class="separator"/>
    <groupbox>
      <caption>
        <label accesskey="&syncDeviceName.accesskey;"
               control="fxaSyncComputerName">
          &fxaSyncDeviceName.label;
        </label>
      </caption>
      <hbox id="fxaDeviceName">
        <hbox>
          <textbox id="fxaSyncComputerName" disabled="true" flex="1"/>
        </hbox>
        <spacer flex="1"/>
        <hbox>
          <button id="fxaChangeDeviceName"
                  label="&changeSyncDeviceName.label;"/>
          <button id="fxaCancelChangeDeviceName"
                  label="&cancelChangeSyncDeviceName.label;"
                  hidden="true"/>
          <button id="fxaSaveChangeDeviceName"
                  label="&saveChangeSyncDeviceName.label;"
                  hidden="true"/>
        </hbox>
      </hbox>
    </groupbox>
    <spacer class="separator"/>
    <hbox class="fxaMobilePromo">
      <label>&mobilePromo.start;</label>
      <image class="androidLogo"/>
      <label class="text-link"
             href="https://www.mozilla.org/firefox/android/">
        &mobilePromo.androidLink;
      </label>
      <label>&mobilePromo.end;</label>
    </hbox>
    <spacer flex="1"/>
    <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>
    <label class="androidAttribution">&androidAttribution;</label>
  </vbox>
</deck>