mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Make Viewer always accessible (#4468)
# Description of Changes Make Viewer always accessible. Also deletes some dead code I noticed while I was working. --------- Co-authored-by: EthanHealy01 <[email protected]> Co-authored-by: Reece Browne <[email protected]>
This commit is contained in:
co-authored by
EthanHealy01
Reece Browne
parent
28177d9509
commit
f6df414425
@@ -8,26 +8,6 @@ import { FileId, BaseFileMetadata } from './file';
|
||||
// Re-export FileId for convenience
|
||||
export type { FileId };
|
||||
|
||||
export type ModeType =
|
||||
| 'viewer'
|
||||
| 'pageEditor'
|
||||
| 'fileEditor'
|
||||
| 'merge'
|
||||
| 'split'
|
||||
| 'compress'
|
||||
| 'ocr'
|
||||
| 'convert'
|
||||
| 'sanitize'
|
||||
| 'addPassword'
|
||||
| 'changePermissions'
|
||||
| 'addWatermark'
|
||||
| 'removePassword'
|
||||
| 'single-large-page'
|
||||
| 'repair'
|
||||
| 'unlockPdfForms'
|
||||
| 'removeCertificateSign'
|
||||
| 'auto-rename-pdf-file';
|
||||
|
||||
// Normalized state types
|
||||
export interface ProcessedFilePage {
|
||||
thumbnail?: string;
|
||||
@@ -209,32 +189,6 @@ export function revokeFileResources(record: StirlingFileStub): void {
|
||||
}
|
||||
}
|
||||
|
||||
export type OperationType = 'merge' | 'split' | 'compress' | 'add' | 'remove' | 'replace' | 'convert' | 'upload' | 'ocr' | 'sanitize';
|
||||
|
||||
export interface FileOperation {
|
||||
id: string;
|
||||
type: OperationType;
|
||||
timestamp: number;
|
||||
fileIds: FileId[];
|
||||
status: 'pending' | 'applied' | 'failed';
|
||||
data?: any;
|
||||
metadata?: {
|
||||
originalFileName?: string;
|
||||
outputFileNames?: string[];
|
||||
fileSize?: number;
|
||||
pageCount?: number;
|
||||
error?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface FileOperationHistory {
|
||||
fileId: FileId;
|
||||
fileName: string;
|
||||
operations: (FileOperation | PageOperation)[];
|
||||
createdAt: number;
|
||||
lastModified: number;
|
||||
}
|
||||
|
||||
export interface ViewerConfig {
|
||||
zoom: number;
|
||||
currentPage: number;
|
||||
|
||||
@@ -9,4 +9,4 @@ export const getDefaultWorkbench = (): WorkbenchType => 'fileEditor';
|
||||
// Type guard using the same source of truth
|
||||
export const isValidWorkbench = (value: string): value is WorkbenchType => {
|
||||
return WORKBENCH_TYPES.includes(value as WorkbenchType);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user