收口创作流程统一总计划并修复等待页窄屏裁切

This commit is contained in:
2026-05-31 05:57:34 +00:00
parent 551d436919
commit c193a352df
53 changed files with 2192 additions and 161 deletions

View File

@@ -11,7 +11,8 @@ use crate::errors::RuntimeProfileFieldError;
use crate::format_utc_micros;
use shared_contracts::creation_entry_config::{
CreationEntryConfigResponse, CreationEntryEventBannerResponse, CreationEntryStartCardResponse,
CreationEntryTypeModalResponse, CreationEntryTypeResponse, build_phase1_unified_creation_spec,
CreationEntryTypeModalResponse, CreationEntryTypeResponse,
encode_unified_creation_spec_response, resolve_unified_creation_spec_response,
};
pub fn build_creation_entry_config_response(
@@ -40,7 +41,10 @@ pub fn build_creation_entry_config_response(
.creation_types
.into_iter()
.map(|item| {
let unified_creation_spec = build_phase1_unified_creation_spec(item.id.as_str());
let unified_creation_spec = resolve_unified_creation_spec_response(
item.id.as_str(),
item.unified_creation_spec_json.as_deref(),
);
CreationEntryTypeResponse {
id: item.id,
title: item.title,
@@ -264,9 +268,15 @@ fn build_default_creation_entry_type_snapshot(
category_label: category_label.to_string(),
category_sort_order,
updated_at_micros,
unified_creation_spec_json: default_unified_creation_spec_json(id),
}
}
pub fn default_unified_creation_spec_json(play_id: &str) -> Option<String> {
shared_contracts::creation_entry_config::build_phase1_unified_creation_spec(play_id)
.and_then(|spec| encode_unified_creation_spec_response(&spec).ok())
}
pub fn build_runtime_setting_record(snapshot: RuntimeSettingSnapshot) -> RuntimeSettingsRecord {
RuntimeSettingsRecord {
user_id: snapshot.user_id,

View File

@@ -102,6 +102,7 @@ pub struct CreationEntryTypeSnapshot {
pub category_label: String,
pub category_sort_order: i32,
pub updated_at_micros: i64,
pub unified_creation_spec_json: Option<String>,
}
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]
@@ -129,6 +130,7 @@ pub struct CreationEntryTypeAdminUpsertInput {
pub category_id: String,
pub category_label: String,
pub category_sort_order: i32,
pub unified_creation_spec_json: Option<String>,
}
#[cfg_attr(feature = "spacetime-types", derive(SpacetimeType))]