Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 删除不需要的文件
gaoSir824907abff2b
diff --git a/src/app/[lng]/accounts/plat/kwaiLogin.ts b/src/app/[lng]/accounts/plat/kwaiLogin.tsindex d0ca92a4..a1c17bb6 100644--- a/src/app/[lng]/accounts/plat/kwaiLogin.ts+++ b/src/app/[lng]/accounts/plat/kwaiLogin.ts@@ -3,7 +3,6 @@ import { PlatType } from "@/app/config/platConfig";import { requestPlatApi } from "@/utils/otherRequest";import { KwaiPlat } from "@/app/plat/platChildren/kwai/KwaiPlat";import { createOrUpdateAccountApi } from "@/api/account";-import {AccountStatus} from "@/app/config/accountConfig";export const kwaiAppId = "ks715790869885446758";export const kwaiAppSecret = "cqSvJvBSPJjd-4pBH_4N0Q";diff --git a/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx b/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsxindex b7bf149b..312164bd 100644--- a/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx+++ b/src/app/[lng]/publish/components/ChooseAccountModule/components/PlatChoose.tsx@@ -208,7 +208,8 @@ const PlatChoose = memo(<Emptydescription={<>- 无账户数据,请前往 <Link href="/">账户</Link>添加数据+ 无账户数据,请前往 <Link href="/accounts">账户</Link>+ 添加数据</>}/>diff --git a/src/app/[lng]/publish/components/CommonComponents/CommonScheduledTimeSelect.tsx b/src/app/[lng]/publish/components/CommonComponents/CommonScheduledTimeSelect.tsxindex e8a1ddea..2275e002 100644--- a/src/app/[lng]/publish/components/CommonComponents/CommonScheduledTimeSelect.tsx+++ b/src/app/[lng]/publish/components/CommonComponents/CommonScheduledTimeSelect.tsx@@ -34,10 +34,8 @@ const CommonScheduledTimeSelect = memo(ref: ForwardedRef<ICommonScheduledTimeSelectRef>,) => {const getMaxTimes = useMemo(() => {- const accountPlatInfo = AccountPlatInfoMap.get(- platType || PlatType.Douyin,- )!;- const timingMax = accountPlatInfo.commonPubParamsConfig.timingMax;+ const accountPlatInfo = AccountPlatInfoMap.get(platType!);+ const timingMax = accountPlatInfo?.commonPubParamsConfig.timingMax;return {timeOffset: timeOffset || timingMax!.timeOffset,diff --git a/src/app/[lng]/publish/components/CommonComponents/commonComponents.module.scss b/src/app/[lng]/publish/components/CommonComponents/commonComponents.module.scssindex dc864ed5..d4c1b938 100644--- a/src/app/[lng]/publish/components/CommonComponents/commonComponents.module.scss+++ b/src/app/[lng]/publish/components/CommonComponents/commonComponents.module.scss@@ -151,7 +151,7 @@.activitySelect-right {display: flex;flex-direction: column;- align-items: end;+ align-items: flex-end;justify-content: space-between;height: 100%;&-top {diff --git a/src/app/[lng]/publish/imagePage/page.tsx b/src/app/[lng]/publish/imagePage/page.tsxindex e15ffbee..5f746d31 100644--- a/src/app/[lng]/publish/imagePage/page.tsx+++ b/src/app/[lng]/publish/imagePage/page.tsx@@ -5,15 +5,8 @@ import { useShallow } from "zustand/react/shallow";import { useImagePageStore } from "./useImagePageStore";import ImageLeftSetting from "./components/ImageLeftSetting/ImageLeftSetting";import ImageRightSetting from "./components/ImageRightSetting/ImageRightSetting";-import { Button, message, Popconfirm, Space } from "antd";+import { Button, message, Popconfirm } from "antd";import React, { useEffect, useMemo, useRef, useState } from "react";-// import {-// icpCreateImgTextPubRecord,-// icpCreatePubRecord,-// icpPubImgText,-// } from "@/icp/publish";-// import { useNavigate } from "react-router-dom";-// import { usePubStroe } from "@/store/pubStroe";import { signInApi } from "@/api/signIn";import { toolsApi } from "@/api/tools";import { sensitivityLoading } from "@/utils";@@ -25,8 +18,6 @@ import PubAccountDetModule, {} from "@/app/[lng]/publish/components/PubAccountDetModule/PubAccountDetModule";import { PublishProgressRes } from "@/app/plat/plat.type";import PubProgressModule from "@/app/[lng]/publish/components/PubProgressModule/PubProgressModule";-// import { PubType } from "@/app/config/publishConfig";-// import { useCommontStore } from "@/store/commont";import { IImageAccountItem } from "@/app/[lng]/publish/imagePage/imagePage.type";export default function Page() {@@ -166,7 +157,7 @@ export default function Page() {return {account: v.account!,progress: progress?.progress || 0,- msg: progress?.message || "",+ msg: progress?.msg || "",};});}, [pubProgressMap, imageAccounts]);diff --git a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsxindex 042bfa89..0113c3e2 100644--- a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx+++ b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/VideoPubSetModal.tsx@@ -18,9 +18,6 @@ import PubAccountDetModule, {IPubAccountDetModuleRef,} from "@/app/[lng]/publish/components/PubAccountDetModule/PubAccountDetModule";import VideoPubSetModal_KWAI from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_KWAI";-import VideoPubSetModal_DouYin from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin";-import VideoPubSetModal_XSH from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_XSH";-import VideoPubSetModal_WxSph from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph";import PubProgressModule from "@/app/[lng]/publish/components/PubProgressModule/PubProgressModule";import VideoPubSetModalVideo, {IVideoPubSetModalVideoRef,@@ -50,12 +47,6 @@ const PubSetModalChild = ({}: {}) => {switch (currChooseAccount?.account?.type) {case PlatType.KWAI:return <VideoPubSetModal_KWAI />;- case PlatType.Douyin:- return <VideoPubSetModal_DouYin />;- case PlatType.Xhs:- return <VideoPubSetModal_XSH />;- case PlatType.WxSph:- return <VideoPubSetModal_WxSph />;}return <></>;}, [currChooseAccount?.account?.type]);diff --git a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsx b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsxdeleted file mode 100644index 5719e30c..00000000--- a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_DouYin.tsx+++ /dev/null@@ -1,171 +0,0 @@-import React, { ForwardedRef, forwardRef, memo } from "react";-import { Select } from "antd";-import { useVideoPageStore } from "@/app/[lng]/publish/videoPage/useVideoPageStore";-import { useShallow } from "zustand/react/shallow";-import {- DescTextArea,- ScheduledTimeSelect,- TitleInput,- VideoPubMixSelect,- VideoPubPermission,- VideoPubRestartLogin,-} from "../components/VideoPubSetModalCommon";-import UserSelect from "../components/UserSelect";-import useVideoPubSetModal from "./hooks/useVideoPubSetModal";-import { PlatType } from "@/app/config/platConfig";-import {- IVideoPubSetModalChildProps,- IVideoPubSetModalChildRef,-} from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/videoPubSetModal.type";-import TopicSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/TopicSelect";-import LocationSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/LocationSelect";-import {- CommonActivitySelect,- CommonHotspotSelect,-} from "@/app/[lng]/publish/components/CommonComponents/DouyinCommonComponents";-import {- DeclarationDouyin,- ILableValue,-} from "@/app/[lng]/publish/videoPage/videoPage.type";--const HotspotSelect = ({}: IVideoPubSetModalChildProps) => {- const { setOnePubParams, currChooseAccount } = useVideoPageStore(- useShallow((state) => ({- setOnePubParams: state.setOnePubParams,- currChooseAccount: state.currChooseAccount!,- })),- );-- return (- <CommonHotspotSelect- account={currChooseAccount.account}- value={- currChooseAccount.pubParams!.diffParams![PlatType.Douyin]!.hotPoint- }- onChange={(newValue) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.Douyin]!.hotPoint = newValue as ILableValue;- setOnePubParams({- diffParams: newDiffParams,- });- }}- />- );-};--const ActivitySelect = ({}: IVideoPubSetModalChildProps) => {- const { setOnePubParams, platInfo, currChooseAccount } =- useVideoPubSetModal();- const { topicMax } = platInfo.commonPubParamsConfig;-- return (- <CommonActivitySelect- account={currChooseAccount.account}- maxCount={topicMax - currChooseAccount.pubParams!.topics!.length}- value={- currChooseAccount.pubParams!.diffParams![PlatType.Douyin]!.activitys- }- onChange={(newValue) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.Douyin]!.activitys = newValue as ILableValue[];- setOnePubParams({- diffParams: newDiffParams,- });- }}- >- <VideoPubRestartLogin />- </CommonActivitySelect>- );-};--const VideoPubSetModal_DouYin = memo(- forwardRef(- (- props: IVideoPubSetModalChildProps,- ref: ForwardedRef<IVideoPubSetModalChildRef>,- ) => {- const { setOnePubParams, platInfo, currChooseAccount } =- useVideoPubSetModal();- const { topicMax } = platInfo.commonPubParamsConfig;-- return (- <>- <TitleInput placeholder="好的标题可以获得更多浏览" />-- <DescTextArea placeholder="添加作品简介" maxLength={1000} />-- <TopicSelect- maxCount={- topicMax -- currChooseAccount.pubParams!.diffParams![PlatType.Douyin]!- .activitys!.length- }- tips={`最多可添加${topicMax}个话题(包含活动奖励)`}- />- <ActivitySelect />-- <UserSelect maxCount={100} tips="您可以添加100个好友" title="@好友" />-- <HotspotSelect {...props} />-- <LocationSelect />-- <ScheduledTimeSelect />-- <VideoPubMixSelect />-- <h1>自主声明</h1>- <Select- allowClear- value={- currChooseAccount?.pubParams.diffParams![PlatType.Douyin]!- .selfDeclare- }- style={{ width: "100%" }}- placeholder="选择声明"- labelInValue- filterOption={false}- options={[- {- label: "内容自行拍摄",- value: DeclarationDouyin.SelfShoot,- },- {- label: "内容取材网络",- value: DeclarationDouyin.FromNetV3,- },- {- label: "内容由AI生成",- value: DeclarationDouyin.AIGC,- },- {- label: "可能引人不适",- value: DeclarationDouyin.MaybeUnsuitable,- },- {- label: "虚构演绎,仅供娱乐",- value: DeclarationDouyin.OnlyFunNew,- },- {- label: "危险行为,请勿模仿",- value: DeclarationDouyin.DangerousBehavior,- },- ]}- onChange={(newValue: any) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.Douyin]!.selfDeclare = newValue?.value;- setOnePubParams({- diffParams: newDiffParams,- });- }}- />-- <VideoPubPermission title="谁可以看" />- </>- );- },- ),-);-VideoPubSetModal_DouYin.displayName = "VideoPubSetModal_DouYin";--export default VideoPubSetModal_DouYin;diff --git a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_KWAI.tsx b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_KWAI.tsxindex 0755acd1..28784567 100644--- a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_KWAI.tsx+++ b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_KWAI.tsx@@ -1,11 +1,5 @@import React, { ForwardedRef, forwardRef, memo } from "react";-import LocationSelect from "../components/LocationSelect";-import UserSelect from "../components/UserSelect";-import {- DescTextArea,- ScheduledTimeSelect,- VideoPubPermission,-} from "../components/VideoPubSetModalCommon";+import { DescTextArea } from "../components/VideoPubSetModalCommon";import TopicSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/TopicSelect";import {IVideoPubSetModalChildProps,@@ -27,18 +21,18 @@ const VideoPubSetModal_KWAI = memo(<TopicSelect />- <UserSelect- maxCount={3}- title="@好友"- tips="您可以添加3个好友"- showSearch={false}- />+ {/*<UserSelect*/}+ {/* maxCount={3}*/}+ {/* title="@好友"*/}+ {/* tips="您可以添加3个好友"*/}+ {/* showSearch={false}*/}+ {/*/>*/}- <LocationSelect />+ {/*<LocationSelect />*/}- <VideoPubPermission />+ {/*<VideoPubPermission />*/}- <ScheduledTimeSelect />+ {/*<ScheduledTimeSelect />*/}</>);},diff --git a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsxdeleted file mode 100644index d7dd7743..00000000--- a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_WxSph.tsx+++ /dev/null@@ -1,192 +0,0 @@-import React, { ForwardedRef, forwardRef, memo, useState } from "react";-import { Checkbox, Input, Select, Spin } from "antd";-import { useVideoPageStore } from "@/app/[lng]/publish/videoPage/useVideoPageStore";-import { useShallow } from "zustand/react/shallow";-import {- DescTextArea,- ScheduledTimeSelect,- TitleInput,- VideoPubMixSelect,- VideoPubRestartLogin,-} from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon";-import UserSelect from "../components/UserSelect";-import useVideoPubSetModal from "./hooks/useVideoPubSetModal";-import {- IVideoPubSetModalChildProps,- IVideoPubSetModalChildRef,-} from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/videoPubSetModal.type";-import LocationSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/LocationSelect";-import { PlatType } from "@/app/config/platConfig";-import useDebounceFetcher from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/useDebounceFetcher";-import { WxSphEventList } from "@/app/plat/platChildren/wxSph/wxShp.type";--const WXSphActivity = ({}: IVideoPubSetModalChildProps) => {- const { setOnePubParams, updateAccounts, currChooseAccount } =- useVideoPageStore(- useShallow((state) => ({- setOnePubParams: state.setOnePubParams,- updateAccounts: state.updateAccounts,- currChooseAccount: state.currChooseAccount!,- })),- );-- const { fetching, options, debounceFetcher } =- useDebounceFetcher<WxSphEventList>(async (keywords) => {- // TODO 微信活动- // const res = await getSphActivity(currChooseAccount.account!, keywords);- // if (res.data.errCode === 300334 || res.data.errCode === 300333) {- // currChooseAccount.account!.status = AccountStatus.DISABLE;- // updateAccounts({ accounts: [currChooseAccount.account!] });- // await ipcUpdateAccountStatus(- // currChooseAccount.account!.id,- // AccountStatus.DISABLE,- // );- // return [];- // }- // return res?.data?.data?.eventList || [];- return [];- });-- return (- <>- <h1>参与活动</h1>- <Select- showSearch- allowClear- style={{ width: "100%" }}- placeholder="输入关键词搜索活动"- labelInValue- filterOption={false}- onSearch={debounceFetcher}- notFoundContent={fetching ? <Spin size="small" /> : null}- options={options?.map((v) => {- return {- ...v,- label: v.eventName,- value: v.eventTopicId,- };- })}- value={- currChooseAccount.pubParams!.diffParams![PlatType.WxSph]!.activity- }- onChange={(_, value) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.WxSph]!.activity = value as WxSphEventList;- setOnePubParams({- diffParams: newDiffParams,- });- }}- />- <VideoPubRestartLogin />- </>- );-};--const VideoPubSetModal_WxSph = memo(- forwardRef(- (- {}: IVideoPubSetModalChildProps,- ref: ForwardedRef<IVideoPubSetModalChildRef>,- ) => {- const { setOnePubParams, platInfo, currChooseAccount } =- useVideoPubSetModal();- const { topicMax } = platInfo.commonPubParamsConfig;- const [topicSearch, setTopicSearch] = useState("");-- return (- <>- <TitleInput- title="短标题"- tips="短标题会出现在搜索、话题、活动、地点、订阅号消息、发现页红点等场景"- placeholder="概况视频的主要内容。字数建议6-16个字符"- />-- <DescTextArea- placeholder="填写更全面的描述信息,让更多人看到你吧!"- maxLength={1000}- />-- <h1>话题</h1>- <Select- allowClear- mode="multiple"- style={{ width: "100%" }}- maxCount={topicMax}- placeholder="请输入并选择话题"- labelInValue- onSearch={setTopicSearch}- filterOption={false}- options={- topicSearch- ? [- {- label: topicSearch,- value: topicSearch,- },- ]- : []- }- value={currChooseAccount.pubParams!.topics}- onChange={(newValue) => {- setOnePubParams({- topics: newValue,- });- }}- />- <p className="videoPubSetModal_con-tips">- 您可添加{topicMax}个标签,按回车键确认- </p>-- <UserSelect- maxCount={10}- tips="您可以添加10个视频号"- title="@视频号"- />-- <LocationSelect />-- <WXSphActivity />-- <VideoPubMixSelect />-- <h1>扩展链接</h1>- <Input- placeholder="粘贴链接"- value={- currChooseAccount?.pubParams.diffParams![PlatType.WxSph]!.extLink- }- onChange={(e) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.WxSph]!.extLink = e.target.value;- setOnePubParams({- diffParams: newDiffParams,- });- }}- />-- <h1>声明原创</h1>- <Checkbox- checked={- currChooseAccount?.pubParams.diffParams![PlatType.WxSph]!- .isOriginal- }- onChange={(e) => {- const newDiffParams = currChooseAccount.pubParams.diffParams!;- newDiffParams[PlatType.WxSph]!.isOriginal = e.target.checked;- setOnePubParams({- diffParams: newDiffParams,- });- }}- >- 声明后,作品将展示原创标记,有机会获得广告收入- </Checkbox>-- <ScheduledTimeSelect />- </>- );- },- ),-);-VideoPubSetModal_WxSph.displayName = "VideoPubSetModal_WxSph";--export default VideoPubSetModal_WxSph;diff --git a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_XSH.tsx b/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_XSH.tsxdeleted file mode 100644index 5d00dcea..00000000--- a/src/app/[lng]/publish/videoPage/components/VideoPubSetModal/children/VideoPubSetModal_XSH.tsx+++ /dev/null@@ -1,47 +0,0 @@-import React, { ForwardedRef, forwardRef, memo } from "react";-import UserSelect from "../components/UserSelect";-import {- IVideoPubSetModalChildProps,- IVideoPubSetModalChildRef,-} from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/videoPubSetModal.type";-import {- DescTextArea,- ScheduledTimeSelect,- TitleInput,- VideoPubPermission,-} from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon";-import LocationSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/LocationSelect";-import TopicSelect from "@/app/[lng]/publish/videoPage/components/VideoPubSetModal/components/TopicSelect";--const VideoPubSetModal_XSH = memo(- forwardRef(- (- {}: IVideoPubSetModalChildProps,- ref: ForwardedRef<IVideoPubSetModalChildRef>,- ) => {- return (- <>- <TitleInput title="标题" placeholder="填写标题,可能会有更多赞哦" />-- <DescTextArea- placeholder="填写更全面的描述信息,让更多人看到你吧!"- maxLength={1000}- />-- <TopicSelect />-- <UserSelect title="@用户" />-- <LocationSelect />-- <VideoPubPermission title="谁可以看" />-- <ScheduledTimeSelect />- </>- );- },- ),-);-VideoPubSetModal_XSH.displayName = "VideoPubSetModal_XSH";--export default VideoPubSetModal_XSH;