diff --git a/package.json b/package.json index fb67591..3a48ba7 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ustb-wifi-tools", "private": true, - "version": "0.8.8", + "version": "0.8.9", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 4bc9f1d..63449ce 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4626,7 +4626,7 @@ dependencies = [ [[package]] name = "ustb-wifi-tools" -version = "0.8.8" +version = "0.8.9" dependencies = [ "anyhow", "chrono", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 24dc952..a862c70 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ustb-wifi-tools" -version = "0.8.8" +version = "0.8.9" 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 5cc91b0..fcb805f 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.8.8", + "version": "0.8.9", "identifier": "ustb.wifi.tools", "build": { "beforeDevCommand": "pnpm dev", diff --git a/src/helper.ts b/src/helper.ts index b8728c3..413c5cc 100644 --- a/src/helper.ts +++ b/src/helper.ts @@ -25,3 +25,11 @@ export const railStyle = ({ export const mb2gb = (mb: number | undefined) => { return parseFloat(((mb as number) / 1024).toFixed(2)); }; + +export const min2hour = (min: number | undefined) => { + return parseFloat(((min as number) / 60).toFixed(2)); +}; + +export const min2day = (min: number | undefined) => { + return parseFloat(((min as number) / 60 / 24).toFixed(2)); +}; diff --git a/src/pages/About.vue b/src/pages/About.vue index b296d5a..deeb517 100644 --- a/src/pages/About.vue +++ b/src/pages/About.vue @@ -118,7 +118,7 @@ const show1 = ref(false);
4. 通过 pt 站下载大型软件(比如 Photoshop 等)
5. 自建/使用 ipv6 代理服务器
当前 version = "0.8.8"
+当前 version = "0.8.9"
diff --git a/src/pages/MonthPay.vue b/src/pages/MonthPay.vue index 28cf20b..db25de1 100644 --- a/src/pages/MonthPay.vue +++ b/src/pages/MonthPay.vue @@ -2,7 +2,7 @@ import { invoke } from "@tauri-apps/api/core"; import { onMounted, ref } from "vue"; import { useLoadingBar, useMessage } from "naive-ui"; -import { mb2gb } from "../helper"; +import { mb2gb, min2day, min2hour } from "../helper"; interface MonthlyData { month: number; @@ -78,15 +78,6 @@ const load_month_pay = async () => { // console.log(month_pay.value); loadingBar.finish(); }; - -const min2hour = (min: number | undefined) => { - return parseFloat(((min as number) / 60).toFixed(2)); -}; - -const min2day = (min: number | undefined) => { - return parseFloat(((min as number) / 60 / 24).toFixed(2)); -}; - diff --git a/src/pages/MonthlyUserLog.vue b/src/pages/MonthlyUserLog.vue index 70750f3..51e40c0 100644 --- a/src/pages/MonthlyUserLog.vue +++ b/src/pages/MonthlyUserLog.vue @@ -3,7 +3,7 @@ import { onMounted, ref } from "vue"; import { invoke } from "@tauri-apps/api/core"; import { EveryLoginData } from "./UserLoginLog.vue"; import { useLoadingBar, useMessage } from "naive-ui"; -import { railStyle, mb2gb } from "../helper"; +import { railStyle, mb2gb, min2hour } from "../helper"; import dayjs from "dayjs"; const pop_message = useMessage(); @@ -226,7 +226,7 @@ const select_mb_or_gb = (value: string) => {