Skip to content

Commit 9198713

Browse files
committed
Fix build
1 parent 77e8202 commit 9198713

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/popup/components/footer/upgrade.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ import { getLatestVersion } from "@src/api/version"
99
import packageInfo from "@src/package"
1010
import { t } from "@popup/locale"
1111
import { UPDATE_PAGE } from "@util/constant/url"
12-
import { IS_FIREFOX, IS_FROM_STORE } from "@util/constant/environment"
12+
import { IS_FIREFOX } from "@util/constant/environment"
13+
import { IS_FROM_STORE } from "@util/constant/meta"
1314

1415
function showUpgradeButton(latestVersion: string) {
1516
const upgrade = document.getElementById('upgrade-container')

src/util/constant/environment.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,4 @@ export const IS_CHROME: boolean = isChrome
3434
/**
3535
* @since 0.8.0
3636
*/
37-
export const IS_OPERA: boolean = isOpera
38-
39-
const id = chrome.runtime.id
40-
41-
/**
42-
* @since 0.9.6
43-
*/
44-
export const IS_FROM_STORE = (isChrome && id === CHROME_ID)
45-
|| (isEdge && id === EDGE_ID)
46-
|| (isFirefox && id === FIREFOX_ID)
37+
export const IS_OPERA: boolean = isOpera

src/util/constant/meta.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
* https://opensource.org/licenses/MIT
66
*/
77

8+
import { IS_CHROME, IS_EDGE, IS_FIREFOX } from "./environment"
9+
810
/**
911
* @since 0.9.6
1012
*/
@@ -18,4 +20,13 @@ export const FIREFOX_ID = "{a8cf72f7-09b7-4cd4-9aaa-7a023bf09916}"
1820
/**
1921
* @since 0.9.6
2022
*/
21-
export const EDGE_ID = "fepjgblalcnepokjblgbgmapmlkgfahc"
23+
export const EDGE_ID = "fepjgblalcnepokjblgbgmapmlkgfahc"
24+
25+
const id = chrome.runtime.id
26+
27+
/**
28+
* @since 0.9.6
29+
*/
30+
export const IS_FROM_STORE = (IS_CHROME && id === CHROME_ID)
31+
|| (IS_EDGE && id === EDGE_ID)
32+
|| (IS_FIREFOX && id === FIREFOX_ID)

0 commit comments

Comments
 (0)