22 lines
496 B
TypeScript
22 lines
496 B
TypeScript
import type { UploadFile } from '#shared/types';
|
|
|
|
export const useUploadStore = defineStore<
|
|
'warren-upload',
|
|
{
|
|
startIndex: number;
|
|
files: UploadFile[];
|
|
destination: { warrenId: string; path: string } | null;
|
|
progress: {
|
|
loadedBytes: number;
|
|
totalBytes: number;
|
|
} | null;
|
|
}
|
|
>('warren-upload', {
|
|
state: () => ({
|
|
startIndex: 0,
|
|
files: [],
|
|
destination: null,
|
|
progress: null,
|
|
}),
|
|
});
|