Skip to content

The only downloader you need. 下载器的集大成者。

feat(browser): 已完成任务卡片点击打开文件

XiaoYouChR2433edd683be
diff --git a/browser_extension/app/src/popup/components/TaskCard.tsx b/browser_extension/app/src/popup/components/TaskCard.tsx
index 7ba2fe11..55137ef3 100644
--- a/browser_extension/app/src/popup/components/TaskCard.tsx
+++ b/browser_extension/app/src/popup/components/TaskCard.tsx
@@ -18,6 +18,9 @@ const useStyles = makeStyles({
padding: "8px 10px",
overflow: "hidden",
},
+ clickable: {
+ cursor: "pointer",
+ },
row: {
display: "flex",
alignItems: "center",
@@ -130,7 +133,11 @@ export function TaskCard({
: styles.meta;
return (
- <Card appearance="filled-alternative" className={styles.root}>
+ <Card
+ appearance="filled-alternative"
+ className={`${styles.root}${isCompleted && task.canOpenFile ? ` ${styles.clickable}` : ""}`}
+ onClick={isCompleted && task.canOpenFile && !busy ? () => onAction("open_file") : undefined}
+ >
<div className={styles.row}>
<Avatar
color="colorful"