From c25aed89b7a68d3d0bf280a619d8645bbf6d09c3 Mon Sep 17 00:00:00 2001 From: LuChao Date: Wed, 16 Apr 2025 11:52:14 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E9=A1=B9=EF=BC=8C=E6=B7=BB=E5=8A=A0=20@element-plus/icons-vue?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=92=8C=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=8F=90=E5=8D=87?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=95=8C=E9=9D=A2=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +- package.json | 1 + src/App.vue | 19 +- src/components/utils/DbInitComponent.vue | 465 +++++++++++++++-------- src/views/CleanupView.vue | 147 ++++++- src/views/HomeView.vue | 127 ++++++- src/views/other/SettingView.vue | 18 +- src/views/tools/BiasView.vue | 169 ++++++-- src/views/tools/DecryptView.vue | 142 +++++-- src/views/tools/MergeView.vue | 129 +++++-- src/views/tools/WxinfoView.vue | 24 +- 11 files changed, 950 insertions(+), 295 deletions(-) diff --git a/.gitignore b/.gitignore index 9768ad7..aee9584 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,6 @@ coverage tsconfig.app.tsbuildinfo tsconfig.node.tsbuildinfo -/public/data/ \ No newline at end of file +/public/data/ +package-lock.json +.cursor/rules/fe.mdc diff --git a/package.json b/package.json index 7814352..b115abe 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "type-check": "vue-tsc --build --force" }, "dependencies": { + "@element-plus/icons-vue": "^2.3.1", "@types/axios": "^0.14.0", "axios": "^1.6.3", "cors": "^2.8.5", diff --git a/src/App.vue b/src/App.vue index 87d38e7..d805c42 100644 --- a/src/App.vue +++ b/src/App.vue @@ -14,10 +14,10 @@ import FavoriteIcon from "@/assets/icon/FavoriteIcon.vue"; import CollapseOpenIcon from "@/assets/icon/CollapseOpenIcon.vue"; import CollapseCloseIcon from "@/assets/icon/CollapseCloseIcon.vue"; -import {RouterLink, RouterView} from 'vue-router' -import {ref, onMounted, withCtx, watch} from 'vue' +import { RouterLink, RouterView } from 'vue-router' +import { ref, onMounted, withCtx, watch } from 'vue' import router from "@/router"; -import {is_db_init, is_use_local_data} from "@/utils/common_utils"; +import { is_db_init, is_use_local_data } from "@/utils/common_utils"; import ChatRecordsMain from "@/components/chat/ChatRecordsMain.vue"; const isCollapse = ref(true); @@ -28,7 +28,7 @@ onMounted(() => { // localStorage.setItem('isDbInit', "t"); is_local_data.value = localStorage.getItem('isUseLocalData') === 't'; console.log("is_local_data", is_local_data.value); - if(!is_local_data.value) { + if (!is_local_data.value) { is_db_init(); } }) @@ -46,17 +46,17 @@ const handleClose = (key: string, keyPath: string[]) => { \ No newline at end of file diff --git a/src/views/CleanupView.vue b/src/views/CleanupView.vue index c483c25..1cc3c35 100644 --- a/src/views/CleanupView.vue +++ b/src/views/CleanupView.vue @@ -3,25 +3,146 @@ import {ref} from "vue"; import HomeView from "@/views/HomeView.vue"; import ContactsList from "@/components/chat/ContactsList.vue"; import ChatExportMain from "@/components/chatBackup/ChatExportMain.vue"; - +import { ElMessage } from 'element-plus'; \ No newline at end of file diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index c82d591..354549b 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -2,29 +2,138 @@ import http from '@/utils/axios.js'; import {onMounted, ref} from "vue"; import {apiVersion} from "@/api/base"; +import { ElMessage } from 'element-plus'; const version = ref(''); // 用于显示返回值 -const getVersion = () => { - apiVersion().then((data: string) => { +const getVersion = async () => { + try { + const data = await apiVersion(); version.value = data; - }).catch((error: string) => { + } catch (error) { console.error('Error fetching API version:', error); - }); + ElMessage.error('获取版本信息失败'); + } } onMounted(getVersion); - \ No newline at end of file diff --git a/src/views/other/SettingView.vue b/src/views/other/SettingView.vue index 70f66e9..4783799 100644 --- a/src/views/other/SettingView.vue +++ b/src/views/other/SettingView.vue @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/src/views/tools/DecryptView.vue b/src/views/tools/DecryptView.vue index 607357f..eb9d34a 100644 --- a/src/views/tools/DecryptView.vue +++ b/src/views/tools/DecryptView.vue @@ -1,14 +1,17 @@ \ No newline at end of file diff --git a/src/views/tools/MergeView.vue b/src/views/tools/MergeView.vue index 44e87c7..98bdf6b 100644 --- a/src/views/tools/MergeView.vue +++ b/src/views/tools/MergeView.vue @@ -1,13 +1,16 @@ \ No newline at end of file diff --git a/src/views/tools/WxinfoView.vue b/src/views/tools/WxinfoView.vue index 2e93589..939e204 100644 --- a/src/views/tools/WxinfoView.vue +++ b/src/views/tools/WxinfoView.vue @@ -1,6 +1,6 @@ \ No newline at end of file From 7893263b989a0db1c55746767e44314ff8a9a808 Mon Sep 17 00:00:00 2001 From: LuChao Date: Wed, 16 Apr 2025 13:06:53 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E9=A1=B9=EF=BC=8C=E6=B7=BB=E5=8A=A0=20@element-plus/icons-vue?= =?UTF-8?q?=EF=BC=8C=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E6=A0=B7=E5=BC=8F=EF=BC=8C=E6=8F=90=E5=8D=87=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C=EF=BC=8C=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BB=B6=E7=9A=84=E6=A0=B7=E5=BC=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 4 +- src/App.vue | 66 +++- src/components/chat/ChatRecords.vue | 7 +- src/components/chat/ChatRecprdsHeader.vue | 183 ++++++--- src/components/chat/ContactsList.vue | 25 +- src/components/stats/ContactStats.vue | 171 ++++++++- src/components/stats/DateChatHeatmapStats.vue | 239 +++++++++--- src/components/stats/DateChatStats.vue | 223 ++++++++--- src/components/utils/DbInitComponent.vue | 355 +++++++----------- src/views/IndexView.vue | 78 +++- src/views/other/AboutView.vue | 154 ++++++-- src/views/other/HelpView.vue | 147 ++++++-- src/views/other/SettingView.vue | 283 ++++++++++++-- src/views/tools/BiasView.vue | 6 +- src/views/tools/DecryptView.vue | 6 +- src/views/tools/MergeView.vue | 6 +- src/views/tools/WxinfoView.vue | 4 +- 17 files changed, 1453 insertions(+), 504 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f7db26..5d45d32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "wxdump_web", "version": "2.4.10", "dependencies": { + "@element-plus/icons-vue": "^2.3.1", "@types/axios": "^0.14.0", "axios": "^1.6.3", "cors": "^2.8.5", @@ -486,8 +487,9 @@ }, "node_modules/@element-plus/icons-vue": { "version": "2.3.1", - "resolved": "https://registry.npmmirror.com/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", + "resolved": "https://registry.npmjs.org/@element-plus/icons-vue/-/icons-vue-2.3.1.tgz", "integrity": "sha512-XxVUZv48RZAd87ucGS48jPf6pKu0yV5UCg9f4FFwtrYxXOwWuVJo6wOvSLKEoMQKjv8GsX/mhP6UsC1lRwbUWg==", + "license": "MIT", "peerDependencies": { "vue": "^3.2.0" } diff --git a/src/App.vue b/src/App.vue index d805c42..626cafd 100644 --- a/src/App.vue +++ b/src/App.vue @@ -20,7 +20,7 @@ import router from "@/router"; import { is_db_init, is_use_local_data } from "@/utils/common_utils"; import ChatRecordsMain from "@/components/chat/ChatRecordsMain.vue"; -const isCollapse = ref(true); +const isCollapse = ref(false); const is_local_data = ref(true); @@ -50,20 +50,20 @@ const handleClose = (key: string, keyPath: string[]) => {
- + - - - - - - - - - + :collapse-transition="true" :show-timeout="200" :hide-timeout="200"> + +
+ +
@@ -217,4 +217,44 @@ header { justify-content: space-between; height: 100%; } + +.collapse-btn-container { + position: absolute; + right: -14px; + top: 50%; + transform: translateY(-50%); + z-index: 1; +} + +.collapse-btn { + transition: all 0.3s; + font-size: 12px; + padding: 6px; + width: 26px; + height: 26px; + background-color: var(--el-bg-color); + border: 1px solid var(--el-border-color); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + display: flex; + align-items: center; + justify-content: center; +} + +.collapse-btn :deep(.el-icon) { + width: 100%; + height: 100%; + display: flex; + align-items: center; + justify-content: center; +} + +.collapse-btn:hover { + transform: scale(1.1); + background-color: var(--el-color-primary-light-9); + border-color: var(--el-color-primary); +} + +.collapse-btn:active { + transform: scale(0.95); +} diff --git a/src/components/chat/ChatRecords.vue b/src/components/chat/ChatRecords.vue index 8b1d671..01f95ff 100644 --- a/src/components/chat/ChatRecords.vue +++ b/src/components/chat/ChatRecords.vue @@ -38,7 +38,7 @@ onMounted(() => { diff --git a/src/components/chat/ChatRecprdsHeader.vue b/src/components/chat/ChatRecprdsHeader.vue index 7a28d9e..7d073d3 100644 --- a/src/components/chat/ChatRecprdsHeader.vue +++ b/src/components/chat/ChatRecprdsHeader.vue @@ -136,66 +136,145 @@ const export_button = (val: boolean) => { \ No newline at end of file diff --git a/src/components/chat/ContactsList.vue b/src/components/chat/ContactsList.vue index a34b0f1..a749acc 100644 --- a/src/components/chat/ContactsList.vue +++ b/src/components/chat/ContactsList.vue @@ -1,10 +1,10 @@ \ No newline at end of file diff --git a/src/components/stats/DateChatHeatmapStats.vue b/src/components/stats/DateChatHeatmapStats.vue index f272946..0cef5a3 100644 --- a/src/components/stats/DateChatHeatmapStats.vue +++ b/src/components/stats/DateChatHeatmapStats.vue @@ -8,6 +8,7 @@ import DateTimeSelect from "@/components/utils/DateTimeSelect.vue"; import ColorSelect from "@/components/utils/ColorSelect.vue"; import NumberInput from "@/components/utils/NumberInput.vue"; import ChartInit from "@/components/stats/components/ChartInit.vue"; +import { ElMessage } from 'element-plus'; // https://echarts.apache.org/examples/en/editor.html @@ -173,55 +174,201 @@ const set_top_user = async (wxid: string) => { \ No newline at end of file diff --git a/src/components/stats/DateChatStats.vue b/src/components/stats/DateChatStats.vue index 8b13aa0..f292049 100644 --- a/src/components/stats/DateChatStats.vue +++ b/src/components/stats/DateChatStats.vue @@ -7,6 +7,7 @@ import {gen_show_name, type User} from "@/utils/common_utils"; import DateTimeSelect from "@/components/utils/DateTimeSelect.vue"; import ColorSelect from "@/components/utils/ColorSelect.vue"; import ChartInit from "@/components/stats/components/ChartInit.vue"; +import { ElMessage } from 'element-plus'; // https://echarts.apache.org/examples/en/editor.html @@ -270,57 +271,183 @@ const set_top_user = async (wxid: string) => { \ No newline at end of file diff --git a/src/components/utils/DbInitComponent.vue b/src/components/utils/DbInitComponent.vue index 91bee9b..30d96ce 100644 --- a/src/components/utils/DbInitComponent.vue +++ b/src/components/utils/DbInitComponent.vue @@ -5,6 +5,7 @@ import {defineEmits, onMounted, ref, watch} from "vue"; import {ElTable, ElTableColumn, ElMessage, ElMessageBox} from "element-plus"; import type {Action} from 'element-plus' import router from "@/router"; +import { Clock, MagicStick, Setting } from '@element-plus/icons-vue' interface wxinfo { pid: string; @@ -25,7 +26,8 @@ interface LocalWxid { const percentage = ref(0); const startORstop = ref(-1); // 用于进度条的开始和停止 0表示0% 1表示100% -const init_type = ref(""); +type InitType = 'last' | 'auto' | 'custom'| ''; +const init_type = ref(''); const is_init = ref(false); const wxinfoData = ref([]); @@ -45,11 +47,13 @@ const local_wxids = ref([]); const db_init = (init: boolean) => { if (init) { localStorage.setItem('isDbInit', "t"); - router.push('/'); + // router.push('/'); ElMessage({ type: 'success', message: '初始化成功!', + duration: 3000, }) + init_type.value = ''; } } @@ -231,200 +235,147 @@ watch(init_type, (val) => { \ No newline at end of file diff --git a/src/views/IndexView.vue b/src/views/IndexView.vue index c82d591..6b23163 100644 --- a/src/views/IndexView.vue +++ b/src/views/IndexView.vue @@ -18,13 +18,83 @@ onMounted(getVersion); \ No newline at end of file diff --git a/src/views/other/AboutView.vue b/src/views/other/AboutView.vue index fd0283f..171135e 100644 --- a/src/views/other/AboutView.vue +++ b/src/views/other/AboutView.vue @@ -1,67 +1,173 @@ + \ No newline at end of file diff --git a/src/views/other/HelpView.vue b/src/views/other/HelpView.vue index 6c3c648..a2963bd 100644 --- a/src/views/other/HelpView.vue +++ b/src/views/other/HelpView.vue @@ -1,33 +1,134 @@ - \ No newline at end of file diff --git a/src/views/other/SettingView.vue b/src/views/other/SettingView.vue index 4783799..38b81ea 100644 --- a/src/views/other/SettingView.vue +++ b/src/views/other/SettingView.vue @@ -1,47 +1,262 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/tools/BiasView.vue b/src/views/tools/BiasView.vue index f9a199f..9314f1f 100644 --- a/src/views/tools/BiasView.vue +++ b/src/views/tools/BiasView.vue @@ -120,12 +120,12 @@ const decrypt = async () => { padding: 20px; display: flex; justify-content: center; - align-items: center; + align-items: top; } .bias-card { - width: 80%; - max-width: 800px; + width: 90%; + /* max-width: 800px; */ border-radius: 8px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); } diff --git a/src/views/tools/DecryptView.vue b/src/views/tools/DecryptView.vue index eb9d34a..58a7ca3 100644 --- a/src/views/tools/DecryptView.vue +++ b/src/views/tools/DecryptView.vue @@ -94,12 +94,12 @@ const decrypt = async () => { padding: 20px; display: flex; justify-content: center; - align-items: center; + align-items: top; } .decrypt-card { - width: 80%; - max-width: 800px; + width: 90%; + /* max-width: 800px; */ border-radius: 8px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); } diff --git a/src/views/tools/MergeView.vue b/src/views/tools/MergeView.vue index 98bdf6b..3f7dddf 100644 --- a/src/views/tools/MergeView.vue +++ b/src/views/tools/MergeView.vue @@ -84,12 +84,12 @@ const decrypt = async () => { padding: 20px; display: flex; justify-content: center; - align-items: center; + align-items: top; } .merge-card { - width: 80%; - max-width: 800px; + width: 90%; + /* max-width: 800px; */ border-radius: 8px; box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); } diff --git a/src/views/tools/WxinfoView.vue b/src/views/tools/WxinfoView.vue index 939e204..15f2e89 100644 --- a/src/views/tools/WxinfoView.vue +++ b/src/views/tools/WxinfoView.vue @@ -46,8 +46,8 @@ const downloadCSV = (csvContent: string, fileName: string) => { const blob = new Blob([new Uint8Array([0xEF, 0xBB, 0xBF]), csvContent], { type: 'text/csv;charset=utf-8;' }); const link = document.createElement('a'); - if (navigator.msSaveBlob) { - navigator.msSaveBlob(blob, fileName); + if ((navigator as any).msSaveBlob) { + (navigator as any).msSaveBlob(blob, fileName); } else { link.href = URL.createObjectURL(blob); link.setAttribute('download', fileName); From 2a345a8c4d254fef3e89524ca7143124ca22a50b Mon Sep 17 00:00:00 2001 From: LuChao Date: Wed, 16 Apr 2025 13:09:57 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0README.md=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE=E4=BB=8B=E7=BB=8D=E3=80=81?= =?UTF-8?q?=E5=90=AF=E5=8A=A8=E8=AF=B4=E6=98=8E=E5=8F=8A=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E6=8C=87=E5=8D=97=EF=BC=8C=E4=BB=A5=E4=BE=BF=E4=BA=8E?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=92=8C=E5=BC=80=E5=8F=91=E8=80=85=E6=9B=B4?= =?UTF-8?q?=E5=A5=BD=E5=9C=B0=E7=90=86=E8=A7=A3=E5=92=8C=E4=BD=BF=E7=94=A8?= =?UTF-8?q?PyWxDump-UI=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c046b31..b741c66 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ -## 这是[PyWxDump](https://github.com/xaoyaoo/PyWxDump)的Web版,用于在浏览器中查看微信聊天记录。 \ No newline at end of file +# PyWxDump-UI + +这是[PyWxDump](https://github.com/xaoyaoo/PyWxDump)的Web版,用于在浏览器中查看微信聊天记录。 + +开发者朋友可以基于此项目二次开发自己的UI界面 + +## 启动UI + +``` +npm i + +npm run dev +``` + +启动后在http://localhost:8080访问 From dc3bc9a01e14a59fca5af73b2574428685aeedde Mon Sep 17 00:00:00 2001 From: LuChao Date: Wed, 16 Apr 2025 13:31:10 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E5=AE=BD=E5=BA=A6=E5=92=8C=E6=8C=89=E9=92=AE=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BB=A5=E4=BC=98=E5=8C=96=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E7=94=A8=E6=88=B7=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 626cafd..a0eb040 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,7 +50,7 @@ const handleClose = (key: string, keyPath: string[]) => {
- + @@ -221,7 +221,7 @@ header { .collapse-btn-container { position: absolute; right: -14px; - top: 50%; + top: 350px; transform: translateY(-50%); z-index: 1; } From 585d96ed5ccd878714c1769e8a2bf9553cb50596 Mon Sep 17 00:00:00 2001 From: LuChao Date: Wed, 16 Apr 2025 18:32:51 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BE=A7=E8=BE=B9?= =?UTF-8?q?=E6=A0=8F=E5=AE=BD=E5=BA=A6=E5=92=8C=E6=8C=89=E9=92=AE=E4=BD=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BB=A5=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=B8=83=E5=B1=80=E5=92=8C=E6=8F=90=E5=8D=87=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E4=BD=93=E9=AA=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index a0eb040..b030c9c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -50,7 +50,7 @@ const handleClose = (key: string, keyPath: string[]) => {
- + @@ -220,7 +220,7 @@ header { .collapse-btn-container { position: absolute; - right: -14px; + right: 0px; top: 350px; transform: translateY(-50%); z-index: 1;