Skip to content

Let's use AI to Earn!

feat: 通知模块

yikaJasonMicd311701fc105
diff --git a/electron/main/autoRun/controller.ts b/electron/main/autoRun/controller.ts
index 29a3c35b..25161bfb 100644
--- a/electron/main/autoRun/controller.ts
+++ b/electron/main/autoRun/controller.ts
@@ -1,7 +1,7 @@
/*
* @Author: nevin
* @Date: 2025-01-20 22:02:54
- * @LastEditTime: 2025-03-23 11:05:01
+ * @LastEditTime: 2025-03-23 15:18:02
* @LastEditors: nevin
* @Description: autoRun AutoRun
*/
@@ -111,6 +111,10 @@ export class AutoRunController {
// 每5分钟进行一次自动启动
@Scheduled('*/1 * * * *', 'all_auto_run_start')
async syncAllAutoRunStart() {
+ console.log('------111', 222);
+
+ windowOperate.sendRenderMsg(SendChannelEnum.AutoRunError, 111);
+
try {
const userInfo = getUserInfo();
diff --git a/electron/main/reply/controller.ts b/electron/main/reply/controller.ts
index 4e600daf..5a4a8a01 100644
--- a/electron/main/reply/controller.ts
+++ b/electron/main/reply/controller.ts
@@ -1,13 +1,12 @@
/*
* @Author: nevin
* @Date: 2025-01-20 22:02:54
- * @LastEditTime: 2025-03-23 09:57:58
+ * @LastEditTime: 2025-03-23 15:03:20
* @LastEditors: nevin
* @Description: reply Reply
*/
import { AutoRunModel, AutoRunType } from '../../db/models/autoRun';
import { AccountService } from '../account/service';
-import { autoRunTypeEtTag } from '../autoRun/comment';
import { AutoRunService } from '../autoRun/service';
import { Controller, Et, Icp, Inject } from '../core/decorators';
import platController from '../plat';
diff --git a/src/App.tsx b/src/App.tsx
index 03713586..28fc399d 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,7 +1,7 @@
/*
* @Author: nevin
* @Date: 2025-01-17 19:25:29
- * @LastEditTime: 2025-01-23 15:41:13
+ * @LastEditTime: 2025-03-23 15:00:16
* @LastEditors: nevin
* @Description: 主应用
*/
@@ -9,6 +9,7 @@
import { RouterProvider } from 'react-router-dom';
import router from '@/router/index';
import { ConfigProvider } from 'antd';
+import Inform from './components/Inform';
const App = () => {
return (
@@ -19,6 +20,7 @@ const App = () => {
},
}}
>
+ <Inform onChooseItem={() => {}} />
<RouterProvider router={router} />
</ConfigProvider>
);
diff --git a/src/components/Inform/index.tsx b/src/components/Inform/index.tsx
new file mode 100644
index 00000000..269ed81e
--- /dev/null
+++ b/src/components/Inform/index.tsx
@@ -0,0 +1,30 @@
+/*
+ * @Author: nevin
+ * @Date: 2025-03-23 14:53:37
+ * @LastEditTime: 2025-03-23 15:16:11
+ * @LastEditors: nevin
+ * @Description: 通知的全局组件
+ */
+//
+import { SendChannelEnum } from '@@/UtilsEnum';
+import React, { FC, useEffect } from 'react';
+
+interface InformProps {
+ onChooseItem: () => void;
+}
+const Inform: FC<InformProps> = ({}) => {
+ useEffect(() => {
+ const e = window.ipcRenderer.on(SendChannelEnum.AutoRunError, (e, args) => {
+ // window.ipcRenderer.off('AutoRunError', e);
+ console.log('---------');
+ console.log('--------- e', e);
+ console.log('--------- args', args);
+ });
+ }, []);
+
+ function onChooseItem() {
+ console.log('onChooseItem');
+ }
+ return <></>;
+};
+export default Inform;
diff --git a/src/views/reply/index.tsx b/src/views/reply/index.tsx
index e88e7b7b..60d604cd 100644
--- a/src/views/reply/index.tsx
+++ b/src/views/reply/index.tsx
@@ -1,7 +1,7 @@
/*
* @Author: nevin
* @Date: 2025-02-10 22:20:15
- * @LastEditTime: 2025-03-23 11:55:30
+ * @LastEditTime: 2025-03-23 15:01:19
* @LastEditors: nevin
* @Description: 评论页面 reply
*/
@@ -29,12 +29,6 @@ export default function Page() {
const Ref_AddAutoRun = useRef<AddAutoRunRef>(null);
const Ref_ReplyComment = useRef<ReplyCommentRef>(null);
- useEffect(() => {
- const e = window.ipcRenderer.on('AutoRunError', (e, args) => {
- // window.ipcRenderer.off('AutoRunError', e);
- });
- }, []);
-
async function getCreatorList() {
if (activeAccountId === -1) {
return;