added deviceId, ExtensionStore, working on CoursePopup

This commit is contained in:
Sriram Hariharan
2023-03-04 20:33:35 -06:00
parent e99ba5864a
commit 46282a0406
15 changed files with 119 additions and 49 deletions

View File

@@ -1,16 +1,16 @@
import { devStore } from 'src/shared/storage/devStore';
import { DevStore } from 'src/background/storage/DevStore';
/**
* Open the debug tab as the first tab
*/
export async function openDebugTab() {
if (process.env.NODE_ENV === 'development') {
const debugTabId = await devStore.getDebugTabId();
const debugTabId = await DevStore.getDebugTabId();
const isAlreadyOpen = await (await chrome.tabs.query({})).some(tab => tab.id === debugTabId);
if (isAlreadyOpen) return;
const wasVisible = await devStore.getWasDebugTabVisible();
const wasVisible = await DevStore.getWasDebugTabVisible();
const tab = await chrome.tabs.create({
url: chrome.runtime.getURL('debug.html'),
@@ -19,6 +19,6 @@ export async function openDebugTab() {
index: 0,
});
await devStore.setDebugTabId(tab.id);
await DevStore.setDebugTabId(tab.id);
}
}