Skip to content

Commit 5ccbfb2

Browse files
author
sheepzh
committed
Fix bugs caused by proxy data in Firefox
1 parent b515bc6 commit 5ccbfb2

File tree

5 files changed

+31
-18
lines changed

5 files changed

+31
-18
lines changed

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@
2525
"license": "MIT",
2626
"devDependencies": {
2727
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
28-
"@babel/preset-env": "^7.24.3",
29-
"@crowdin/crowdin-api-client": "^1.31.0",
30-
"@types/chrome": "0.0.263",
28+
"@babel/preset-env": "^7.24.4",
29+
"@crowdin/crowdin-api-client": "^1.33.0",
30+
"@types/chrome": "0.0.266",
3131
"@types/copy-webpack-plugin": "^8.0.1",
3232
"@types/echarts": "^4.9.22",
3333
"@types/generate-json-webpack-plugin": "^0.3.7",
3434
"@types/jest": "^29.5.12",
35-
"@types/node": "^20.11.30",
35+
"@types/node": "^20.12.6",
3636
"@types/psl": "^1.1.3",
3737
"@types/punycode": "^2.1.4",
3838
"@types/webpack": "^5.28.5",
3939
"@types/webpack-bundle-analyzer": "^4.7.0",
4040
"@vue/babel-plugin-jsx": "^1.2.2",
4141
"babel-loader": "^9.1.3",
4242
"copy-webpack-plugin": "^12.0.2",
43-
"css-loader": "^6.10.0",
44-
"eslint": "^8.57.0",
43+
"css-loader": "^7.1.0",
44+
"eslint": "^9.0.0",
4545
"filemanager-webpack-plugin": "^8.0.0",
4646
"generate-json-webpack-plugin": "^2.0.0",
4747
"html-webpack-plugin": "^5.6.0",
@@ -50,13 +50,13 @@
5050
"mini-css-extract-plugin": "^2.8.1",
5151
"node-sass": "^9.0.0",
5252
"sass-loader": "^14.1.1",
53-
"style-loader": "^3.3.4",
53+
"style-loader": "^4.0.0",
5454
"ts-jest": "^29.1.2",
5555
"ts-loader": "^9.5.1",
5656
"ts-node": "^10.9.2",
5757
"tsconfig-paths": "^4.2.0",
5858
"tslib": "^2.6.2",
59-
"typescript": "5.4.3",
59+
"typescript": "5.4.4",
6060
"url-loader": "^4.1.1",
6161
"webpack": "^5.91.0",
6262
"webpack-bundle-analyzer": "^4.10.1",
@@ -67,7 +67,7 @@
6767
"@vueuse/core": "^10.9.0",
6868
"countup.js": "^2.8.0",
6969
"echarts": "^5.5.0",
70-
"element-plus": "2.6.2",
70+
"element-plus": "2.6.3",
7171
"punycode": "^2.3.1",
7272
"stream-browserify": "^3.0.0",
7373
"vue": "^3.4.21",

src/api/chrome/runtime.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ export function getRuntimeId(): string {
55
}
66

77
export function sendMsg2Runtime<T = any, R = any>(code: timer.mq.ReqCode, data?: T): Promise<R> {
8+
// Fix proxy data failed to serialized in Firefox
9+
if (data !== undefined) {
10+
data = JSON.parse(JSON.stringify(data))
11+
}
812
const request: timer.mq.Request<T> = { code, data }
913
return new Promise((resolve, reject) => chrome.runtime.sendMessage(request,
1014
(response: timer.mq.Response<R>) => {

src/app/components/DataManage/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import ContentContainer from "../common/ContentContainer"
1111
import Migration from "./Migration"
1212
import MemoryInfo, { MemoryInfoInstance } from "./MemoryInfo"
1313
import ClearPanel from "./ClearPanel"
14-
import './style'
14+
import './style.sass'
1515

1616
export default defineComponent(() => {
1717
const memoryInfo = ref<MemoryInfoInstance>()

src/app/components/DataManage/style.sass

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
height: 22%
3939
margin-left: 0px
4040
text-wrap: wrap
41+
white-space: normal
4142
line-height: 1.4em
4243
.el-progress-circle
4344
width: 250px !important

src/app/styles/compatible.sass

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,16 @@
5050
background-color: transparent
5151
.el-dialog.is-align-center
5252
text-align: center
53+
.el-dialog__header.show-close
54+
padding-right: 0
5355
\:root
5456
--el-input-height: 40px
5557
--el-input-inner-height: 38px
5658

59+
.el-dialog
60+
.sop-dialog-container
61+
margin-top: 25px
62+
5763
// SOP
5864
.sop-footer
5965
text-align: center
@@ -67,15 +73,17 @@
6773
.el-button:not(:last-child)
6874
margin-right: 10px
6975
.step-container
70-
width: 600px
76+
width: fit-content
7177
margin: auto
72-
.el-step__head
73-
text-align: center
74-
.el-step__line
75-
margin-right: -50% !important
76-
left: 50% !important
77-
.el-step__title
78-
text-align: center
78+
.el-step
79+
width: 200px
80+
.el-step__head
81+
text-align: center
82+
.el-step__line
83+
margin-right: -50% !important
84+
left: 50% !important
85+
.el-step__title
86+
text-align: center
7987

8088
html[data-locale='uk']:root, html[data-locale='pt_PT']:root, html[data-locale='es']:root
8189
.el-date-range-picker

0 commit comments

Comments
 (0)