From a4173c327dfee30a6fbfd26f4b4b0c7fb6a47d1d Mon Sep 17 00:00:00 2001 From: nite Date: Wed, 4 Feb 2026 20:49:40 +0800 Subject: [PATCH] refactor: config package --- README.md | 5 +- frontend/src/components/MainLayout.vue | 32 +++++-- frontend/src/components/PeerCard.vue | 3 + go.mod | 10 +++ go.sum | 20 +++++ internal/config/config.go | 116 +++++++++++++++++++++++++ internal/config/window.go | 54 ------------ internal/transfer/server.go | 2 +- internal/transfer/service.go | 11 +-- main.go | 44 +++++----- 10 files changed, 206 insertions(+), 91 deletions(-) create mode 100644 internal/config/config.go delete mode 100644 internal/config/window.go diff --git a/README.md b/README.md index 46b3612..76d953f 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ TODO - [x] 剪辑板传输 - [x] 文件夹传输 - [x] 多样化图标 -- [ ] 加密传输 - [x] 取消传输 -- [x] 多文件发送 \ No newline at end of file +- [x] 多文件发送 +- [ ] 加密传输 +- [ ] 设置页面:默认保存路径 \ No newline at end of file diff --git a/frontend/src/components/MainLayout.vue b/frontend/src/components/MainLayout.vue index 69a0c96..0d912a1 100644 --- a/frontend/src/components/MainLayout.vue +++ b/frontend/src/components/MainLayout.vue @@ -10,8 +10,6 @@ import { NSpace, NText, NEmpty, - NGrid, - NGi, NMenu, NBadge, NButton, @@ -176,15 +174,15 @@ const handleMenuUpdate = (key: string) => {
-
+
- - +
+
- - +
+
@@ -199,7 +197,7 @@ const handleMenuUpdate = (key: string) => {
-
+
{ transform: rotate(360deg); } } + +.peer-grid { + display: grid; + grid-template-columns: repeat(1, minmax(0, 1fr)); + gap: 16px; +} + +@media (min-width: 500px) { + .peer-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +@media (min-width: 700px) { + .peer-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} diff --git a/frontend/src/components/PeerCard.vue b/frontend/src/components/PeerCard.vue index fd381ec..52bbd34 100644 --- a/frontend/src/components/PeerCard.vue +++ b/frontend/src/components/PeerCard.vue @@ -315,7 +315,9 @@ const handleSendFiles = () => { + {