Skip to content

Commit

Permalink
2.4.8 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Feb 4, 2025
1 parent f867a0e commit 5801c56
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filecat",
"version": "2.4.7",
"version": "2.4.8",
"description": "filecat 文件管理器",
"author": "xiaobaidadada",
"scripts": {
Expand Down Expand Up @@ -145,7 +145,7 @@
"socket.io-parser": "^4.2.4",
"sshpk": "^1.18.0",
"style-loader": "^3.3.4",
"systeminformation": "^5.22.11",
"systeminformation": "^5.25.11",
"tar": "^7.4.3",
"tldts": "^6.1.20",
"ts-node": "^10.9.2",
Expand Down
7 changes: 7 additions & 0 deletions src/common/ValueUtil.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,10 @@ export function formatter_time(date){
return formatter.format(date);
}

export function max_pages(total, pageSize) {
if (total <= 0 || pageSize <= 0) {
return 0;
}
return Math.ceil(total / pageSize);
}

1 change: 0 additions & 1 deletion src/main/domain/ddns/ddns.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import si from "systeminformation";
import {Ali, DdnsConnection, DdnsIPPojo, DdnsType, DnsPod, getIpType, Tengxun} from "../../../common/req/ddns.pojo";
import {HttpRequest} from "../../../common/http";
import {Fail, Sucess} from "../../other/Result";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import TreeView from "../../../../../meta/component/TreeView";
import {tree_list} from "../../../../../../common/req/common.pojo";
import {Shell} from "../../../shell/Shell";
import {Terminal} from "@xterm/xterm";
import { max_pages } from "../../../../../../common/ValueUtil";

let terminal_init_resolve;
let terminal_value;
Expand Down Expand Up @@ -65,7 +66,7 @@ export function WorkFlow(props) {
v.index = value.index;
return v}))
set_total(pojo.total);
set_max_page_num(parseInt(((pojo.total / page_size)+1).toFixed(0)))
set_max_page_num(max_pages(pojo.total,page_size))
}

const search_run_name = async (search_name)=>{
Expand All @@ -82,7 +83,7 @@ export function WorkFlow(props) {
v.index = value.index;
return v}))
set_total(pojo.total);
set_max_page_num(parseInt(((pojo.total / page_size)+1).toFixed(0)))
set_max_page_num(max_pages(pojo.total,page_size))
set_page_num(0)
set_search_name_status(false);
}
Expand Down

0 comments on commit 5801c56

Please sign in to comment.