|
|
@@ -4,7 +4,7 @@ import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
|
|
import { getCurrentWindow } from "@tauri-apps/api/window";
|
|
|
import { WebviewWindow } from "@tauri-apps/api/webviewWindow";
|
|
|
import { openUrl, revealItemInDir } from "@tauri-apps/plugin-opener";
|
|
|
-import { Button, ConfigProvider, Divider, InputNumber, Layout, Menu, notification, Space, theme, Tooltip } from "antd";
|
|
|
+import { Button, Divider, InputNumber, Layout, Menu, notification, Space, theme, Tooltip } from "antd";
|
|
|
import {
|
|
|
countPendingTasks,
|
|
|
listPendingTasks,
|
|
|
@@ -46,6 +46,7 @@ import {
|
|
|
MinusOutlined,
|
|
|
PictureOutlined,
|
|
|
PlayCircleFilled,
|
|
|
+ PlusOutlined,
|
|
|
StopOutlined,
|
|
|
VideoCameraOutlined,
|
|
|
} from "@ant-design/icons";
|
|
|
@@ -206,7 +207,8 @@ function App() {
|
|
|
const pending = await countPendingTasks().catch(() => 0);
|
|
|
const list = await reloadTasks();
|
|
|
if (pending === 0 && list.length === 0) {
|
|
|
- await openImportWindow();
|
|
|
+ setTimeout(() =>
|
|
|
+ openImportWindow(), 500);
|
|
|
}
|
|
|
})();
|
|
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
|
@@ -789,6 +791,7 @@ function App() {
|
|
|
</Header>
|
|
|
<Layout>
|
|
|
<Sider className="select-none" collapsible collapsed={collapsed} onCollapse={(c) => handleCollaspsed(c)} width={180} style={{ background: colorBgContainer }}>
|
|
|
+ <div className="flex justify-between">所有任务<Button icon={<PlusOutlined />} onClick={openImportWindow} /> </div>
|
|
|
<Menu
|
|
|
mode="inline"
|
|
|
defaultSelectedKeys={[activeId || '']}
|
|
|
@@ -819,11 +822,4 @@ function App() {
|
|
|
|
|
|
|
|
|
|
|
|
-export default function Main() {
|
|
|
- return <ConfigProvider theme={{
|
|
|
- // 1. Use dark algorithm alone
|
|
|
- algorithm: [theme.darkAlgorithm, theme.compactAlgorithm]
|
|
|
- }}>
|
|
|
- <App />
|
|
|
- </ ConfigProvider>
|
|
|
-};
|
|
|
+export default App;
|