feat: 完善课表档案、课件归档、提醒与客户端更新并发布 1.4.1
- 重写课表档案工作区并合并时间表、课表与完整档案导入导出 - 修复课前/上下课提醒遮罩与通知收回冲突 - 增加课件文件夹分类、教师归档路径和客户端本机归档 - 打通客户端下载/安装/完成状态上报并在管理端展示更新过程 - 修复侧栏折叠裁切、课时多选与上传控件样式 - 统一版本到 1.4.1
This commit is contained in:
1 parent
2612a912ef
commit
6347d1e5aa
59 files changed
+2251
-584
No files matched your search
@@ -2,6 +2,27 @@ import { z } from 'zod';
|
||||
import { COURSEWARE_MAX_BYTES } from '@classhelper/shared';
|
||||
|
||||
export const coursewareScopeSchema = z.object({ classIds: z.array(z.string().min(1).max(100)).max(100) });
|
||||
const folderPath = z
|
||||
.string()
|
||||
.trim()
|
||||
.min(1)
|
||||
.max(240)
|
||||
.refine(
|
||||
(value) =>
|
||||
value
|
||||
.split('/')
|
||||
.every(
|
||||
(part) =>
|
||||
part.length > 0 &&
|
||||
part.length <= 60 &&
|
||||
!/[<>:"\\|?*\u0000-\u001f]/.test(part) &&
|
||||
!/[. ]$/.test(part) &&
|
||||
!/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(?:\.|$)/i.test(part),
|
||||
),
|
||||
'文件夹名称无效,请使用 / 分隔子文件夹',
|
||||
);
|
||||
export const coursewareFolderSchema = z.object({ path: folderPath });
|
||||
export const coursewareMoveSchema = z.object({ folderPath: folderPath.or(z.literal('')) });
|
||||
export const coursewareUploadSchema = coursewareScopeSchema
|
||||
.extend({
|
||||
name: z
|
||||
@@ -15,6 +36,7 @@ export const coursewareUploadSchema = coursewareScopeSchema
|
||||
),
|
||||
size: z.number().int().min(1).max(COURSEWARE_MAX_BYTES),
|
||||
mode: z.enum(['cloud', 'push']),
|
||||
folderPath: folderPath.or(z.literal('')).optional(),
|
||||
})
|
||||
.refine((input) => input.mode !== 'push' || input.classIds.length > 0, '推送时请选择授课班级');
|
||||
export const coursewareUploadQuery = z.object({
|
||||
|
||||
Reference in new issue
Block a user