fune/browser/components/myfirefox/myfirefox.js
Sam Foster bd470bc9de Bug 1763138 - Hook up the tabs-setup flow to the sync status and fxa device list to enable the first steps. r=dao,fluent-reviewers,flod
* The FxA signin/signup step is wired up
* The signin with another device step to open the about:preferences deep-link is mostly wired up

Not implemented here:
* Detecting and displaying recent remote tabs is not implemented yet
* Offline and other error conditions not handled
* We may need to wait for FxA to be ready
* Only the bare bones of markup/CSS is implemented
* String for all but the Step 1 of 3 in scope here are still placeholders

Differential Revision: https://phabricator.services.mozilla.com/D144354
2022-04-28 06:14:05 +00:00

32 lines
973 B
JavaScript

/* 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/. */
"use strict";
import { tabsSetupFlowManager } from "./tabs-pickup.js";
import "./recently-closed-tabs.js";
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
XPCOMUtils.defineLazyModuleGetters(globalThis, {
ColorwayClosetOpener: "resource:///modules/ColorwayClosetOpener.jsm",
});
window.addEventListener("load", () => {
document
.getElementById("colorway-closet-button")
.addEventListener("click", () => {
globalThis.ColorwayClosetOpener.openModal();
});
tabsSetupFlowManager.initialize(
document.getElementById("tabs-pickup-container")
);
document.getElementById("recently-closed-tabs-container").onLoad();
});
window.addEventListener("unload", () => {
tabsSetupFlowManager?.uninit();
});