91eaa5d186
Git LFS stores pointer files whose SHA differs from the actual blob SHA, causing false-positive diffs on every upload. Switching to file size comparison resolves this for LFS-enabled repos. Also replaces the inline error message with a dedicated NoChangesModal when no differences are detected, offering cancel (reset) or modify (close modal) actions.
38 lines
762 B
TypeScript
38 lines
762 B
TypeScript
// ---------------------------------------------------------------------------
|
|
// Shared types
|
|
// ---------------------------------------------------------------------------
|
|
|
|
export interface ParsedFile {
|
|
filename: string
|
|
buffer: Buffer
|
|
isModel: boolean
|
|
textureName?: string
|
|
}
|
|
|
|
export type FileChange = 'new' | 'changed' | 'unchanged'
|
|
|
|
export interface FileDiff {
|
|
name: string
|
|
status: 'changed' | 'new' | 'deleted'
|
|
}
|
|
|
|
export interface RemoteFile {
|
|
name: string
|
|
size: number
|
|
}
|
|
|
|
export type UploadResponse =
|
|
| {
|
|
success: true
|
|
folderName: string
|
|
filesCount: number
|
|
compressed: boolean
|
|
compressionError?: string
|
|
message: string
|
|
commitUrl?: string
|
|
}
|
|
| {
|
|
success: false
|
|
error: string
|
|
}
|