feat(enterprise-site): add PbootCMS enterprise site publisher
Introduce a new enterprise-site publishing channel that lets tenants push articles to self-hosted PbootCMS sites alongside the existing media supply flow. Backend (server/internal/tenant): - enterprise_site_service: CRUD, ping, category sync, and article publish - enterprise_site_pbootcms: PbootCMS API client integration - enterprise_site_crypto: encrypt/decrypt stored site credentials - enterprise_site_handler + routes under /enterprise-sites - migrations for the enterprise site publisher tables - config: add SERVER_PUBLIC_BASE_URL (Server.PublicBaseURL) for callbacks - article/media services adjusted to support the publish flow Frontend (apps/admin-web): - PublishArticleModal & ArticlePublishStatus: enterprise-site publish UI - MediaView: manage enterprise sites and categories - api + shared-types: enterprise site endpoints and types - http-client: add PATCH method support Integrations: - pbootcms GeoPublisher controller plugin + install guide - docs/enterprise-site-publisher-v1.md design doc
This commit is contained in:
@@ -18,6 +18,7 @@ interface PublishPlatformEntry {
|
||||
accountName: string
|
||||
avatarUrl: string
|
||||
status: PublishRecordStatus
|
||||
targetType: string
|
||||
}
|
||||
|
||||
type PublishRecordStatus = 'success' | 'failed' | 'publishing'
|
||||
@@ -83,7 +84,11 @@ const platformEntries = computed<PublishPlatformEntry[]>(() => {
|
||||
const entries: PublishPlatformEntry[] = []
|
||||
|
||||
for (const record of publishRecordsQuery.data.value ?? []) {
|
||||
const key = `${record.platform_id}:${record.platform_account_id}`
|
||||
const targetType = String(record.target_type ?? 'platform_account')
|
||||
const key =
|
||||
targetType === 'enterprise_site'
|
||||
? `${targetType}:${record.target_connection_id ?? record.id}`
|
||||
: `${record.platform_id}:${record.platform_account_id}`
|
||||
if (seen.has(key)) {
|
||||
continue
|
||||
}
|
||||
@@ -91,7 +96,7 @@ const platformEntries = computed<PublishPlatformEntry[]>(() => {
|
||||
|
||||
const normalizedId = normalizePublishPlatformId(record.platform_id)
|
||||
const platform = platformMap.value.get(normalizedId)
|
||||
const fallback = getPublishPlatformMeta(normalizedId)
|
||||
const fallback = enterprisePlatformFallback(normalizedId)
|
||||
|
||||
entries.push({
|
||||
key,
|
||||
@@ -101,6 +106,7 @@ const platformEntries = computed<PublishPlatformEntry[]>(() => {
|
||||
accountName: record.platform_nickname || '--',
|
||||
avatarUrl: '',
|
||||
status: normalizePublishRecordStatus(record.status),
|
||||
targetType,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -236,6 +242,17 @@ function getAccountInitial(accountName: string): string {
|
||||
|
||||
return trimmed.slice(0, 1).toUpperCase()
|
||||
}
|
||||
|
||||
function enterprisePlatformFallback(platformId: string) {
|
||||
if (platformId === 'pbootcms') {
|
||||
return {
|
||||
name: 'PBootCMS',
|
||||
shortName: 'CMS',
|
||||
accent: '#0f766e',
|
||||
}
|
||||
}
|
||||
return getPublishPlatformMeta(platformId)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user