From 40d7d63e32aaa67985dc0532d48b0b1af39d2eca Mon Sep 17 00:00:00 2001 From: CakeAL <1742507190@qq.com> Date: Wed, 23 Oct 2024 22:55:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(MotnlyUserLog):=20radius=20and?= =?UTF-8?q?=20test=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- src/pages/About.vue | 2 +- src/pages/MonthlyUserLog.vue | 30 +++++++++++++----------------- 6 files changed, 18 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 56df333..eb564d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ustb-wifi-tools", "private": true, - "version": "0.7.1", + "version": "0.7.2", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 6d40384..918ef85 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4630,7 +4630,7 @@ dependencies = [ [[package]] name = "ustb-wifi-tools" -version = "0.7.1" +version = "0.7.2" dependencies = [ "anyhow", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index a71bf29..59b12ee 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ustb-wifi-tools" -version = "0.7.1" +version = "0.7.2" description = "A Tauri App that can be used to get information of the USTB Wifi" authors = ["CakeAL"] edition = "2021" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 393c809..c1ab3cd 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "productName": "ustb-wifi-tools", "mainBinaryName": "ustb-wifi-tools", - "version": "0.7.1", + "version": "0.7.2", "identifier": "ustb.wifi.tools", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src/pages/About.vue b/src/pages/About.vue index 9fb0bb2..a889614 100644 --- a/src/pages/About.vue +++ b/src/pages/About.vue @@ -55,7 +55,7 @@ const show1 = ref(false);

3. 重启电脑。

注销页和登录页网址:http://202.204.48.66/ 或者 http://login.ustb.edu.cn/ (你知道么,学号是可以点击的)


-

当前 version = "0.7.1"

+

当前 version = "0.7.2"

diff --git a/src/pages/MonthlyUserLog.vue b/src/pages/MonthlyUserLog.vue index 8c6eb0b..9f002fa 100644 --- a/src/pages/MonthlyUserLog.vue +++ b/src/pages/MonthlyUserLog.vue @@ -11,7 +11,7 @@ const monthly_user_log = ref>([]); const start_date = ref(Date.now()); const the_week_of_first_day = ref>([]); const refresh = ref(true); -const select_show_value = ref("ipv4_down"); +const select_show_value = ref("ipv4_down"); const select_show_options = [ { label: "ipv4 下行", @@ -98,22 +98,16 @@ const getBackgroundColor = (data: number) => { }; const select_to_data = (item: EveryLoginData): number => { - if (select_show_value.value == "ipv4_down") { - return item.ipv4_down; - } else if (select_show_value.value == "ipv4_up") { - return item.ipv4_up; - } else if (select_show_value.value == "ipv6_down") { - return item.ipv6_down; - } else if (select_show_value.value == "ipv6_up") { - return item.ipv6_up; - } else if (select_show_value.value == "all") { - return item.ipv4_down + item.ipv4_up + item.ipv6_down + item.ipv6_up; - } else if (select_show_value.value == "cost") { - return item.cost; - } else if (select_show_value.value == "used_duration") { - return item.used_duration; - } - return 0; + const fieldMap: { [key: string]: number } = { + ipv4_down: item.ipv4_down, + ipv4_up: item.ipv4_up, + ipv6_down: item.ipv6_down, + ipv6_up: item.ipv6_up, + all: item.ipv4_down + item.ipv4_up + item.ipv6_down + item.ipv6_up, + cost: item.cost, + used_duration: item.used_duration, + }; + return fieldMap[select_show_value.value] || 0; }; const data_type = (): string => { @@ -185,9 +179,11 @@ const data_type = (): string => { .gray { height: 50px; text-align: center; + border-radius: 5px; background-color: rgb(80, 80, 80, 0.2); } .day { height: 50px; + border-radius: 5px; }