49 lines
900 B
TypeScript
49 lines
900 B
TypeScript
|
|
export enum FileType {
|
|
FILE = 'FILE',
|
|
FOLDER = 'FOLDER'
|
|
}
|
|
|
|
export interface FileItem {
|
|
id: string;
|
|
name: string;
|
|
type: FileType;
|
|
size: number; // in bytes
|
|
date: string;
|
|
permissions: string;
|
|
}
|
|
|
|
export interface LogEntry {
|
|
id: string;
|
|
timestamp: string;
|
|
type: 'info' | 'success' | 'error' | 'command' | 'response';
|
|
message: string;
|
|
}
|
|
|
|
export interface TransferItem {
|
|
id: string;
|
|
direction: 'upload' | 'download';
|
|
filename: string;
|
|
progress: number; // 0 to 100
|
|
status: 'queued' | 'transferring' | 'completed' | 'failed';
|
|
speed: string;
|
|
}
|
|
|
|
export interface FileSystemState {
|
|
path: string;
|
|
files: FileItem[];
|
|
isLoading: boolean;
|
|
}
|
|
|
|
export interface SiteConfig {
|
|
id: string;
|
|
name: string;
|
|
protocol: 'ftp' | 'sftp';
|
|
host: string;
|
|
port: string;
|
|
user: string;
|
|
pass?: string; // Optional for security
|
|
passiveMode?: boolean;
|
|
initialPath?: string;
|
|
}
|