mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-19 19:21:04 +10:00
Rework sidebar pages
* Move sidebar pages from workspace to space level * Replace array sorting with lexicographical fractional indexing * Fixes and updates
This commit is contained in:
@ -1,10 +1,6 @@
|
||||
import { IsOptional, IsString, IsUUID } from 'class-validator';
|
||||
|
||||
export class CreatePageDto {
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
pageId?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
title?: string;
|
||||
|
||||
@ -1,18 +1,21 @@
|
||||
import { IsString, IsOptional, IsUUID } from 'class-validator';
|
||||
import {
|
||||
IsString,
|
||||
IsUUID,
|
||||
IsOptional,
|
||||
MinLength,
|
||||
MaxLength,
|
||||
} from 'class-validator';
|
||||
|
||||
export class MovePageDto {
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
after?: string;
|
||||
@MinLength(5)
|
||||
@MaxLength(12)
|
||||
position: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
before?: string;
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
parentId?: string | null;
|
||||
parentPageId?: string | null;
|
||||
}
|
||||
|
||||
8
apps/server/src/core/page/dto/sidebar-page.dto.ts
Normal file
8
apps/server/src/core/page/dto/sidebar-page.dto.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { IsOptional, IsUUID } from 'class-validator';
|
||||
import { SpaceIdDto } from './page.dto';
|
||||
|
||||
export class SidebarPageDto extends SpaceIdDto {
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
pageId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user