From 6e028d377acc31b4ec08d1c67b3f9cc5acd95699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=98=89=E4=BC=9F?= <8473136@qq.com> Date: Wed, 21 Aug 2024 13:46:14 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=A2=9E=E5=8A=A0=E9=95=9C?= =?UTF-8?q?=E5=83=8F=E6=BA=90=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/download/index.vue | 231 +++++++++++++++++++++++------------ src/views/proxy/index.vue | 2 +- 2 files changed, 155 insertions(+), 78 deletions(-) diff --git a/src/views/download/index.vue b/src/views/download/index.vue index 8fa8381..7d9af59 100644 --- a/src/views/download/index.vue +++ b/src/views/download/index.vue @@ -5,6 +5,7 @@ import moment from "moment"; import Breadcrumb from "@/layout/compoenets/Breadcrumb.vue"; import { ElMessage } from "element-plus"; import { useDebounceFn } from "@vueuse/core"; +import IconifyIconOffline from "@/components/IconifyIcon/src/iconifyIconOffline"; defineComponent({ name: "Download" @@ -14,6 +15,17 @@ const versions = ref>([]); const loading = ref(1); const downloadPercentage = ref(0); const downloading = ref>(new Map()); +const currMirror = ref("github"); +const mirrors = ref>([ + { + id: "github", + name: "github" + }, + { + id: "ghproxy", + name: "ghproxy" + } +]); /** * 获取版本 @@ -27,7 +39,11 @@ const handleLoadVersions = () => { * @param version */ const handleDownload = useDebounceFn((version: FrpVersion) => { - ipcRenderer.send("github.download", version.id); + // console.log(version, currMirror.value); + ipcRenderer.send("github.download", { + versionId: version.id, + mirror: currMirror.value + }); downloading.value.set(version.id, 0); }, 300); @@ -98,93 +114,154 @@ onUnmounted(() => { - + diff --git a/src/views/proxy/index.vue b/src/views/proxy/index.vue index 0adebd9..3254f17 100644 --- a/src/views/proxy/index.vue +++ b/src/views/proxy/index.vue @@ -317,7 +317,7 @@ onUnmounted(() => { :md="8" :sm="12" :xl="6" - :xs="24" + :xs="12" class="mb-[20px]" >