зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1099462 - Set the Getting Started URL for Loop. r=MattN
This commit is contained in:
Родитель
f5d53a75af
Коммит
3632bace8a
|
@ -1645,7 +1645,7 @@ pref("loop.enabled", true);
|
|||
pref("loop.server", "https://loop.services.mozilla.com/v0");
|
||||
pref("loop.seenToS", "unseen");
|
||||
pref("loop.gettingStarted.seen", false);
|
||||
pref("loop.gettingStarted.url", "https://bugzilla.mozilla.org/show_bug.cgi?id=1099462");
|
||||
pref("loop.gettingStarted.url", "https://www.mozilla.org/%LOCALE%/firefox/%VERSION%/hello/start");
|
||||
pref("loop.learnMoreUrl", "https://www.firefox.com/hello/");
|
||||
pref("loop.legal.ToS_url", "https://hello.firefox.com/legal/terms/");
|
||||
pref("loop.legal.privacy_url", "https://www.mozilla.org/privacy/");
|
||||
|
|
|
@ -1421,9 +1421,12 @@ this.MozLoopService = {
|
|||
*/
|
||||
openGettingStartedTour: Task.async(function(aSrc = null) {
|
||||
try {
|
||||
let url = new URL(Services.prefs.getCharPref("loop.gettingStarted.url"));
|
||||
let urlStr = Services.prefs.getCharPref("loop.gettingStarted.url");
|
||||
let url = new URL(Services.urlFormatter.formatURL(urlStr));
|
||||
if (aSrc) {
|
||||
url.searchParams.set("source", aSrc);
|
||||
url.searchParams.set("utm_source", "firefox-browser");
|
||||
url.searchParams.set("utm_medium", "firefox-browser");
|
||||
url.searchParams.set("utm_campaign", aSrc);
|
||||
}
|
||||
let win = Services.wm.getMostRecentWindow("navigator:browser");
|
||||
win.switchToTabHavingURI(url, true, {replaceQueryString: true});
|
||||
|
|
|
@ -166,7 +166,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
|
||||
var GettingStartedView = React.createClass({displayName: 'GettingStartedView',
|
||||
handleButtonClick: function() {
|
||||
navigator.mozLoop.openGettingStartedTour();
|
||||
navigator.mozLoop.openGettingStartedTour("getting-started");
|
||||
navigator.mozLoop.setLoopPref("gettingStarted.seen", true);
|
||||
var event = new CustomEvent("GettingStartedSeen");
|
||||
window.dispatchEvent(event);
|
||||
|
@ -286,7 +286,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
},
|
||||
|
||||
openGettingStartedTour: function() {
|
||||
navigator.mozLoop.openGettingStartedTour("settingsMenu");
|
||||
navigator.mozLoop.openGettingStartedTour("settings-menu");
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
|
|
@ -166,7 +166,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
|
||||
var GettingStartedView = React.createClass({
|
||||
handleButtonClick: function() {
|
||||
navigator.mozLoop.openGettingStartedTour();
|
||||
navigator.mozLoop.openGettingStartedTour("getting-started");
|
||||
navigator.mozLoop.setLoopPref("gettingStarted.seen", true);
|
||||
var event = new CustomEvent("GettingStartedSeen");
|
||||
window.dispatchEvent(event);
|
||||
|
@ -286,7 +286,7 @@ loop.panel = (function(_, mozL10n) {
|
|||
},
|
||||
|
||||
openGettingStartedTour: function() {
|
||||
navigator.mozLoop.openGettingStartedTour("settingsMenu");
|
||||
navigator.mozLoop.openGettingStartedTour("settings-menu");
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
|
Загрузка…
Ссылка в новой задаче