feat: Import improvements (#3064)
* feat: Split and simplify import/export pages in prep for more options * minor fixes * File operations for imports * test * icons
This commit is contained in:
@@ -1,13 +1,16 @@
|
||||
import path from "path";
|
||||
import { FileOperation } from "@server/models";
|
||||
import { presentCollection, presentUser } from ".";
|
||||
import { presentUser } from ".";
|
||||
|
||||
export default function present(data: FileOperation) {
|
||||
return {
|
||||
id: data.id,
|
||||
type: data.type,
|
||||
name: data.collection?.name || path.basename(data.key || ""),
|
||||
state: data.state,
|
||||
collection: data.collection ? presentCollection(data.collection) : null,
|
||||
error: data.error,
|
||||
size: data.size,
|
||||
collectionId: data.collectionId,
|
||||
user: presentUser(data.user),
|
||||
createdAt: data.createdAt,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user