From d7402cc3dbe8ab51405b3541804939c7a69ade0e Mon Sep 17 00:00:00 2001 From: CakeAL <1742507190@qq.com> Date: Fri, 15 Nov 2024 18:13:16 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=A6=84=20refactor(helper):=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/helper.ts | 8 ++++++++ src/pages/About.vue | 2 +- src/pages/MonthPay.vue | 11 +---------- src/pages/MonthlyUserLog.vue | 4 ++-- 8 files changed, 16 insertions(+), 17 deletions(-) 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)); -}; -