Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
feat: 发布逻辑初步实现
gaoSir4a8f267d6852
diff --git a/.idea/workspace.xml b/.idea/workspace.xmlindex 87a260e2..d7138f26 100644--- a/.idea/workspace.xml+++ b/.idea/workspace.xml@@ -4,20 +4,10 @@<option name="autoReloadType" value="SELECTIVE" /></component><component name="ChangeListManager">- <list default="true" id="90ed3383-49aa-4e32-95a2-9f070c0da49b" name="更改" comment="feat: 添加b站icon">- <change afterPath="$PROJECT_DIR$/src/components/PublishDialog/compoents/PubCommonParams.tsx" afterDir="false" />- <change afterPath="$PROJECT_DIR$/src/components/PublishDialog/plats/BilibParams.tsx" afterDir="false" />- <change afterPath="$PROJECT_DIR$/src/components/PublishDialog/plats/KwaiParams.tsx" afterDir="false" />- <change afterPath="$PROJECT_DIR$/src/components/PublishDialog/plats/plats.type.ts" afterDir="false" />+ <list default="true" id="90ed3383-49aa-4e32-95a2-9f070c0da49b" name="更改" comment="feat: 发布弹框开发中..."><change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/app/config/platConfig.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/config/platConfig.ts" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/components/AvatarPlat/avatarPlat.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/AvatarPlat/avatarPlat.module.scss" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/components/AvatarPlat/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/AvatarPlat/index.tsx" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/components/PublishDialog/compoents/PublishDialogPreview.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/PublishDialog/compoents/PublishDialogPreview.tsx" afterDir="false" /><change beforePath="$PROJECT_DIR$/src/components/PublishDialog/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/PublishDialog/index.tsx" afterDir="false" /><change beforePath="$PROJECT_DIR$/src/components/PublishDialog/publishDialog.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/PublishDialog/publishDialog.module.scss" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/components/PublishDialog/usePublishDialog.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/components/PublishDialog/usePublishDialog.ts" afterDir="false" />- <change beforePath="$PROJECT_DIR$/src/utils/oss.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/utils/oss.ts" afterDir="false" /></list><option name="SHOW_DIALOG" value="false" /><option name="HIGHLIGHT_CONFLICTS" value="true" />@@ -51,27 +41,27 @@<option name="hideEmptyMiddlePackages" value="true" /><option name="showLibraryContents" value="true" /></component>- <component name="PropertiesComponent"><![CDATA[{- "keyToString": {- "ASKED_ADD_EXTERNAL_FILES": "true",- "ASKED_MARK_IGNORED_FILES_AS_EXCLUDED": "true",- "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",- "RunOnceActivity.ShowReadmeOnStart": "true",- "SHARE_PROJECT_CONFIGURATION_FILES": "true",- "git-widget-placeholder": "master",- "ignore.virus.scanning.warn.message": "true",- "last_opened_file_path": "E:/project-dev/web/艺咖/aitoearn-web/src/components/PublishDialog/plats",- "node.js.detected.package.eslint": "true",- "node.js.detected.package.tslint": "true",- "node.js.selected.package.eslint": "(autodetect)",- "node.js.selected.package.tslint": "(autodetect)",- "nodejs_package_manager_path": "npm",- "run.code.analysis.last.selected.profile": "pProject Default",- "settings.editor.selected.configurable": "editor.reader.mode",- "ts.external.directory.path": "E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib",- "vue.rearranger.settings.migration": "true"+ <component name="PropertiesComponent">{+ "keyToString": {+ "ASKED_ADD_EXTERNAL_FILES": "true",+ "ASKED_MARK_IGNORED_FILES_AS_EXCLUDED": "true",+ "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true",+ "RunOnceActivity.ShowReadmeOnStart": "true",+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",+ "git-widget-placeholder": "master",+ "ignore.virus.scanning.warn.message": "true",+ "last_opened_file_path": "E:/project-dev/web/艺咖/aitoearn-web/src/components/PublishDialog/plats",+ "node.js.detected.package.eslint": "true",+ "node.js.detected.package.tslint": "true",+ "node.js.selected.package.eslint": "(autodetect)",+ "node.js.selected.package.tslint": "(autodetect)",+ "nodejs_package_manager_path": "npm",+ "run.code.analysis.last.selected.profile": "pProject Default",+ "settings.editor.selected.configurable": "editor.reader.mode",+ "ts.external.directory.path": "E:\\project-dev\\web\\艺咖\\aitoearn-web\\node_modules\\typescript\\lib",+ "vue.rearranger.settings.migration": "true"}-}]]></component>+}</component><component name="ReactBuddySettings"><option name="extensionsIgnore" value="true" /></component>@@ -108,7 +98,7 @@<workItem from="1750763285511" duration="48000" /><workItem from="1750763342070" duration="32000" /><workItem from="1750763376065" duration="41000" />- <workItem from="1750763426455" duration="6246000" />+ <workItem from="1750763426455" duration="8516000" /></task><task id="LOCAL-00001" summary="feat: 日历完善"><option name="closed" value="true" />@@ -166,7 +156,15 @@<option name="project" value="LOCAL" /><updated>1750764927677</updated></task>- <option name="localTasksCounter" value="8" />+ <task id="LOCAL-00008" summary="feat: 发布弹框开发中...">+ <option name="closed" value="true" />+ <created>1750770307974</created>+ <option name="number" value="00008" />+ <option name="presentableId" value="LOCAL-00008" />+ <option name="project" value="LOCAL" />+ <updated>1750770307974</updated>+ </task>+ <option name="localTasksCounter" value="9" /><servers /></component><component name="TypeScriptGeneratedFilesManager">@@ -193,6 +191,7 @@<MESSAGE value="feat: 发布弹框左右两侧显示隐藏过渡动画完成" /><MESSAGE value="feat: 日历样式调整" /><MESSAGE value="feat: 添加b站icon" />- <option name="LAST_COMMIT_MESSAGE" value="feat: 添加b站icon" />+ <MESSAGE value="feat: 发布弹框开发中..." />+ <option name="LAST_COMMIT_MESSAGE" value="feat: 发布弹框开发中..." /></component></project>\ No newline at end of filediff --git a/src/components/PublishDialog/index.tsx b/src/components/PublishDialog/index.tsxindex b4dd7157..589f0ba5 100644--- a/src/components/PublishDialog/index.tsx+++ b/src/components/PublishDialog/index.tsx@@ -42,6 +42,8 @@ const PublishDialog = memo(setAccountChoosed: state.setAccountChoosed,})),);+ // 当前步骤,0=所有账号没有参数,要设置参数。 1=所有账号有参数,详细设置参数+ const [step, setStep] = useState(0);// 关闭弹框并确认关闭const closeDialog = useCallback(() => {@@ -68,6 +70,8 @@ const PublishDialog = memo(return accountChoosed.length !== 0;}, [accountChoosed]);+ // 获取+return (<><Modal@@ -135,6 +139,24 @@ const PublishDialog = memo();})}</div>++ {step === 0 ? (+ <>+ {accountChoosed.length === 0 && (+ <div className="publishDialog-con-tips">+ 你的工作被保存了,选择一个账号来创建一个帖子。+ </div>+ )}+ {accountChoosed.length == 1 && (+ <div style={{ height: "500px" }}>{accountChoosed[0].type}</div>+ )}+ {accountChoosed.length >= 2 && (+ <div style={{ height: "500px" }}>通用参数</div>+ )}+ </>+ ) : (+ <>第二步</>+ )}</div><div className="publishDialog-footer">timediff --git a/src/components/PublishDialog/publishDialog.module.scss b/src/components/PublishDialog/publishDialog.module.scssindex 7493290a..0a82325e 100644--- a/src/components/PublishDialog/publishDialog.module.scss+++ b/src/components/PublishDialog/publishDialog.module.scss@@ -60,6 +60,12 @@ $assistantWidth: 300px;}}}++ &-tips {+ text-align: center;+ margin: 30px 0 0 0;+ color: var(--grayColor7);+ }}.publishDialog-footer {display: flex;