feat: enhance platform management and synchronization in ArticleEditor and PublishArticle components

This commit is contained in:
2026-04-06 15:41:49 +08:00
parent fe124b0ba4
commit 08ace0a9e0
7 changed files with 209 additions and 88 deletions
@@ -3,7 +3,6 @@ import { computed } from "vue";
import { useI18n } from "vue-i18n";
import type { PublishPlatformOption } from "@/lib/publish-platforms";
import { isPlatformBound } from "@/lib/publish-platforms";
const props = withDefaults(defineProps<{
modelValue: string[];
@@ -75,9 +74,9 @@ function togglePlatform(platformId: string): void {
<span
class="publish-platform-selector__status"
:class="{ 'publish-platform-selector__status--bound': isPlatformBound(platform.id) }"
:class="{ 'publish-platform-selector__status--bound': platform.bound }"
>
{{ isPlatformBound(platform.id) ? (platform.accountLabel ?? t("custom.task.platformConnected")) : t("custom.task.platformUnauthorized") }}
{{ platform.bound ? (platform.accountLabel ?? t("custom.task.platformConnected")) : t("custom.task.platformUnauthorized") }}
</span>
</button>
</div>