Skip to content

Commit d08f2f9

Browse files
committed
fix: notify icon import
1 parent 6abcca2 commit d08f2f9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

contents/notify.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import createCache from "@emotion/cache"
22
import { CacheProvider } from "@emotion/react"
33
import { Alert, AlertTitle, Snackbar } from "@mui/material"
4-
import icon from "data-base64:~assets/icon.png"
54
import { useEffect, useState } from "react"
65

76
import { usePort } from "@plasmohq/messaging/hook"
@@ -45,7 +44,13 @@ function PlasmoOverlay() {
4544
<Alert
4645
onClose={handleClose}
4746
severity={notify.data.type || "success"}
48-
icon={<img src={icon} alt="" style={{ width: 24, height: 24 }} />}
47+
icon={
48+
<img
49+
src={chrome.runtime.getURL("assets/icon.png")}
50+
alt=""
51+
style={{ width: 24, height: 24 }}
52+
/>
53+
}
4954
sx={{ width: 320 }}>
5055
{notify.data.title && (
5156
<AlertTitle>{notify.data.title}</AlertTitle>

package.json

+11-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "gopeed-browser-extension",
33
"displayName": "Gopeed",
4-
"version": "1.0.0",
4+
"version": "1.0.1",
55
"description": "Gopeed browser extension",
66
"homepage": "https://gopeed.com",
77
"author": "Levi",
@@ -47,6 +47,16 @@
4747
"http://*/*",
4848
"https://*/*"
4949
],
50+
"web_accessible_resources": [
51+
{
52+
"matches": [
53+
"<all_urls>"
54+
],
55+
"resources": [
56+
"assets/icon.png"
57+
]
58+
}
59+
],
5060
"permissions": [
5161
"downloads",
5262
"cookies",

0 commit comments

Comments
 (0)