diff --git a/src-tauri/src/commands/publish.rs b/src-tauri/src/commands/publish.rs index 7cbcde1..1eee062 100644 --- a/src-tauri/src/commands/publish.rs +++ b/src-tauri/src/commands/publish.rs @@ -118,7 +118,7 @@ pub async fn publish_login( .await?; if result.get("success").and_then(|v| v.as_bool()) == Some(true) { - let nickname = result + let nickname: String = result .get("nickname") .and_then(|v| v.as_str()) .unwrap_or("") diff --git a/src/components/workflow/Step07Publish.vue b/src/components/workflow/Step07Publish.vue index 8710e15..a8481d8 100644 --- a/src/components/workflow/Step07Publish.vue +++ b/src/components/workflow/Step07Publish.vue @@ -21,6 +21,7 @@ const scheduleDate = ref(null); const accountDialogVisible = ref(false); const activePlatformKey = ref("douyin"); const checkingAccountId = ref(null); +const openingAccountId = ref(null); const hasVideo = computed( () => Boolean(processedVideoPath.value || generatedVideoPath.value), @@ -133,6 +134,13 @@ async function onTestAccount(platform, account) { showFeedback(result); } +async function onOpenAccount(platform, account) { + openingAccountId.value = account.id; + const result = await workflow.openPublishAccount(platform.key, account.id); + openingAccountId.value = null; + showFeedback(result); +} + function onDeleteAccount(platform, account) { platform.accounts = (platform.accounts || []).filter((a) => a.id !== account.id); if (platform.accountId === account.id) { @@ -337,6 +345,14 @@ function formatUpdateTime(account) { :loading="checkingAccountId === account.id" @click="onTestAccount(activePlatform, account)" /> +