Skip to content

Commit

Permalink
1.0.32 优化一些细节
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaobaidadada committed Jan 4, 2025
1 parent abfd7c1 commit 8902836
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "filecat",
"version": "1.0.31",
"version": "1.0.32",
"description": "filecat 文件管理器",
"author": "xiaobaidadada",
"scripts": {
Expand Down
7 changes: 4 additions & 3 deletions src/main/domain/file/file.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -636,12 +636,13 @@ class FileService extends FileCompress {
// 找到首字节
for (let j = 0; j < bytesRead; j++) {
if (this.isFirstByte(buffer[j])) {
index = j +1;
index = j -1;
break;
}
}
}
pojo.position = position + index +2;
const now_str_start = index ===0 && pojo.position ===0 ?0:index+1;
pojo.position = position + now_str_start ;
fs.closeSync(fd);
return;
}
Expand Down Expand Up @@ -686,7 +687,7 @@ class FileService extends FileCompress {
// 找到首字节
for (let j = 0; j < last_h; j++) {
if (this.isFirstByte(buffer[j])) {
index = j +1;
index = j -1;
break;
}
}
Expand Down
9 changes: 9 additions & 0 deletions src/web/meta/component/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ export function TextTip(props: TextProps) {
)
}

export function LongText(props: TextProps) {
return (
<div className="card-text">
<div className={"card-text-context"}>{props.context ?? props.children}</div>
<div className={"card-text-tip"} >{props.context ?? props.children}</div>
</div>
)
}


export function CardPrompt(props: {
title: string,
Expand Down
3 changes: 2 additions & 1 deletion src/web/meta/resources/css/layout/dashboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ table tr>*:last-child {
width: auto;
white-space: nowrap; /* 不换行 */
border-radius: 0.1rem;
z-index: 1001;
}
.card-text-tip:hover {
display: block;
Expand All @@ -150,7 +151,7 @@ table tr>*:last-child {
width: auto;
white-space: nowrap; /* 不换行 */
border-radius: 0.1rem;

z-index: 1001;
}

.card {
Expand Down
6 changes: 2 additions & 4 deletions src/web/project/component/file/component/LogViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {InputTextIcon} from "../../../../meta/component/Input";
import {useTranslation} from "react-i18next";
import {deleteList} from "../../../../../common/ListUtil";
import {search_file_cancel} from "../../../../../main/domain/file/file.search";
import {LongText} from "../../../../meta/component/Card";
// const insert_data = (data:string)=> {
// if(!data)return;
// insert_done = false;
Expand Down Expand Up @@ -466,11 +467,8 @@ export default function LogViewer(props) {
setShellShow({show: false})
}}/>,
<div key={2} style={{
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
overflow: 'hidden',
width: '4rem'
}}>{shellShow.fileName}</div>,
}}><LongText context={shellShow.fileName}/></div>,
<React.Fragment key={3}> <InputTextIcon handleEnterPress={search_file} placeholder={t("回车搜索整个文件")}
icon={"search"} value={search} handleInputChange={(v) => {
set_search(v)
Expand Down

0 comments on commit 8902836

Please sign in to comment.