diff --git a/README.md b/README.md index 7b1099b..7c5882c 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [x] 解绑 MAC 地址:可以显示当前设备无线网卡的 MAC 地址进行参考,以及解绑功能 - [x] 测速功能:可以选择不同测速点,贝壳内网,以及其他教育网 ipv6 测速点进行测速(不消耗校园网流量),同时显示当前公网 IP 地址 - [x] 关于页面:一些作者的废话以及我的捐赠打钱二维码,还有一些小 Tips +- [x] 查别人流量,和查电表 ## TODO @@ -26,7 +27,7 @@ - [ ] 前端页面美化 - [ ] 前端加入图表展示,更加直观 - [ ] 密码输入错误超过 3 次之后显示验证码(困难) -- [ ] 给应用签名 +- [ ] 给应用签名(苹果要钱,不签了) - [ ] 设计应用图标,现在的图标是 Tauri 默认的 ## 下载链接 diff --git a/components.d.ts b/components.d.ts index 3492a20..b69edba 100644 --- a/components.d.ts +++ b/components.d.ts @@ -26,6 +26,7 @@ declare module 'vue' { NMessageProvider: typeof import('naive-ui')['NMessageProvider'] NProgress: typeof import('naive-ui')['NProgress'] NResult: typeof import('naive-ui')['NResult'] + NScrollbar: typeof import('naive-ui')['NScrollbar'] NSelect: typeof import('naive-ui')['NSelect'] NSpace: typeof import('naive-ui')['NSpace'] NSplit: typeof import('naive-ui')['NSplit'] diff --git a/src-tauri/src/requests.rs b/src-tauri/src/requests.rs index d6525fa..aedef7f 100644 --- a/src-tauri/src/requests.rs +++ b/src-tauri/src/requests.rs @@ -94,7 +94,7 @@ pub async fn simulate_login(account: &str, password: &str) -> Result Result Result { diff --git a/src/pages/MonthlyUserLog.vue b/src/pages/MonthlyUserLog.vue index 0eff734..cc53c58 100644 --- a/src/pages/MonthlyUserLog.vue +++ b/src/pages/MonthlyUserLog.vue @@ -75,13 +75,14 @@ const get_monthly_user_log = async () => { refresh.value = !refresh.value; }; -const getBackgroundColor = (data: number) => { +const getBackgroundColor = (data_string: string) => { // const max = flow_max; // const min = 0; // const value = data / max * (max - min) + min; // const green = Math.round(255 * (1 - value / max)); // const red = Math.round(255 * (value / max)); // return `rgba(${red}, ${green}, 100, 0.2)`; + let data = parseFloat(data_string); if (data < 1000) { return "rgba(55, 80, 147, 0.5)"; } else if (data < 2000) { @@ -105,7 +106,7 @@ const getBackgroundColor = (data: number) => { } }; -const select_to_data = (item: EveryLoginData): number => { +const select_to_data = (item: EveryLoginData): string => { const fieldMap: { [key: string]: number } = { ipv4_down: item.ipv4_down, ipv4_up: item.ipv4_up, @@ -117,7 +118,11 @@ const select_to_data = (item: EveryLoginData): number => { cost: item.cost, used_duration: item.used_duration, }; - return fieldMap[select_show_value.value] || 0; + return ( + fieldMap[select_show_value.value].toFixed( + select_show_value.value == "cost" ? 2 : 0 + ) || "0" + ); }; const data_type = (): string => { @@ -133,55 +138,57 @@ const data_type = (): string => { diff --git a/src/pages/UserLoginLog.vue b/src/pages/UserLoginLog.vue index d88b14f..975848e 100644 --- a/src/pages/UserLoginLog.vue +++ b/src/pages/UserLoginLog.vue @@ -87,90 +87,90 @@ const railStyle = ({