|
|
@@ -1,4 +1,4 @@
|
|
|
-import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
|
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
|
import { invoke } from "@tauri-apps/api/core";
|
|
|
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
|
|
import { getCurrentWindow } from "@tauri-apps/api/window";
|
|
|
@@ -10,10 +10,8 @@ import {
|
|
|
countPendingTasks,
|
|
|
listPendingTasks,
|
|
|
markTaskDone,
|
|
|
- updateTaskPic,
|
|
|
updateTaskSiteUrl,
|
|
|
updateTaskTags,
|
|
|
- updateTaskVideo,
|
|
|
type Task,
|
|
|
} from "./lib/tasks";
|
|
|
import {
|
|
|
@@ -49,8 +47,6 @@ import {
|
|
|
} from "./lib/recorder";
|
|
|
import "./App.css";
|
|
|
import {
|
|
|
- BackwardOutlined,
|
|
|
- BankOutlined,
|
|
|
CheckCircleOutlined,
|
|
|
CloseOutlined,
|
|
|
FileImageOutlined,
|
|
|
@@ -63,6 +59,7 @@ import {
|
|
|
PictureOutlined,
|
|
|
PlayCircleFilled,
|
|
|
PlusOutlined,
|
|
|
+ RedoOutlined,
|
|
|
StopOutlined,
|
|
|
VideoCameraOutlined,
|
|
|
} from "@ant-design/icons";
|
|
|
@@ -126,7 +123,8 @@ async function loadInWebview(taskId: string, url: string) {
|
|
|
function App() {
|
|
|
// 当前激活的任务 id(仅用于左栏视觉高亮)
|
|
|
const [activeId, setActiveId] = useState<string | null>(null);
|
|
|
-
|
|
|
+ const activeIdRef = useRef(activeId);
|
|
|
+ activeIdRef.current = activeId;
|
|
|
|
|
|
// 待处理任务(status=0)的真实列表,来自 sqlite
|
|
|
const [tasks, setTasks] = useState<Task[]>([]);
|
|
|
@@ -754,14 +752,14 @@ function App() {
|
|
|
// size="large"
|
|
|
type="text"
|
|
|
data-tauri-drag-region="no-drag"
|
|
|
- onClick={handleBack}
|
|
|
+ // onClick={handleBack}
|
|
|
/>
|
|
|
<Button
|
|
|
icon={<RedoOutlined />}
|
|
|
// size="large"
|
|
|
type="text"
|
|
|
data-tauri-drag-region="no-drag"
|
|
|
- onClick={handleRefresh}
|
|
|
+ // onClick={handleRefresh}
|
|
|
/>
|
|
|
|
|
|
<Tooltip
|