Skip to content

Commit

Permalink
web: fix attachments ui in properties
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jul 27, 2024
1 parent 8fdef2a commit 0ee8e73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions apps/web/src/components/attachment/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ export function Attachment({
<td>
<Flex
sx={{
alignItems: "center",
maxWidth: compact ? 180 : "95%"
alignItems: "center"
}}
>
{status ? (
Expand Down
1 change: 1 addition & 0 deletions apps/web/src/components/properties/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ function Attachments({ noteId }: { noteId: string }) {
estimatedSize={30}
getItemKey={(index) => result.value.key(index)}
items={result.value.placeholders}
style={{ tableLayout: "fixed", width: "100%" }}
header={
<tr>
<th style={{ width: "75%" }} />
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/utils/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function formatBytes(bytes: number, decimals = 2) {

const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
const sizes = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];

const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
Expand Down

0 comments on commit 0ee8e73

Please sign in to comment.