Add persistent history stacks

This commit is contained in:
2026-07-23 21:48:24 +02:00
parent 2d0aa11d9c
commit 1e4dd26bb8
24 changed files with 2294 additions and 15 deletions
+9
View File
@@ -6,6 +6,15 @@ export interface ProjectDto {
currentRevision: number;
}
export interface ProjectHistoryStateDto {
projectId: string;
currentRevision: number;
undoDepth: number;
redoDepth: number;
undoChangeSetId: string | null;
redoChangeSetId: string | null;
}
export interface DistributionBoardDto {
id: string;
projectId: string;
+7
View File
@@ -8,6 +8,7 @@ import type {
FloorDto,
GlobalDeviceDto,
ProjectDeviceDto,
ProjectHistoryStateDto,
ProjectDeviceDisconnectResultDto,
ProjectDeviceSyncPreviewDto,
ProjectDeviceSyncRestoreRowDto,
@@ -54,6 +55,12 @@ export function getProject(projectId: string) {
return request<ProjectDto>(`/api/projects/${projectId}`);
}
export function getProjectHistory(projectId: string) {
return request<ProjectHistoryStateDto>(
`/api/projects/${projectId}/history`
);
}
export function createProject(name: string) {
return request<ProjectDto>("/api/projects", {
method: "POST",