Files
xiaoxia-saas/apps/web
x 5c2de0f935
CI/CD Pipeline / Dedup Check - skip PR tests when covered by push pipeline (pull_request) Successful in 1s
CI/CD Pipeline / Check push changed paths (pull_request) Has been skipped
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 1s
CI/CD Pipeline / Build Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / PR Build API Image (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 1m10s
CI/CD Pipeline / PR Build Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging API Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Web Image (pull_request) Has been skipped
CI/CD Pipeline / Retag skipped Staging Worker Image (pull_request) Has been skipped
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Failing after 1m12s
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / ACR Image Cleanup (pull_request) Has been skipped
PR Automation / Auto Approve on CI Green (pull_request) Successful in 1m26s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Successful in 1m27s
CI/CD Pipeline / PR Build Web Image (pull_request) Failing after 1m46s
AI Code Review / AI Code Review (pull_request) Successful in 7m57s
PR Automation / Auto Merge on CI Green + Approved (pull_request) Successful in 10m37s
CI/CD Pipeline / Validate - Style (pull_request) Has been cancelled
CI/CD Pipeline / Build Production API Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Web Image (pull_request) Has been cancelled
CI/CD Pipeline / Build Production Worker Image (pull_request) Has been cancelled
CI/CD Pipeline / Deploy Production (pull_request) Has been cancelled
CI/CD Pipeline / Production Browser E2E (pull_request) Has been cancelled
CI/CD Pipeline / Canary Release to Production (pull_request) Has been cancelled
CI/CD Pipeline / CI Gate (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Python (mypy + alembic) (pull_request) Has been cancelled
CI/CD Pipeline / Validate - Security (pull_request) Has been cancelled
feat(web): #2001 爆款标题样式配置面板升级
P0:
- 描边宽度滑块 (0-20px) + 描边颜色选择器(色板+自定义)
- 每行最大字符数滑块 (0-20)、行距/顶部边距滑块
- 新增4款爆款字体(优设标题黑/阿里普惠体Bold/抖音美好体/思源黑体Heavy)
- 抖音爆款黄预设(优设标题黑/80px/#ffd700/bold/8px黑描边/带阴影)

P1:
- 阴影参数化(X/Y偏移+模糊半径+颜色)
- 背景色块(颜色+透明度+内边距+圆角)
- Canvas迷你预览(预设缩略+面板顶部WYSIWYG实时预览)
- 标题封面独立配置入口(checkbox+默认填充主样式90%字号)
- 10个预设含emoji标签+Canvas缩略图
- Tabs分组(基础/描边/阴影/背景/排版/封面)

契约与渲染:
- title_config新增 stroke{enabled,width,color}/shadow{enabled,offset_x,offset_y,blur,color}/line_height/margin_top/max_chars_per_line/background{enabled,color,padding,radius}/line_overrides/cover_title_config
- titleCanvas.ts 全字段渲染:自动换行/描边宽色/阴影参数/背景色块/逐行覆盖/关键词高亮
- contract.ts buildTitleConfigPayload 序列化全部新字段(snake_case)
- useGenerateVideo/useBatchCovers/usePlanConfigLoader 全链路适配
- AiAvatarTitleConfig↔TitleSettings 双向映射(snake_case↔camelCase)
- PanelLipsyncPreview CSS预览支持 WebkitTextStrokeWidth/Color、textShadow参数化、背景块、自动换行、行距

向后兼容:保留旧的bold/stroke/shadow布尔字段与旧props;旧草稿加载新字段自动填默认值。
2026-09-20 21:58:08 +08:00
..
2026-06-15 15:17:40 +08:00

小虾 SaaS - 前端应用

基于 Vite + React 18 + TypeScript + Ant Design 的现代化 SaaS 前端应用。

快速开始

# 安装依赖
npm install

# 启动开发服务器
npm run dev

# 构建生产版本
npm run build

# 预览生产版本
npm run preview

技术栈

  • 框架: React 18.3.1
  • 语言: TypeScript 5.5.3
  • 构建工具: Vite 5.3.1
  • UI 组件库: Ant Design 5.18.0
  • 路由: React Router 6.24.0
  • 状态管理: Zustand 4.5.2
  • 数据获取: React Query 5.45.0
  • HTTP 客户端: Axios 1.7.2
  • 表单: React Hook Form 7.52.0 + Zod 3.23.8

项目结构

src/
├── api/              # API 服务层
├── components/       # React 组件
│   ├── common/      # 通用组件
│   ├── layout/      # 布局组件
│   └── business/    # 业务组件
├── pages/           # 页面组件
│   ├── auth/        # 认证页面
│   ├── workspace/   # 工作空间
│   ├── subscription/# 订阅管理
│   ├── admin/       # Admin 后台
│   └── profile/     # 个人中心
├── hooks/           # 自定义 Hooks
├── store/           # 状态管理
├── router/          # 路由配置
├── types/           # TypeScript 类型
├── utils/           # 工具函数
└── styles/          # 全局样式

功能特性

  • ✅ 用户认证(登录/注册/密码重置)
  • ✅ 工作空间管理
  • ✅ 成员管理和权限控制
  • ✅ 订阅计划和升级
  • ✅ 配额使用监控
  • ✅ Admin 管理后台
  • ✅ 个人设置和安全
  • ✅ 响应式设计

环境变量

创建 .env 文件:

VITE_API_URL=http://localhost:8000

开发指南

添加新页面

  1. 在 src/pages/ 下创建页面组件
  2. 在 src/router/index.tsx 中添加路由
  3. 确保导出 Component 用于懒加载

添加新 API

  1. 在 src/api/ 下创建服务模块
  2. 定义 TypeScript 接口
  3. 使用 apiClient 发起请求

状态管理

使用 Zustand 创建 Store:

import { create } from "zustand"

interface MyStore {
  data: any
  setData: (data: any) => void
}

export const useMyStore = create<MyStore>((set) => ({
  data: null,
  setData: (data) => set({ data }),
}))

部署

# 构建
npm run build

# 产物在 dist/ 目录

License

MIT