Let's use AI to Earn!
TypeScript auto-publishdouyindouyin-apielectron-appelectron-reactkuaishoukwaipublishedshipinhaotoolxiaohongshu
tiktoks
bulaienaofutuojiesenzhangd48365a9cdc7
diff --git a/src/app/i18n/locales/en/publish.json b/src/app/i18n/locales/en/publish.jsonindex 525df575..48ec7f74 100644--- a/src/app/i18n/locales/en/publish.json+++ b/src/app/i18n/locales/en/publish.json@@ -15,7 +15,8 @@"tips": {"workSaved": "Please select the account to publish","pcNotSupported": "Web does not support this platform, please download the App to publish",- "accountOffline": "This account is offline and cannot be published"+ "accountOffline": "This account is offline and cannot be published",+ "tiktokForbidden": "This platform does not support publishing yet"},"status": {"publishFailed": "Failed",@@ -116,6 +117,10 @@"riskLevel": "Level:","contentUnsafe": "Content Unsafe"},+ "badges": {+ "offline": "Offline",+ "forbidden": "No"+ },"tiktok": {"creatorInfo": "Creator Info","privacy": {diff --git a/src/app/i18n/locales/zh-CN/publish.json b/src/app/i18n/locales/zh-CN/publish.jsonindex d8b120fa..6df0a8f8 100644--- a/src/app/i18n/locales/zh-CN/publish.json+++ b/src/app/i18n/locales/zh-CN/publish.json@@ -15,7 +15,8 @@"tips": {"workSaved": "请选择要发布的账户","pcNotSupported": "Web不支持该平台,请下载App进行发布",- "accountOffline": "该账号已离线,无法发布"+ "accountOffline": "该账号已离线,无法发布",+ "tiktokForbidden": "该平台暂不支持发布"},"status": {"publishFailed": "发布失败",@@ -116,6 +117,10 @@"riskLevel": "等级:","contentUnsafe": "内容不安全"},+ "badges": {+ "offline": "已离线",+ "forbidden": "禁"+ },"tiktok": {"creatorInfo": "创作者信息","privacy": {diff --git a/src/components/PublishDialog/index.tsx b/src/components/PublishDialog/index.tsxindex d531f977..30c5377f 100644--- a/src/components/PublishDialog/index.tsx+++ b/src/components/PublishDialog/index.tsx@@ -725,11 +725,14 @@ const PublishDialog = memo();const isOffline = pubItem.account.status === 0;const isPcNotSupported = platConfig && platConfig.pcNoThis === true;+ const isTikTokForbidden = pubItem.account.type === PlatType.Tiktok;return (<Tooltiptitle={- isPcNotSupported+ isTikTokForbidden+ ? t('tips.tiktokForbidden' as any)+ : isPcNotSupported? t('tips.pcNotSupported' as any): isOffline? t('tips.accountOffline' as any)@@ -751,6 +754,10 @@ const PublishDialog = memo(}}onClick={(e) => {e.stopPropagation();+ // TikTok 禁止发布,直接禁止点击+ if (isTikTokForbidden) {+ return;+ }// 离线账户的点击由头像容器处理,这里不处理if (isOffline) {return;@@ -806,14 +813,37 @@ const PublishDialog = memo(><AvatarPlat- className={`publishDialog-con-acconts-item-avatar ${!isChoosed || isOffline || isPcNotSupported ? 'disabled' : ''}`}+ className={`publishDialog-con-acconts-item-avatar ${!isChoosed || isOffline || isPcNotSupported || isTikTokForbidden ? 'disabled' : ''}`}account={pubItem.account}size="large"- disabled={isOffline || !isChoosed || isPcNotSupported}+ disabled={isOffline || !isChoosed || isPcNotSupported || isTikTokForbidden}/>+ {isTikTokForbidden && (+ <div+ style={{+ position: "absolute",+ inset: 0,+ background: "rgba(0,0,0,0.6)",+ borderRadius: "50%",+ display: "flex",+ alignItems: "center",+ justifyContent: "center",+ color: "#fff",+ fontSize: 12,+ fontWeight: 600,+ pointerEvents: "none",+ }}+ >+ {t('badges.forbidden' as any)}+ </div>+ )}{isOffline && (<divonClick={(e) => {+ // TikTok 禁止发布:不允许任何点击+ if (isTikTokForbidden) {+ return;+ }// 只有离线账户才触发授权跳转if (isOffline) {handleOfflineAvatarClick(pubItem.account);@@ -835,7 +865,7 @@ const PublishDialog = memo(cursor: "pointer",}}>- 已离线+ {t('badges.offline' as any)}</div>)}{isPcNotSupported && !isOffline && (