Human-readable sizes

This commit is contained in:
Leo Vasanko
2023-10-27 08:28:03 +03:00
parent 0d186726b5
commit 8cc3ed1a04
6 changed files with 18 additions and 8 deletions

View File

@@ -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',