feat: remove Learning module

This commit is contained in:
inman
2026-09-04 12:01:42 +08:00
parent bdc290c2cf
commit bd0873f348
39 changed files with 104 additions and 2278 deletions

View File

@@ -1,45 +0,0 @@
/** Stable project-catalog boundary between Makelore and Works Square. */
export const LEARNING_API_PATH = '/api/works/learning';
export const LEARNING_MEDIA_MAX_BYTES = 10 * 1024 * 1024;
export type LearningProjectImage = {
url: string;
alt: string;
width?: number;
height?: number;
};
export type LearningProjectSummary = {
id: string;
name: string;
summary: string;
cover: LearningProjectImage;
tags: string[];
version: string | null;
archiveBytes: number;
publishedAt: string;
updatedAt: string;
};
export type LearningProjectDetail = LearningProjectSummary & {
readmeMarkdown: string;
archiveFileName: string;
archiveSha256: string;
};
export type LearningProjectPage = {
items: LearningProjectSummary[];
nextCursor: string | null;
total?: number;
};
export type LearningProjectListQuery = {
cursor?: string;
limit?: number;
};
export type LearningProjectDownloadResult = {
status: 'saved' | 'cancelled';
};

View File

@@ -1,7 +1,6 @@
export const MODULE_ACCESS_KEYS = [
'programming',
'design',
'learning',
'robot',
] as const;
@@ -12,7 +11,6 @@ export type ModuleAccess = Record<ModuleAccessKey, boolean>;
export const DEFAULT_MODULE_ACCESS: ModuleAccess = {
programming: true,
design: true,
learning: true,
robot: true,
};
@@ -24,7 +22,6 @@ export function normalizeModuleAccess(value: unknown): ModuleAccess {
return {
programming: typeof record.programming === 'boolean' ? record.programming : true,
design: typeof record.design === 'boolean' ? record.design : true,
learning: typeof record.learning === 'boolean' ? record.learning : true,
robot: typeof record.robot === 'boolean' ? record.robot : true,
};
}