added file size
This commit is contained in:
@@ -10,10 +10,10 @@ const DirectoryElement: React.FC<Props> = (props) => {
|
||||
return (
|
||||
<>
|
||||
<td>
|
||||
📂
|
||||
📂 {props.dir.name}
|
||||
</td>
|
||||
<td>
|
||||
{props.dir.name}
|
||||
|
||||
</td>
|
||||
</>
|
||||
)
|
||||
|
||||
@@ -16,15 +16,14 @@ const FileBrowser: React.FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<Breadcrum path={path} onDirClick={(newPath)=>{
|
||||
console.debug(newPath)
|
||||
setPath(newPath)
|
||||
}}/>
|
||||
<div>
|
||||
<table className="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Icon</th>
|
||||
<th>Name</th>
|
||||
<th>Size</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from "react"
|
||||
import PropTypes from "prop-types"
|
||||
import { File } from "../generated/graphql"
|
||||
import sizeToReadable from "../functions/sizeToReadable"
|
||||
|
||||
interface Props {
|
||||
file: File
|
||||
@@ -10,10 +11,10 @@ const FileElement: React.FC<Props> = (props) => {
|
||||
return (
|
||||
<>
|
||||
<td>
|
||||
📄
|
||||
📄 {props.file.name}
|
||||
</td>
|
||||
<td>
|
||||
{props.file.name}
|
||||
{sizeToReadable(props.file.size)}
|
||||
</td>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user