From 94de7bcf034d0751c1cd48817096f9d0aa57950f Mon Sep 17 00:00:00 2001 From: sheepzh Date: Tue, 15 Oct 2024 01:26:08 +0800 Subject: [PATCH] Support RTL --- .vscode/settings.json | 1 + package.json | 23 +- public/app.html | 18 +- public/popup.html | 240 +++++++++--------- public/side.html | 18 +- src/app/Layout/VersionTag.tsx | 15 +- src/app/Layout/style.sass | 8 + .../Analysis/components/Trend/Filter.tsx | 6 +- .../ClearPanel/ClearFilter/DateFilter.tsx | 2 + .../components/common/DateRangeFilterItem.tsx | 7 +- src/app/echarts.ts | 6 +- src/element-ui/rtl.tsx | 14 + src/hooks/useEcharts.ts | 63 +---- src/i18n/index.ts | 7 +- src/popup/components/chart/index.ts | 18 +- src/popup/components/chart/option.ts | 39 ++- src/side/components/Search/index.tsx | 6 +- src/util/document.ts | 28 ++ src/util/echarts.ts | 189 ++++++++++++++ src/util/time.ts | 8 +- webpack/webpack.common.ts | 26 +- 21 files changed, 481 insertions(+), 261 deletions(-) create mode 100644 src/element-ui/rtl.tsx create mode 100644 src/util/document.ts create mode 100644 src/util/echarts.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 6f5497679..7f087a3c5 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,6 +28,7 @@ "Popconfirm", "PROPFIND", "Qihu", + "rtlcss", "sheepzh", "vueuse", "webcomponents", diff --git a/package.json b/package.json index 718670f93..28ac75484 100644 --- a/package.json +++ b/package.json @@ -24,16 +24,16 @@ }, "license": "MIT", "devDependencies": { - "@babel/plugin-transform-modules-commonjs": "^7.24.8", - "@babel/preset-env": "^7.25.4", - "@crowdin/crowdin-api-client": "^1.36.0", - "@types/chrome": "0.0.272", + "@babel/plugin-transform-modules-commonjs": "^7.25.7", + "@babel/preset-env": "^7.25.8", + "@crowdin/crowdin-api-client": "^1.37.1", + "@types/chrome": "0.0.277", "@types/copy-webpack-plugin": "^10.1.0", "@types/decompress": "^4.2.7", "@types/echarts": "^4.9.22", "@types/generate-json-webpack-plugin": "^0.3.7", "@types/jest": "^29.5.13", - "@types/node": "^22.7.4", + "@types/node": "^22.7.5", "@types/psl": "^1.1.3", "@types/punycode": "^2.1.4", "@types/webpack": "^5.28.5", @@ -43,14 +43,17 @@ "copy-webpack-plugin": "^12.0.2", "css-loader": "^7.1.2", "decompress": "^4.2.1", - "eslint": "^9.11.1", + "eslint": "^9.12.0", "filemanager-webpack-plugin": "^8.0.0", "generate-json-webpack-plugin": "^2.0.0", "html-webpack-plugin": "^5.6.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "mini-css-extract-plugin": "^2.9.1", - "sass": "^1.79.4", + "postcss": "^8.4.47", + "postcss-loader": "^8.1.1", + "postcss-rtlcss": "^5.5.0", + "sass": "^1.79.5", "sass-loader": "^16.0.2", "style-loader": "^4.0.0", "ts-jest": "^29.2.5", @@ -58,7 +61,7 @@ "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", "tslib": "^2.7.0", - "typescript": "5.6.2", + "typescript": "5.6.3", "url-loader": "^4.1.1", "webpack": "^5.95.0", "webpack-bundle-analyzer": "^4.10.2", @@ -69,11 +72,11 @@ "@vueuse/core": "^11.1.0", "countup.js": "^2.8.0", "echarts": "^5.5.1", - "element-plus": "2.8.4", + "element-plus": "2.8.5", "js-base64": "^3.7.7", "punycode": "^2.3.1", "stream-browserify": "^3.0.0", - "vue": "^3.5.10", + "vue": "^3.5.12", "vue-router": "^4.4.5" }, "engines": { diff --git a/public/app.html b/public/app.html index 5d752c8ea..3a290e79e 100644 --- a/public/app.html +++ b/public/app.html @@ -1,10 +1,12 @@ - - - - + - -
- - + + + + + +
+ + + \ No newline at end of file diff --git a/public/popup.html b/public/popup.html index 3ddc8c9e6..3c86bb49d 100644 --- a/public/popup.html +++ b/public/popup.html @@ -6,130 +6,135 @@ --> - + - + -
-
-
- - -
-
-
-
- +
+
+
+ + +
+
+
+
+ +
+
+
-
-
-
- -
- -