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]" >