{
};
}
+/** 页面类型选择卡。 */
+function RecipeChooser({ onPick }: { onPick: (recipe: string) => void }) {
+ return (
+
+ {RECIPE_CARDS.map((c) => (
+
+ ))}
+
+ );
+}
+
export function NewFeatureShell() {
const navigate = useNavigate();
const profile = getProfile();
const isAdmin = profile?.account === 'admin' || profile?.userId === 'ADMIN';
- const schema = useMemo(buildWizardSchema, []);
+ const [recipe, setRecipe] = useState(null);
+ const schema = useMemo(() => (recipe ? buildWizardSchema(recipe) : null), [recipe]);
if (!isAdmin) {
return 新建功能仅管理员可用。
;
@@ -158,11 +266,20 @@ export function NewFeatureShell() {
return (
-
+
新建功能 · 人走五环
-
+ {schema ? (
+
+ ) : (
+ <>
+
先选页面类型,再走「建实体 → 生成页面 → 发布」。
+
+ >
+ )}
);