Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 图文和视频合集添加完成
gaoSir9f28d7280068
diff --git a/src/views/publish/children/imagePage/components/ImageRightSetting/components/ImageRightSettingCommon.tsx b/src/views/publish/children/imagePage/components/ImageRightSetting/components/ImageRightSettingCommon.tsxindex 55160824..0684aef9 100644--- a/src/views/publish/children/imagePage/components/ImageRightSetting/components/ImageRightSettingCommon.tsx+++ b/src/views/publish/children/imagePage/components/ImageRightSetting/components/ImageRightSettingCommon.tsx@@ -1,6 +1,7 @@// 话题选择器import {ILocationDataItem,+ IMixItem,IUsersItem,} from '../../../../../../../../electron/main/plat/plat.type';import { useShallow } from 'zustand/react/shallow';@@ -23,10 +24,12 @@ import CommonScheduledTimeSelect, {import dayjs from 'dayjs';import {AccountRestartLogin,+ CommonMixSelect,PubPermission,PubPermissionProps,} from '../../../../../components/CommonComponents/CommonComponents';import { AccountPlatInfoMap } from '../../../../../../account/comment';+import { VideoPubRestartLogin } from '../../../../videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon';interface DebounceSelectProps<ValueType = any>extends Omit<SelectProps<ValueType | ValueType[]>, 'options' | 'children'> {}@@ -332,3 +335,36 @@ export const ImgTextScheduledTimeSelect = ({/>);};++// 合集+export const ImgTextMixSelect = () => {+ const { imageAccountItem } = useImagePlatParams();+ const { setOnePubParams, updateAccounts } = useImagePageStore(+ useShallow((state) => ({+ setOnePubParams: state.setOnePubParams,+ updateAccounts: state.updateAccounts,+ })),+ );++ return (+ <CommonMixSelect+ account={imageAccountItem.account}+ onAccountChange={(account) => {+ updateAccounts([account]);+ }}+ onChange={(_, value) => {+ setOnePubParams(+ {+ mixInfo: {+ label: (value as IMixItem).name,+ value: (value as IMixItem).id,+ },+ },+ imageAccountItem.account.id,+ );+ }}+ >+ <VideoPubRestartLogin />+ </CommonMixSelect>+ );+};diff --git a/src/views/publish/children/imagePage/components/ImageRightSetting/components/children/ImageParamsSet_Douyin.tsx b/src/views/publish/children/imagePage/components/ImageRightSetting/components/children/ImageParamsSet_Douyin.tsxindex 1e4736f4..5ef1e07d 100644--- a/src/views/publish/children/imagePage/components/ImageRightSetting/components/children/ImageParamsSet_Douyin.tsx+++ b/src/views/publish/children/imagePage/components/ImageRightSetting/components/children/ImageParamsSet_Douyin.tsx@@ -3,6 +3,7 @@ import { ImageRightSettingChildProps } from '../ImageParamsSet.type';import {ImgTextDescTextArea,ImgTextLocationSelect,+ ImgTextMixSelect,ImgTextPubPermission,ImgTextPubRestartLogin,ImgTextScheduledTimeSelect,@@ -113,6 +114,8 @@ const ImageParamsSet_Douyin = memo(<ImgTextLocationSelect />+ <ImgTextMixSelect />+<ImgTextPubPermission /><ImgTextScheduledTimeSelect />diff --git a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon.tsx b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon.tsxindex 9757493b..1690e3f2 100644--- a/src/views/publish/children/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon.tsx+++ b/src/views/publish/children/videoPage/components/VideoPubSetModal/components/VideoPubSetModalCommon.tsx@@ -30,12 +30,14 @@ export const VideoPubRestartLogin = () => {);return (- <AccountRestartLogin- account={currChooseAccount.account}- onAccountRestart={() => {- accountRestart(currChooseAccount.account!.type);- }}- />+ currChooseAccount && (+ <AccountRestartLogin+ account={currChooseAccount.account}+ onAccountRestart={() => {+ accountRestart(currChooseAccount.account!.type);+ }}+ />+ ));};diff --git a/src/views/publish/components/CommonComponents/CommonComponents.tsx b/src/views/publish/components/CommonComponents/CommonComponents.tsxindex fe1bfc49..01ce0a01 100644--- a/src/views/publish/components/CommonComponents/CommonComponents.tsx+++ b/src/views/publish/components/CommonComponents/CommonComponents.tsx@@ -160,7 +160,7 @@ export const CommonMixSelect = ({useEffect(() => {getList();- onAccountLoginFinish((newAccount) => {+ return onAccountLoginFinish((newAccount) => {account = newAccount;getList();});diff --git a/src/views/publish/components/CommonComponents/CommonUserSelect.tsx b/src/views/publish/components/CommonComponents/CommonUserSelect.tsxindex a241033c..e2a49002 100644--- a/src/views/publish/components/CommonComponents/CommonUserSelect.tsx+++ b/src/views/publish/components/CommonComponents/CommonUserSelect.tsx@@ -46,7 +46,7 @@ export default function CommonUserSelect({if (props.showSearch === false) {getList();- onAccountLoginFinish((newAccount) => {+ return onAccountLoginFinish((newAccount) => {account = newAccount;getList();});