Human-readable sizes
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { Document, FolderDocument } from '@/repositories/Document';
|
||||
import type { ISimpleError } from '@/repositories/Client';
|
||||
import { fetchFile } from '@/repositories/Document'
|
||||
import { formatUnixDate } from '@/utils';
|
||||
import { formatSize, formatUnixDate } from '@/utils';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@ export const useDocumentStore = defineStore({
|
||||
name,
|
||||
key: id,
|
||||
size,
|
||||
sizedisp: formatSize(size),
|
||||
mtime,
|
||||
modified: formatUnixDate(mtime),
|
||||
type: dir === undefined ? 'folder-file' : 'folder',
|
||||
|
||||
Reference in New Issue
Block a user