xfy 6b875e6ba5 feat(ui): create CodeRunner Dioxus UI component with async polling
- runner.rs: CodeRunner 组件(源码展示 + Run 按钮 + 阶段/输出/错误区)
  spawn 提交 StartExec 后用 sleep_ms(WASM 友好) 轮询 GetExecResult,MAX_POLLS 兜底
  mut 信号加 cfg_attr 放行 server 的 unused_mut(AGENTS.md 约定)
  提前克隆 source/language 给 move 闭包,避免 rsx! 二次借用 (E0382)
- execute.rs: 修正双目标可见性——server fn 模块不能 cfg-gate
  共享类型 use 双目标可见,server-only 辅助 use 单独 gate(对齐 posts 模块约定)
- mod.rs: execute 不再 gate,languages/progress 仍 gate
2026-07-03 18:28:52 +08:00

38 lines
1.1 KiB
Rust
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//! 组件模块
//!
//! 提供 Dioxus UI 组件,供前端页面(`src/pages/`)使用。
//! 包括布局(`frontend_layout`、`admin_layout`)、导航(`header`、`nav`、`footer`)、
//! 文章展示(`post`、`post_card`)、评论(`comments`)、骨架屏(`skeletons`)、
//! 表单控件(`forms`)等共享组件。
/// 后台布局组件。
pub mod admin_layout;
/// 后台页面骨架屏组件。
pub mod admin_skeleton;
/// 代码运行器组件(可运行代码块 UI
pub mod code_runner;
/// 评论相关组件。
pub mod comments;
/// 空状态组件(无数据时的插画配图 + 文案)。
pub mod empty_state;
/// 页脚组件。
pub mod footer;
/// 表单控件组件。
pub mod forms;
/// 前台布局组件。
pub mod frontend_layout;
/// 顶部导航栏组件。
pub mod header;
/// 导航组件。
pub mod nav;
/// 文章详情组件。
pub mod post;
/// 文章卡片组件。
pub mod post_card;
/// 骨架屏组件集合。
pub mod skeletons;
/// 通用 UI 原子组件与类名常量(卡片、按钮、分页、徽章、空状态)。
pub mod ui;
/// 编辑器页面骨架屏组件。
pub mod write_skeleton;