feat: 实现导航页基础功能

- 添加导航条目和分类数据模型
- 实现导航卡片网格展示
- 支持点击卡片打开链接
- 添加主题样式(渐变色、卡片阴影)
- 区分系统默认和自定义条目
- 添加分类统计信息"
This commit is contained in:
2026-09-19 21:53:15 +08:00
parent e2cc3ac30f
commit 1c98340fc5
42 changed files with 6054 additions and 140 deletions
@@ -0,0 +1,42 @@
/// 提交一个网站时填的内容。
///
/// 和后端 `POST /api/sites` 的入参一一对应。**没有 `categoryId`**:
/// 提交方只能给分组名,由后端在用户分组里查找或新建。
class SubmitSiteDraft {
const SubmitSiteDraft({
required this.title,
required this.url,
required this.group,
this.description = '',
this.subGroup = '',
this.submittedBy = '',
});
/// 网站名称。
final String title;
/// 网站地址。
final String url;
/// 一级分组名。
final String group;
/// 一句话描述。
final String description;
/// 子分组名,可为空。
final String subGroup;
/// 提交者的称呼或邮箱。
final String submittedBy;
/// 序列化成后端要的 JSON(camelCase,和后端 `CreateSiteRequest` 对齐)。
Map<String, dynamic> toJson() => <String, dynamic>{
'title': title,
'url': url,
'description': description,
'group': group,
'subGroup': subGroup,
'submittedBy': submittedBy,
};
}