mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-30 04:44:28 +00:00
feat(version-stack): add manage versions dialog and version removal (#311)
* feat(version-stack): add manage versions dialog and version removal * fix(webui): remove ellipsis and add pointer cursor to manage versions button * fix(version-stack): handle symlink deduplication and name sync for share links * refactor(version-stack): extract shared symlink dedup helper The 'repoint first symlink per share folder, delete duplicates with fileCount decrement' logic was triplicated across createVersionStack, reparentAssets, and reparentFileToFile with subtle variations. Extract it into dedupeSymlinksToTarget() in packages/core/src/asset/symlink.ts and call it from all three sites (behavior unchanged), with a dedicated test suite covering the edge cases.
This commit is contained in:
@@ -22,3 +22,25 @@ export interface ChangeStackFileVersionParams {
|
||||
fileId: string
|
||||
beforeId: string
|
||||
}
|
||||
|
||||
export interface RemoveStackVersionParams {
|
||||
stackId: string
|
||||
fileId: string
|
||||
}
|
||||
|
||||
export const stackVersionInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
version: z.number(),
|
||||
name: z.string().optional().nullable(),
|
||||
previewUrl: z.string().optional().nullable(),
|
||||
createdAt: z.string().optional().nullable(),
|
||||
creator: z
|
||||
.object({
|
||||
id: z.string(),
|
||||
name: z.string().nullable(),
|
||||
image: z.string().optional().nullable(),
|
||||
})
|
||||
.nullable()
|
||||
.optional(),
|
||||
})
|
||||
export type StackVersionInfo = z.infer<typeof stackVersionInfoSchema>
|
||||
|
||||
Reference in New Issue
Block a user