Skip to content

Commit

Permalink
✨ feat(MotnlyUserLog): radius and test update
Browse files Browse the repository at this point in the history
  • Loading branch information
CakeAL committed Oct 23, 2024
1 parent 8ee1ad7 commit 40d7d63
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 22 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ustb-wifi-tools",
"private": true,
"version": "0.7.1",
"version": "0.7.2",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const show1 = ref(false);
<p>3. 重启电脑。</p>
<p>注销页和登录页网址:http://202.204.48.66/ 或者 http://login.ustb.edu.cn/ (你知道么,学号是可以点击的)</p>
<br/>
<p>当前 version = "0.7.1"</p>
<p>当前 version = "0.7.2"</p>
</n-space>
</n-card>
</div>
Expand Down
30 changes: 13 additions & 17 deletions src/pages/MonthlyUserLog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const monthly_user_log = ref<Array<EveryLoginData>>([]);
const start_date = ref<number>(Date.now());
const the_week_of_first_day = ref<Array<number>>([]);
const refresh = ref(true);
const select_show_value = ref<string | null>("ipv4_down");
const select_show_value = ref<string>("ipv4_down");
const select_show_options = [
{
label: "ipv4 下行",
Expand Down Expand Up @@ -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 => {
Expand Down Expand Up @@ -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;
}
</style>

0 comments on commit 40d7d63

Please sign in to comment.