Bug 1418466 - Add Connect Another Device button to relevant Sync UI. r=dao,markh

MozReview-Commit-ID: 5vBKH9NejVV

--HG--
extra : rebase_source : c160a5a1d7753d41c7afec3a822aefa9461684e6
This commit is contained in:
Edouard Oger 2017-11-17 16:48:17 -05:00
Родитель 99b58138da
Коммит ae62aef149
16 изменённых файлов: 97 добавлений и 183 удалений

Просмотреть файл

@ -1435,6 +1435,8 @@ pref("identity.fxaccounts.remote.oauth.uri", "https://oauth.accounts.firefox.com
// Token server used by the FxA Sync identity.
pref("identity.sync.tokenserver.uri", "https://token.services.mozilla.com/1.0/sync/1.5");
// The URL to a page that explains how to connect another device to Sync.
pref("identity.fxaccounts.remote.connectdevice.uri", "https://accounts.firefox.com/connect_another_device?service=sync&context=fx_desktop_v3");
// URLs for promo links to mobile browsers. Note that consumers are expected to
// append a value for utm_campaign.
pref("identity.mobilepromo.android", "https://www.mozilla.org/firefox/android/?utm_source=firefox-browser&utm_medium=firefox-browser&utm_campaign=");

Просмотреть файл

@ -274,6 +274,12 @@ var gSync = {
});
},
openConnectAnotherDevice(entryPoint) {
let url = new URL(Services.prefs.getCharPref("identity.fxaccounts.remote.connectdevice.uri"));
url.searchParams.append("entrypoint", entryPoint);
openUILinkIn(url.href, "tab");
},
openSendToDevicePromo() {
let url = Services.prefs.getCharPref("app.productInfo.baseURL");
url += "send-tabs/?utm_source=" + Services.appinfo.name.toLowerCase();
@ -363,25 +369,24 @@ var gSync = {
_appendSendTabSingleDevice(fragment, createDeviceNodeFn) {
const noDevices = this.fxaStrings.GetStringFromName("sendTabToDevice.singledevice.status");
const learnMore = this.fxaStrings.GetStringFromName("sendTabToDevice.singledevice");
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, noDevices, learnMore, () => {
this.openSendToDevicePromo();
});
const connectDevice = this.fxaStrings.GetStringFromName("sendTabToDevice.connectdevice");
const actions = [{label: connectDevice, command: () => this.openConnectAnotherDevice("sendtab")},
{label: learnMore, command: () => this.openSendToDevicePromo()}];
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, noDevices, actions);
},
_appendSendTabVerify(fragment, createDeviceNodeFn) {
const notVerified = this.fxaStrings.GetStringFromName("sendTabToDevice.verify.status");
const verifyAccount = this.fxaStrings.GetStringFromName("sendTabToDevice.verify");
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notVerified, verifyAccount, () => {
this.openPrefs("sendtab");
});
const actions = [{label: verifyAccount, command: () => this.openPrefs("sendtab")}];
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notVerified, actions);
},
_appendSendTabUnconfigured(fragment, createDeviceNodeFn) {
const notConnected = this.fxaStrings.GetStringFromName("sendTabToDevice.unconfigured.status");
const learnMore = this.fxaStrings.GetStringFromName("sendTabToDevice.unconfigured");
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notConnected, learnMore, () => {
this.openSendToDevicePromo();
});
const actions = [{label: learnMore, command: () => this.openSendToDevicePromo()}];
this._appendSendTabInfoItems(fragment, createDeviceNodeFn, notConnected, actions);
// Now add a 'sign in to sync' item above the 'learn more' item.
const signInToSync = this.fxaStrings.GetStringFromName("sendTabToDevice.signintosync");
@ -398,7 +403,7 @@ var gSync = {
fragment.insertBefore(signInItem, fragment.lastChild);
},
_appendSendTabInfoItems(fragment, createDeviceNodeFn, statusLabel, actionLabel, actionCommand) {
_appendSendTabInfoItems(fragment, createDeviceNodeFn, statusLabel, actions) {
const status = createDeviceNodeFn(null, statusLabel, null);
status.setAttribute("label", statusLabel);
status.setAttribute("disabled", true);
@ -409,11 +414,13 @@ var gSync = {
separator.classList.add("sync-menuitem");
fragment.appendChild(separator);
const actionItem = createDeviceNodeFn(null, actionLabel, null);
actionItem.addEventListener("command", actionCommand, true);
actionItem.classList.add("sync-menuitem");
actionItem.setAttribute("label", actionLabel);
fragment.appendChild(actionItem);
for (let {label, command} of actions) {
const actionItem = createDeviceNodeFn(null, label, null);
actionItem.addEventListener("command", command, true);
actionItem.classList.add("sync-menuitem");
actionItem.setAttribute("label", label);
fragment.appendChild(actionItem);
}
},
isSendableURI(aURISpec) {

Просмотреть файл

@ -38,6 +38,7 @@ add_task(async function test_page_contextmenu_sendtab_no_remote_clients() {
checkPopup([
{ label: "No Devices Connected", disabled: true },
"----",
{ label: "Connect Another Device..." },
{ label: "Learn About Sending Tabs..." }
]);
await hideContentContextMenu();

Просмотреть файл

@ -436,6 +436,11 @@ add_task(async function sendToDevice_noDevices() {
disabled: true
},
null,
{
attrs: {
label: "Connect Another Device..."
}
},
{
attrs: {
label: "Learn About Sending Tabs..."

Просмотреть файл

@ -267,41 +267,6 @@ const CustomizableWidgets = [
obnode.setAttribute("element", "sync-status");
obnode.setAttribute("attribute", "syncstatus");
aNode.appendChild(obnode);
// A somewhat complicated dance to format the mobilepromo label.
let bundle = doc.getElementById("bundle_browser");
let formatArgs = ["android", "ios"].map(os => {
let link = doc.createElement("label");
link.textContent = bundle.getString(`appMenuRemoteTabs.mobilePromo.${os}`);
link.setAttribute("mobile-promo-os", os);
link.className = "text-link remotetabs-promo-link";
return link.outerHTML;
});
let promoParentElt = doc.getElementById("PanelUI-remotetabs-mobile-promo");
// Put it all together...
let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
// eslint-disable-next-line no-unsanitized/property
promoParentElt.innerHTML = contents;
// We manually manage the "click" event to open the promo links because
// allowing the "text-link" widget handle it has 2 problems: (1) it only
// supports button 0 and (2) it's tricky to intercept when it does the
// open and auto-close the panel. (1) can probably be fixed, but (2) is
// trickier without hard-coding here the knowledge of exactly what buttons
// it does support.
// So we allow left and middle clicks to open the link in a new tab and
// close the panel; not setting a "href" attribute prevents the text-link
// widget handling it, and we build the final URL in the click handler to
// make testing easier (ie, so tests can change the pref after the links
// were created and have the new pref value used.)
promoParentElt.addEventListener("click", e => {
let os = e.target.getAttribute("mobile-promo-os");
if (!os || e.button > 1) {
return;
}
let link = Services.prefs.getCharPref(`identity.mobilepromo.${os}`) + "synced-tabs";
doc.defaultView.openUILinkIn(link, "tab");
CustomizableUI.hidePanelForNode(e.target);
});
this._initialized = true;
},
onViewShowing(aEvent) {

Просмотреть файл

@ -438,7 +438,7 @@
</hbox>
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.tabsnotsyncing.label;</label>
<hbox pack="center">
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
<toolbarbutton class="PanelUI-remotetabs-button"
label="&appMenuRemoteTabs.openprefs.label;"
oncommand="gSync.openPrefs('synced-tabs');"/>
</hbox>
@ -455,8 +455,10 @@
<image class="fxaSyncIllustrationIssue"/>
</hbox>
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.noclients.subtitle;</label>
<!-- The inner HTML for PanelUI-remotetabs-mobile-promo is built at runtime -->
<label id="PanelUI-remotetabs-mobile-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"/>
<toolbarbutton id="PanelUI-remotetabs-connect-device-button"
class="PanelUI-remotetabs-button"
label="&appMenuRemoteTabs.connectdevice.label;"
oncommand="gSync.openConnectAnotherDevice('synced-tabs');"/>
</vbox>
</hbox>
</deck>
@ -471,7 +473,7 @@
observes="sync-setup-state">
<image class="fxaSyncIllustration"/>
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
<toolbarbutton class="PanelUI-remotetabs-button"
label="&appMenuRemoteTabs.signin.label;"
oncommand="gSync.openPrefs('synced-tabs');"/>
</vbox>
@ -485,7 +487,7 @@
observes="sync-reauth-state">
<image class="fxaSyncIllustrationIssue"/>
<label class="PanelUI-remotetabs-instruction-label">&appMenuRemoteTabs.notsignedin.label;</label>
<toolbarbutton class="PanelUI-remotetabs-prefs-button"
<toolbarbutton class="PanelUI-remotetabs-button"
label="&appMenuRemoteTabs.signin.label;"
oncommand="gSync.openPrefs('synced-tabs');"/>
</vbox>

Просмотреть файл

@ -87,7 +87,7 @@ async function openPrefsFromMenuPanel(expectedPanelId, entryPoint) {
ok(!subpanel.hidden, "sync setup element is visible");
// Find and click the "setup" button.
let setupButton = subpanel.querySelector(".PanelUI-remotetabs-prefs-button");
let setupButton = subpanel.querySelector(".PanelUI-remotetabs-button");
setupButton.click();
await new Promise(resolve => {
@ -145,59 +145,38 @@ add_task(async function() {
await openPrefsFromMenuPanel("PanelUI-remotetabs-reauthsync", "synced-tabs");
});
// Test the mobile promo links
// Test the Connect Another Device button
add_task(async function() {
// change the preferences for the mobile links.
Services.prefs.setCharPref("identity.mobilepromo.android", "http://example.com/?os=android&tail=");
Services.prefs.setCharPref("identity.mobilepromo.ios", "http://example.com/?os=ios&tail=");
Services.prefs.setCharPref("identity.fxaccounts.remote.connectdevice.uri", "http://example.com/connectdevice");
gSync.updateAllUI({ status: UIState.STATUS_SIGNED_IN, email: "foo@bar.com" });
let syncPanel = document.getElementById("PanelUI-remotetabs");
let links = syncPanel.querySelectorAll(".remotetabs-promo-link");
let button = document.getElementById("PanelUI-remotetabs-connect-device-button");
ok(button, "found the button");
is(links.length, 2, "found 2 links as expected");
// test each link and left and middle mouse buttons
for (let link of links) {
for (let button = 0; button < 2; button++) {
await document.getElementById("nav-bar").overflowable.show();
EventUtils.sendMouseEvent({ type: "click", button }, link, window);
// the panel should have been closed.
ok(!isOverflowOpen(), "click closed the panel");
// should be a new tab - wait for the load.
is(gBrowser.tabs.length, 2, "there's a new tab");
await new Promise(resolve => {
if (gBrowser.selectedBrowser.currentURI.spec == "about:blank") {
gBrowser.selectedBrowser.addEventListener("load", function(e) {
resolve();
}, {capture: true, once: true});
return;
}
// the new tab has already transitioned away from about:blank so we
// are good to go.
resolve();
});
let os = link.getAttribute("mobile-promo-os");
let expectedUrl = `http://example.com/?os=${os}&tail=synced-tabs`;
is(gBrowser.selectedBrowser.currentURI.spec, expectedUrl, "correct URL");
gBrowser.removeTab(gBrowser.selectedTab);
}
}
// test each link and right mouse button - should be a noop.
await document.getElementById("nav-bar").overflowable.show();
for (let link of links) {
EventUtils.sendMouseEvent({ type: "click", button: 2 }, link, window);
// the panel should still be open
ok(isOverflowOpen(), "panel remains open after right-click");
is(gBrowser.tabs.length, 1, "no new tab was opened");
}
await hideOverflow();
button.click();
// the panel should have been closed.
ok(!isOverflowOpen(), "click closed the panel");
// should be a new tab - wait for the load.
is(gBrowser.tabs.length, 2, "there's a new tab");
await new Promise(resolve => {
if (gBrowser.selectedBrowser.currentURI.spec == "about:blank") {
gBrowser.selectedBrowser.addEventListener("load", function(e) {
resolve();
}, {capture: true, once: true});
return;
}
// the new tab has already transitioned away from about:blank so we
// are good to go.
resolve();
});
Services.prefs.clearUserPref("identity.mobilepromo.android");
Services.prefs.clearUserPref("identity.mobilepromo.ios");
let expectedUrl = `http://example.com/connectdevice?entrypoint=synced-tabs`;
is(gBrowser.selectedBrowser.currentURI.spec, expectedUrl, "correct URL");
gBrowser.removeTab(gBrowser.selectedTab);
Services.prefs.clearUserPref("identity.fxaccounts.remote.connectdevice.uri");
});
// Test the "Sync Now" button

Просмотреть файл

@ -79,8 +79,7 @@ SyncedTabsDeckComponent.prototype = {
.catch(Cu.reportError);
this._deckView = new this._DeckView(this._window, this.tabListComponent, {
onAndroidClick: event => this.openAndroidLink(event),
oniOSClick: event => this.openiOSLink(event),
onConnectDeviceClick: event => this.openConnectDevice(event),
onSyncPrefClick: event => this.openSyncPrefs(event)
});
@ -151,22 +150,12 @@ SyncedTabsDeckComponent.prototype = {
.catch(Cu.reportError);
},
openAndroidLink(event) {
let href = Services.prefs.getCharPref("identity.mobilepromo.android") + "synced-tabs-sidebar";
this._openUrl(href, event);
},
openiOSLink(event) {
let href = Services.prefs.getCharPref("identity.mobilepromo.ios") + "synced-tabs-sidebar";
this._openUrl(href, event);
},
_openUrl(url, event) {
this._window.openUILink(url, event);
},
openSyncPrefs() {
this._getChromeWindow(this._window).gSync.openPrefs("tabs-sidebar");
}
},
openConnectDevice() {
this._getChromeWindow(this._window).gSync.openConnectAnotherDevice("tabs-sidebar");
},
};

Просмотреть файл

@ -6,8 +6,6 @@
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
let { getChromeWindow } = Cu.import("resource:///modules/syncedtabs/util.js", {});
let log = Cu.import("resource://gre/modules/Log.jsm", {})
.Log.repository.getLogger("Sync.RemoteTabs");
@ -54,31 +52,10 @@ SyncedTabsDeckView.prototype = {
deck.appendChild(tabListWrapper);
this.container.appendChild(deck);
this._generateDevicePromo();
this._attachListeners();
this.update(state);
},
_getBrowserBundle() {
return getChromeWindow(this._window).document.getElementById("bundle_browser");
},
_generateDevicePromo() {
let bundle = this._getBrowserBundle();
let formatArgs = ["android", "ios"].map(os => {
let link = this._doc.createElement("a");
link.textContent = bundle.getString(`appMenuRemoteTabs.mobilePromo.${os}`);
link.className = `${os}-link text-link`;
link.setAttribute("href", "#");
return link.outerHTML;
});
// Put it all together...
let contents = bundle.getFormattedString("appMenuRemoteTabs.mobilePromo.text2", formatArgs);
// eslint-disable-next-line no-unsanitized/property
this.container.querySelector(".device-promo").innerHTML = contents;
},
destroy() {
this._tabListComponent.uninit();
this.container.remove();
@ -106,12 +83,11 @@ SyncedTabsDeckView.prototype = {
},
_attachListeners() {
this.container.querySelector(".android-link").addEventListener("click", this.props.onAndroidClick);
this.container.querySelector(".ios-link").addEventListener("click", this.props.oniOSClick);
let syncPrefLinks = this.container.querySelectorAll(".sync-prefs");
for (let link of syncPrefLinks) {
link.addEventListener("click", this.props.onSyncPrefClick);
}
this.container.querySelector(".connect-device").addEventListener("click", this.props.onConnectDeviceClick);
},
};

Просмотреть файл

@ -83,7 +83,7 @@
<div class="singleDeviceInfo sync-state">
<div class="syncIllustrationIssue"></div>
<p class="instructions">&syncedTabs.sidebar.noclients.subtitle;</p>
<p class="instructions device-promo" fxAccountsBrand="&syncBrand.fxAccount.label;"></p>
<button class="button connect-device">&syncedTabs.sidebar.connectAnotherDevice;</button>
</div>
<div class="tabs-disabled sync-state">
<div class="syncIllustrationIssue"></div>

Просмотреть файл

@ -41,10 +41,8 @@ add_task(async function testInitUninit() {
Assert.ok(ViewMock.calledWithNew(), "view is instantiated");
Assert.equal(ViewMock.args[0][0], mockWindow);
Assert.equal(ViewMock.args[0][1], listComponent);
Assert.ok(ViewMock.args[0][2].onAndroidClick,
"view is passed onAndroidClick prop");
Assert.ok(ViewMock.args[0][2].oniOSClick,
"view is passed oniOSClick prop");
Assert.ok(ViewMock.args[0][2].onConnectDeviceClick,
"view is passed onConnectDeviceClick prop");
Assert.ok(ViewMock.args[0][2].onSyncPrefClick,
"view is passed onSyncPrefClick prop");
@ -203,16 +201,15 @@ add_task(async function testPanelStatus() {
});
add_task(async function testActions() {
let windowMock = {
openUILink() {},
};
let windowMock = {};
let chromeWindowMock = {
gSync: {
openPrefs() {}
openPrefs() {},
openConnectAnotherDevice() {}
}
};
sinon.spy(windowMock, "openUILink");
sinon.spy(chromeWindowMock.gSync, "openPrefs");
sinon.spy(chromeWindowMock.gSync, "openConnectAnotherDevice");
let getChromeWindowMock = sinon.stub();
getChromeWindowMock.returns(chromeWindowMock);
@ -222,13 +219,8 @@ add_task(async function testActions() {
getChromeWindowMock
});
let href = Services.prefs.getCharPref("identity.mobilepromo.android") + "synced-tabs-sidebar";
component.openAndroidLink("mock-event");
Assert.ok(windowMock.openUILink.calledWith(href, "mock-event"));
href = Services.prefs.getCharPref("identity.mobilepromo.ios") + "synced-tabs-sidebar";
component.openiOSLink("mock-event");
Assert.ok(windowMock.openUILink.calledWith(href, "mock-event"));
component.openConnectDevice();
Assert.ok(chromeWindowMock.gSync.openConnectAnotherDevice.called);
component.openSyncPrefs();
Assert.ok(getChromeWindowMock.calledWith(windowMock));

Просмотреть файл

@ -50,11 +50,15 @@ sendTabToDevice.unconfigured = Learn About Sending Tabs…
# configured. Allows users to immediately sign into sync via the preferences.
sendTabToDevice.signintosync = Sign in to Sync…
# LOCALIZATION NOTE (sendTabToDevice.singledevice, sendTabToDevice.singledevice.status)
# LOCALIZATION NOTE (sendTabToDevice.singledevice, sendTabToDevice.connectdevice,
# sendTabToDevice.singledevice.status)
# Displayed in the Send Tabs context menu when right clicking a tab, a page or a link
# and the Sync account has only 1 device. Redirects to a marketing page.
# and the Sync account has only 1 device. The sendTabToDevice.singledevice link
# redirects to a marketing page, the sendTabToDevice.connectdevice redirects
# to an FxAccounts page that tells to you to connect another device.
sendTabToDevice.singledevice.status = No Devices Connected
sendTabToDevice.singledevice = Learn About Sending Tabs…
sendTabToDevice.connectdevice = Connect Another Device…
# LOCALIZATION NOTE (sendTabToDevice.verify, sendTabToDevice.verify.status)
# Displayed in the Send Tabs context menu when right clicking a tab, a page or a link

Просмотреть файл

@ -384,6 +384,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY appMenuRemoteTabs.signin.label "Sign in to Sync">
<!ENTITY appMenuRemoteTabs.managedevices.label "Manage Devices…">
<!ENTITY appMenuRemoteTabs.sidebar.label "View Synced Tabs Sidebar">
<!ENTITY appMenuRemoteTabs.connectdevice.label "Connect Another Device">
<!ENTITY appMenuRecentHighlights.label "Recent Highlights">
@ -799,6 +800,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
when Sync is configured but syncing tabs is disabled. -->
<!ENTITY syncedTabs.sidebar.tabsnotsyncing.label "Turn on tab syncing to view a list of tabs from your other devices.">
<!ENTITY syncedTabs.sidebar.searchPlaceholder "Search synced tabs">
<!ENTITY syncedTabs.sidebar.connectAnotherDevice "Connect Another Device">
<!-- LOCALIZATION NOTE (syncedTabs.context.open.accesskey,
syncedTabs.context.openAllInTabs.accesskey):

Просмотреть файл

@ -811,17 +811,6 @@ flashHang.helpButton.accesskey = L
# LOCALIZATION NOTE (customizeMode.tabTitle): %S is brandShortName
customizeMode.tabTitle = Customize %S
# LOCALIZATION NOTE (appMenuRemoteTabs.mobilePromo.text2):
# %1$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.android and the link will be to
# https://www.mozilla.org/firefox/android/.
# %2$S will be replaced with a link, the text of which is
# appMenuRemoteTabs.mobilePromo.ios
# and the link will be to https://www.mozilla.org/firefox/ios/.
appMenuRemoteTabs.mobilePromo.text2 = Download %1$S or %2$S and connect them to your Firefox Account.
appMenuRemoteTabs.mobilePromo.android = Firefox for Android
appMenuRemoteTabs.mobilePromo.ios = Firefox for iOS
# LOCALIZATION NOTE (e10s.accessibilityNotice.mainMessage,
# e10s.accessibilityNotice.enableAndRestart.label,
# e10s.accessibilityNotice.enableAndRestart.accesskey):
@ -926,4 +915,4 @@ aboutDialog.architecture.thirtyTwoBit = 32-bit
# LOCALIZATION NOTE (certImminentDistrust.message):
# Shown in the browser console when visiting a website that is trusted today,
# but won't be in the future unless the site operator makes a change.
certImminentDistrust.message = The security certificate in use on this website will no longer be trusted in a future release. For more information, visit https://wiki.mozilla.org/CA/Upcoming_Distrust_Actions
certImminentDistrust.message = The security certificate in use on this website will no longer be trusted in a future release. For more information, visit https://wiki.mozilla.org/CA/Upcoming_Distrust_Actions

Просмотреть файл

@ -623,8 +623,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
}
.PanelUI-remotetabs-instruction-title,
.PanelUI-remotetabs-instruction-label,
#PanelUI-remotetabs-mobile-promo {
.PanelUI-remotetabs-instruction-label {
/* If you change the margin here, the min-height of the synced tabs panel
(e.g. #PanelUI-remotetabs[mainview] #PanelUI-remotetabs-setupsync, etc) may
need adjusting (see bug 1248506) */
@ -649,7 +648,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
padding-top: 15px;
}
.PanelUI-remotetabs-prefs-button {
.PanelUI-remotetabs-button {
-moz-appearance: none;
background-color: #0060df;
/* !important for the color as an OSX specific rule when a lightweight theme
@ -666,11 +665,11 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
min-width: 200px;
}
.PanelUI-remotetabs-prefs-button:hover {
.PanelUI-remotetabs-button:hover {
background-color: #003eaa;
}
.PanelUI-remotetabs-prefs-button:hover:active {
.PanelUI-remotetabs-button:hover:active {
background-color: #002275;
}
@ -704,7 +703,7 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
list-style-image: url(chrome://browser/skin/fxa/sync-illustration-issue.svg);
}
.PanelUI-remotetabs-prefs-button > .toolbarbutton-text {
.PanelUI-remotetabs-button > .toolbarbutton-text {
/* !important to override ".cui-widget-panel toolbarbutton > .toolbarbutton-text" above. */
text-align: center !important;
text-shadow: none;
@ -722,8 +721,8 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-nodevicespane,
#PanelUI-remotetabs[mainview] #PanelUI-remotetabs-tabsdisabledpane {
min-height: calc(var(--panel-ui-sync-illustration-height) +
20px + /* margin of .PanelUI-remotetabs-prefs-button */
16px + /* padding of .PanelUI-remotetabs-prefs-button */
20px + /* margin of .PanelUI-remotetabs-button */
16px + /* padding of .PanelUI-remotetabs-button */
30px + /* margin of .PanelUI-remotetabs-instruction-label */
30px + 15px + /* padding of .PanelUI-remotetabs-instruction-box */
11em);

Просмотреть файл

@ -28,6 +28,7 @@ const CONFIG_PREFS = [
"identity.fxaccounts.remote.signup.uri",
"identity.fxaccounts.remote.signin.uri",
"identity.fxaccounts.remote.email.uri",
"identity.fxaccounts.remote.connectdevice.uri",
"identity.fxaccounts.remote.force_auth.uri",
];
@ -145,6 +146,7 @@ this.FxAccountsConfig = {
Services.prefs.setCharPref("identity.fxaccounts.remote.signup.uri", rootURL + "/signup?service=sync&context=" + contextParam);
Services.prefs.setCharPref("identity.fxaccounts.remote.signin.uri", rootURL + "/signin?service=sync&context=" + contextParam);
Services.prefs.setCharPref("identity.fxaccounts.remote.email.uri", rootURL + "/?service=sync&context=" + contextParam + "&action=email");
Services.prefs.setCharPref("identity.fxaccounts.remote.connectdevice.uri", rootURL + "/connect_another_device?service=sync&context=" + contextParam);
Services.prefs.setCharPref("identity.fxaccounts.remote.force_auth.uri", rootURL + "/force_auth?service=sync&context=" + contextParam);
// Ensure the webchannel is pointed at the correct uri