forked from jappel/leistungsbilanz-ts
Add persistent history stacks
This commit is contained in:
parent
2d0aa11d9c
commit
1e4dd26bb8
24 changed files with 2294 additions and 15 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue