Skip to content

Commit

Permalink
Merge pull request #503 from meetqy/498-window-未同步记录显示问题
Browse files Browse the repository at this point in the history
未同步记录显示 BUG
  • Loading branch information
meetqy authored Nov 5, 2023
2 parents 9335f37 + 80f67c6 commit f7df9ec
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion apps/electron/src/renderer/src/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const Row = (props: Props) => {
onClick={props.onRightClick}
>
<div
className={`w-4/5 text-right ${
className={`w-4/5 max-w-[400px] text-right ${
typeof props.right === "string" ? "truncate" : ""
}`}
>
Expand Down
12 changes: 7 additions & 5 deletions apps/electron/src/renderer/src/pages/unsync/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const UnsyncPage = () => {
orderBy: "desc",
});

const libPath = `${lib.data?.path}/images/`;
const libPath = lib.data?.path ?? "";

const data = logQuery.data?.data ?? [];

Expand Down Expand Up @@ -69,11 +69,13 @@ const UnsyncPage = () => {
{item.type === "unknown" ? "unkonwn error" : item.type}
</span>
}
right={item.path
.replace(libPath, "")
.replace("/metadata.json", "")}
right={item.path.replace(libPath, "")}
onRightClick={() => {
void window.dialog.showErrorBox(item.path, item.message);
if (item.type === "unknown") {
void window.dialog.showErrorBox(item.path, item.message);
} else {
void window.shell.showItemInFolder(item.path);
}
}}
/>
))}
Expand Down

0 comments on commit f7df9ec

Please sign in to comment.