Skip to content

Let's use AI to Earn!

feat: 1. app所有名称更改。 2. 右上角操作按钮改为全自定义(修复弹框盖不住右上角操作栏的问题,之前是半自定义)。

gaoSir222fee83ddc3
diff --git a/README.md b/README.md
index f890766d..c914a9c6 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
* @Description:
-->
-# AiToEarn 爱团团
+# AiToEarn 爱优赚
![GitHub stars](https://img.shields.io/github/stars/yikart/AttAiToEarn?color=fa6470)
![GitHub license](https://img.shields.io/github/license/yikart/AttAiToEarn)
diff --git a/electron-builder.json b/electron-builder.json
index 6c29fb7d..919ebf99 100644
--- a/electron-builder.json
+++ b/electron-builder.json
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/electron-userland/electron-builder/master/packages/app-builder-lib/scheme.json",
"appId": "cn.yikart.att",
- "productName": "爱团团AiToEarn",
+ "productName": "爱优赚AiToEarn",
"asar": true,
"asarUnpack": ["**/node_modules/sharp/**/*", "**/node_modules/@img/**/*"],
"directories": {
diff --git a/electron/main/index.ts b/electron/main/index.ts
index f709920e..f156c625 100644
--- a/electron/main/index.ts
+++ b/electron/main/index.ts
@@ -11,6 +11,7 @@ import windowOperate from '../util/windowOperate';
import { logger } from '../global/log';
import { SplashWindow } from './splash';
import dotenv from 'dotenv';
+const platform = process.platform;
dotenv.config();
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@@ -51,7 +52,7 @@ async function createWindow() {
// 创建主窗口但先不显示
win = new BrowserWindow({
- title: '爱团团AiToEarn',
+ title: '爱优赚AiToEarn',
icon: path.join(getAssetPath('favicon.ico')),
width: 2350,
height: 1280,
@@ -59,11 +60,14 @@ async function createWindow() {
minHeight: 800,
titleBarStyle: 'hidden',
show: false,
- titleBarOverlay: {
- color: 'rgba(0,0,0,0)',
- height: 64,
- symbolColor: '#595959',
- },
+ titleBarOverlay:
+ platform === 'win32'
+ ? undefined
+ : {
+ color: 'rgba(0,0,0,0)',
+ height: 64,
+ symbolColor: '#595959',
+ },
webPreferences: {
preload,
webviewTag: true,
diff --git a/electron/main/views.ts b/electron/main/views.ts
index f397fbdf..b6b7ec0b 100644
--- a/electron/main/views.ts
+++ b/electron/main/views.ts
@@ -24,6 +24,23 @@ export interface ISaveFileParams {
}
export function views(win: Electron.BrowserWindow) {
+ // 窗口最小化
+ ipcMain.handle('window-minimize', function () {
+ win.minimize();
+ });
+ // 窗口最大化
+ ipcMain.handle('window-maximize', function () {
+ if (win.isMaximized()) {
+ win.restore();
+ } else {
+ win.maximize();
+ }
+ });
+ // 关闭窗口
+ ipcMain.handle('window-close', function () {
+ win.close();
+ });
+
// 获取经纬度
ipcMain.handle('GET_LOCATION', async () => {
let res: any;
diff --git a/electron/tray/systemTray.ts b/electron/tray/systemTray.ts
index 0dc5c3d2..de55bca1 100644
--- a/electron/tray/systemTray.ts
+++ b/electron/tray/systemTray.ts
@@ -46,7 +46,7 @@ export class SystemTray {
},
]);
- this.tray.setToolTip('爱团团AiToEarn');
+ this.tray.setToolTip('爱优赚AiToEarn');
this.tray.setContextMenu(contextMenu);
}
diff --git a/index.html b/index.html
index 62bd1776..b3fcf846 100644
--- a/index.html
+++ b/index.html
@@ -12,7 +12,7 @@
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
- <title>爱团团AiToEarn</title>
+ <title>爱优赚AiToEarn</title>
</head>
<body>
<div id="root"></div>
diff --git a/public/splash.html b/public/splash.html
index c4b8898a..aca358a7 100644
--- a/public/splash.html
+++ b/public/splash.html
@@ -67,7 +67,7 @@
alt="启动图"
onerror="console.error('Failed to load splash image')"
/>
- <div class="splash-title">爱团团</div>
+ <div class="splash-title">爱优赚</div>
</div>
<script>
console.log('Splash HTML loaded');
diff --git a/src/components/WindowControlButtons/WindowControlButtons.tsx b/src/components/WindowControlButtons/WindowControlButtons.tsx
new file mode 100644
index 00000000..6e34dd47
--- /dev/null
+++ b/src/components/WindowControlButtons/WindowControlButtons.tsx
@@ -0,0 +1,63 @@
+import { ForwardedRef, forwardRef, memo, useEffect, useState } from 'react';
+import styles from './windowControlButtons.module.scss';
+import {
+ BorderOutlined,
+ CloseOutlined,
+ MinusOutlined,
+} from '@ant-design/icons';
+import { ipcAppInfo } from '../../icp/app';
+
+export interface IWindowcontrolbuttonsRef {}
+
+export interface IWindowcontrolbuttonsProps {}
+
+const Windowcontrolbuttons = memo(
+ forwardRef(
+ (
+ {}: IWindowcontrolbuttonsProps,
+ ref: ForwardedRef<IWindowcontrolbuttonsRef>,
+ ) => {
+ const [platform, setPlatform] = useState('');
+
+ useEffect(() => {
+ ipcAppInfo().then((res) => {
+ setPlatform(res.platform);
+ });
+ }, []);
+
+ if (platform !== 'win32') return;
+
+ return (
+ <div className={styles.windowControlButtons}>
+ <div
+ className={styles.minimize}
+ onClick={() => {
+ window.ipcRenderer.invoke('window-minimize');
+ }}
+ >
+ <MinusOutlined />
+ </div>
+ <div
+ className={styles.maximize}
+ onClick={() => {
+ window.ipcRenderer.invoke('window-maximize');
+ }}
+ >
+ <BorderOutlined />
+ </div>
+ <div
+ className={styles.close}
+ onClick={() => {
+ window.ipcRenderer.invoke('window-close');
+ }}
+ >
+ <CloseOutlined />
+ </div>
+ </div>
+ );
+ },
+ ),
+);
+Windowcontrolbuttons.displayName = 'Windowcontrolbuttons';
+
+export default Windowcontrolbuttons;
diff --git a/src/components/WindowControlButtons/windowControlButtons.module.scss b/src/components/WindowControlButtons/windowControlButtons.module.scss
new file mode 100644
index 00000000..ed9d9323
--- /dev/null
+++ b/src/components/WindowControlButtons/windowControlButtons.module.scss
@@ -0,0 +1,32 @@
+.windowControlButtons {
+ white-space: nowrap;
+ display: flex;
+ align-items: center;
+ height: 100%;
+ cursor: pointer;
+
+ .minimize, .maximize, .close {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: transparent;
+ transition: 0.3s;
+ width: 50px;
+ color: #595959;
+ font-size: 14px;
+ &:hover {
+ background: rgba(255, 255, 255, 0.2);
+ }
+ }
+ .minimize {
+ }
+ .maximize {
+ }
+ .close {
+ &:hover {
+ color: #fff;
+ background: red;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/layout/Navigation/index.tsx b/src/layout/Navigation/index.tsx
index 1cdf4c41..3f5da07b 100644
--- a/src/layout/Navigation/index.tsx
+++ b/src/layout/Navigation/index.tsx
@@ -12,6 +12,7 @@ import { router } from '@/router';
import SysMenu from '../SysMenu';
import { useEffect, useState } from 'react';
import { ipcAppInfo } from '../../icp/app';
+import Windowcontrolbuttons from '../../components/WindowControlButtons/WindowControlButtons';
const Navigation = () => {
const location = useLocation();
@@ -32,8 +33,8 @@ const Navigation = () => {
<nav className={`${styles.navigation} ${styles['navigation-' + platform]}`}>
<div className="navigation_left">
<div className="navigation-logo">
- <img src={logo} alt="爱团团AiToEarn" className="w-9 h-9" />
- <span>爱团团AiToEarn</span>
+ <img src={logo} alt="爱优赚AiToEarn" className="w-9 h-9" />
+ <span>爱优赚AiToEarn</span>
</div>
<ul className="navigation-list">
@@ -64,6 +65,8 @@ const Navigation = () => {
<div className="navigation-userinfo">
<SysMenu />
</div>
+
+ <Windowcontrolbuttons />
</nav>
);
};
diff --git a/src/layout/Navigation/navigation.module.scss b/src/layout/Navigation/navigation.module.scss
index d9a8b52d..d932608f 100644
--- a/src/layout/Navigation/navigation.module.scss
+++ b/src/layout/Navigation/navigation.module.scss
@@ -67,7 +67,13 @@
}
.navigation-win32 {
- padding-right: 140px;
+ //padding-right: 140px;
+ padding-right: 0;
+ :global {
+ .navigation-userinfo {
+ margin-right: 20px;
+ }
+ }
}
.navigation-darwin {
diff --git a/src/views/interaction/index.tsx b/src/views/interaction/index.tsx
index 4c5e79b6..4dc73706 100644
--- a/src/views/interaction/index.tsx
+++ b/src/views/interaction/index.tsx
@@ -33,7 +33,7 @@ export default function Page() {
const Ref_InteractionOneKey = useRef<InteractionOneKeyRef>(null);
async function getCreatorList(accountId: number) {
- const res = await getCommentSearchNotes(accountId, '爱团团', {
+ const res = await getCommentSearchNotes(accountId, '爱优赚', {
...pageInfo,
postFirstId: '',
});
diff --git a/src/views/login/components/PhoneLogin.tsx b/src/views/login/components/PhoneLogin.tsx
index 5d6e6354..35fa1013 100644
--- a/src/views/login/components/PhoneLogin.tsx
+++ b/src/views/login/components/PhoneLogin.tsx
@@ -52,7 +52,7 @@ const PhoneLogin = memo(
return (
<div className={styles.phoneLogin}>
<div className={styles.loginHeader}>
- <h2>欢迎来到爱团团</h2>
+ <h2>欢迎来到爱优赚</h2>
<p>请使用手机号登录</p>
</div>
<Form
diff --git a/src/views/login/components/qrcodeLogin.tsx b/src/views/login/components/qrcodeLogin.tsx
index 3670ac54..60ba0cb1 100644
--- a/src/views/login/components/qrcodeLogin.tsx
+++ b/src/views/login/components/qrcodeLogin.tsx
@@ -100,7 +100,7 @@ export default forwardRef<PubItemRef>((props, ref) => {
<div className={styles.qrcodeLogin}>
<div className={styles.qrcodeHeader}>
<h2>微信扫码登录</h2>
- <p>请使用微信扫描二维码关注爱团团公众号</p>
+ <p>请使用微信扫描二维码关注爱优赚公众号</p>
</div>
<div className={styles.qrcodeWrapper}>
@@ -127,7 +127,7 @@ export default forwardRef<PubItemRef>((props, ref) => {
</div>
<div className={styles.agreement}>
- 登录即表示已接受爱团团
+ 登录即表示已接受爱优赚
<a
href="#"
onClick={(e) => {
diff --git a/src/views/login/index.tsx b/src/views/login/index.tsx
index 89b6992d..a7cf856b 100644
--- a/src/views/login/index.tsx
+++ b/src/views/login/index.tsx
@@ -14,6 +14,7 @@ import platformSvg from './svgs/icon-platform.svg';
import accountSvg from './svgs/icon-account.svg';
import mediaSvg from './svgs/icon-media.svg';
import logo from '@/assets/logo.png';
+import Windowcontrolbuttons from "../../components/WindowControlButtons/WindowControlButtons";
const Login = () => {
const features = [
@@ -45,6 +46,11 @@ const Login = () => {
return (
<div className={`${styles.login}`}>
+ <div className="login-navbar">
+ <div className="login-navbar-darg" />
+ <Windowcontrolbuttons />
+ </div>
+
<div className={`${styles.login_wrap} ${styles.login_left}`}>
<div className={styles.login_left_top}>
<img src={logo} alt="logo" width={80} />
diff --git a/src/views/login/login.module.scss b/src/views/login/login.module.scss
index ae7501ff..94a0e99b 100644
--- a/src/views/login/login.module.scss
+++ b/src/views/login/login.module.scss
@@ -3,16 +3,33 @@
height: 100%;
position: relative;
- &:after {
- content: "";
- display: block;
- position: absolute;
- width: 100%;
- height: 80px;
- user-select: none;
- -webkit-app-region: drag;
+ :global {
+ .login-navbar {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 60px;
+ display: flex;
+ .login-navbar-darg {
+ width: 100%;
+ -webkit-app-region: drag;
+ user-select: none;
+ height: 100%;
+ }
+ }
}
+ //&:after {
+ // content: "";
+ // display: block;
+ // position: absolute;
+ // width: 100%;
+ // height: 80px;
+ // user-select: none;
+ // -webkit-app-region: drag;
+ //}
+
.login_wrap {
width: 50%;
height: 100%;
diff --git a/src/views/publish/children/pubRecord/components/PubRecordDetails.tsx b/src/views/publish/children/pubRecord/components/PubRecordDetails.tsx
index 93b8ee08..b38b3b26 100644
--- a/src/views/publish/children/pubRecord/components/PubRecordDetails.tsx
+++ b/src/views/publish/children/pubRecord/components/PubRecordDetails.tsx
@@ -2,6 +2,7 @@ import {
ForwardedRef,
forwardRef,
memo,
+ useEffect,
useImperativeHandle,
useState,
} from 'react';
@@ -88,6 +89,7 @@ const PubRecordDetails = memo(
account: undefined,
});
}}
+ closeIcon={false}
open={open}
width={600}
>
diff --git a/src/views/publish/children/videoPage/useVideoPageStore.ts b/src/views/publish/children/videoPage/useVideoPageStore.ts
index 278c7d95..299d63df 100644
--- a/src/views/publish/children/videoPage/useVideoPageStore.ts
+++ b/src/views/publish/children/videoPage/useVideoPageStore.ts
@@ -327,7 +327,8 @@ export const useVideoPageStore = create(
});
accounts.map((v) => {
- videoListMap.get(v.id)!.account = v;
+ const videoItem = videoListMap.get(v.id);
+ if (videoItem) videoItem.account = v;
});
set({
diff --git a/src/views/publish/components/PubProgressModule/PubProgressModule.tsx b/src/views/publish/components/PubProgressModule/PubProgressModule.tsx
index 3181631c..1fc331ef 100644
--- a/src/views/publish/components/PubProgressModule/PubProgressModule.tsx
+++ b/src/views/publish/components/PubProgressModule/PubProgressModule.tsx
@@ -41,7 +41,7 @@ const PubProgressModule = memo(
closeIcon={<MinusOutlined />}
>
<Alert
- message="关闭此弹框和页面不会影响发布流程,但请不要关闭爱团团哦~"
+ message="关闭此弹框和页面不会影响发布流程,但请不要关闭爱优赚哦~"
type="success"
/>
<div className={styles.pubProgressModule}>
diff --git a/src/views/replyother/replyother.tsx b/src/views/replyother/replyother.tsx
index eaf63436..880ee4b4 100644
--- a/src/views/replyother/replyother.tsx
+++ b/src/views/replyother/replyother.tsx
@@ -358,7 +358,7 @@ export default function Page() {
>({});
// 添加搜索关键词状态
- const [searchKeyword, setSearchKeyword] = useState('爱团团');
+ const [searchKeyword, setSearchKeyword] = useState('爱优赚');
async function getCreatorList(thisid: any) {
setWordList([]);
diff --git a/src/views/task/mineTask.tsx b/src/views/task/mineTask.tsx
index e38de3a8..a94d3201 100644
--- a/src/views/task/mineTask.tsx
+++ b/src/views/task/mineTask.tsx
@@ -106,7 +106,7 @@ const renderEmptyState = () => {
/>
</div>
<p className={styles.qrCodeText}>扫码开启更多权益</p>
- <p className={styles.qrCodeSubtext}>手机扫码爱团团公众号</p>
+ <p className={styles.qrCodeSubtext}>手机扫码爱优赚公众号</p>
</div>
</div>
</div>
@@ -511,7 +511,7 @@ export default function Page() {
</div>
</li>
<li>
- <p>点击下方链接下载爱团团接单软件(已下载可忽略)</p>
+ <p>点击下方链接下载爱优赚接单软件(已下载可忽略)</p>
<p className={styles.guideLink}>http://s.sqllb.com/Kky80</p>
</li>
<li>
@@ -558,7 +558,7 @@ export default function Page() {
<h4>为什么我没有项目?</h4>
<div className={styles.faqAnswer}>
<p>
- 请先完成上方操作步骤的所有流程。如果您已在爱团团绑定小红书等账号,请耐心等待派单。24小时、48小时没有得到派单都是正常的。超过1周没有收到项目邀请可填写下方收集表快速排查为何没有单子
+ 请先完成上方操作步骤的所有流程。如果您已在爱优赚绑定小红书等账号,请耐心等待派单。24小时、48小时没有得到派单都是正常的。超过1周没有收到项目邀请可填写下方收集表快速排查为何没有单子
</p>
<p className={styles.guideLink}>
【收集表】快速排查为何没单子
@@ -570,7 +570,7 @@ export default function Page() {
<h4>手机如何发文?</h4>
<div className={styles.faqAnswer}>
<p>
- 请先完成上方操作步骤中流程。公众号收到接单邀请,点击即可手机发文(手机操作一键发文前提是电脑需保证爱团团和发文账号在线,否则还需使用电脑发文)
+ 请先完成上方操作步骤中流程。公众号收到接单邀请,点击即可手机发文(手机操作一键发文前提是电脑需保证爱优赚和发文账号在线,否则还需使用电脑发文)
</p>
<div className={styles.guideImageContainer}>
<img
@@ -582,7 +582,7 @@ export default function Page() {
点击该模板消息可手机发文
</p>
</div>
- <p>点击下方链接下载爱团团接单软件(已下载可忽略)</p>
+ <p>点击下方链接下载爱优赚接单软件(已下载可忽略)</p>
<p className={styles.guideLink}>http://s.sqllb.com/Kky80</p>
</div>
</div>