Commit Graph

5 Commits

Author SHA1 Message Date
Poker Design Developer
8b99784c91 feat: initialize back_design when applying template 2026-06-03 22:16:09 +08:00
Developer
7417a4a893 feat: 模板预设机制 - 4 套模板各绑一组 JQK/Joker + 背景
经典 → 古典宫廷(王子/皇后/国王/小丑)
现代 → 现代人物(小孩/女青年/男青年/小丑鱼)
卡通 → 现代人物 + 暖色调 + 圆边框
复古 → 简笔符号 + 深色边框 + 米色背景

后端:
- CardTemplate 新增 theme_id(绑预设主题)+ design_override(背景/边框/字体等覆盖)
- 新增 apply_template_to_project():把 LibraryAsset 复制到项目素材 + 写 design
- 创建项目时支持传 template_id,自动套用整套预设
- 模板列表 API 附加 library 预览(4 张图缩略)

前端 Home.vue:
- 4 套模板卡片每张带 4 张缩略图(来自 library 预览)
- 点模板一键创建项目 + 跳转到编辑器
- '新建空白项目' 保留为独立按钮

init_system 同步:4 套模板配置 + 应用到示例项目
2026-06-02 15:08:37 +08:00
Poker Design Developer
670ac0a917 Rebuild Home and Editor pages with simplified inline styles
- Replace Element Plus components with pure HTML/CSS
- Use inline styles for reliable rendering
- Fix templates URL duplicate path issue
- Insert template data (4 templates) via Django shell
- Clear Vite cache and restart both servers
2026-05-31 22:07:39 +08:00
Poker Design Developer
3aa2eadc52 Fix Django migration issues and add missing URLs
- Create missing templates app urls.py
- Fix REST_FRAMEWORK pagination settings
- Add DEFAULT_AUTO_FIELD configuration
- Create migration files for all apps
- Fix auto-generated model warnings
- Verify database setup with test project
2026-05-31 16:01:00 +08:00
Poker Design Developer
48629736f4 Implement Django backend and Vue frontend structure
- Django backend with projects, templates, exports apps
- SQLite database models for Project, Asset, CardLayer
- REST API endpoints for project management
- Vue frontend with Vite, Element Plus, Fabric.js
- Home page for project selection
- Editor page with Fabric.js canvas integration
2026-05-31 14:55:01 +08:00