Skip to content

Commit

Permalink
Merge pull request #88 from autonomys/fix/ui-bugs
Browse files Browse the repository at this point in the history
UI updates
  • Loading branch information
clostao authored Nov 7, 2024
2 parents 653e329 + a65228b commit f4ab6e8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 17 deletions.
9 changes: 4 additions & 5 deletions frontend/src/app/drive/global/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { FileActionButtons, FileTable } from "@/components/common/FileTable";
import { FileDropZone } from "@/components/Files/FileDropZone";
import { NoUploadsPlaceholder } from "@/components/Files/NoUploadsPlaceholder";
import { ApiService } from "@/services/api";
import { useCallback, useEffect, useState } from "react";
import { Fragment, useCallback, useEffect, useState } from "react";
import { UploadingObjects } from "../../../components/Files/UploadingObjects";
import { ObjectSummary } from "../../../models/UploadedObjectMetadata";
import { LoaderCircle } from "lucide-react";
Expand Down Expand Up @@ -42,11 +42,10 @@ export default function Page() {
return (
<div className="flex w-full">
<div className="w-full flex flex-col gap-4">
<div className="flex justify-between items-center gap-4">
<div className="flex-1">
<FileDropZone />
<div className="w-full flex justify-start items-center gap-4">
<div className="w-full max-w-md">
<SearchBar scope="global" />
</div>
<SearchBar scope="global" />
</div>
<div className="">
<UploadingObjects />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/drive/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function AppLayout({
/>
)}
</aside>
<main className="flex-1 overflow-auto p-6">{children}</main>
<main className="flex-1 overflow-auto p-6 flex">{children}</main>
</UserEnsurer>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/drive/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ export default function Page() {
<div className="flex w-full">
<div className="w-full flex flex-col gap-4">
<div className="flex justify-between items-center gap-4">
<SearchBar scope="user" />
<div className="flex-1">
<FileDropZone />
</div>
<SearchBar scope="user" />
</div>
<div className="">
<UploadingObjects />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ export const NoSharedFilesPlaceholder = () => {
return (
<div className="max-w-2xl mx-auto p-6 bg-white rounded-lg">
<h2 className="text-2xl font-bold mb-4 text-center">
No shared with you files yet
No files have been shared with you yet
</h2>
<p className="text-center mb-6">
Share files with others by clicking the share button on the top right
Share files with others by clicking the share button on any of your
files.
</p>
</div>
);
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/SharedFiles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const SharedFiles = ({
return (
<div className="flex w-full">
<div className="w-full flex flex-col gap-4">
<FileDropZone />
<div className="">
<UploadingObjects />
{objects === null && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ export const NoFilesInTrashPlaceholder = () => {
return (
<div className="max-w-2xl mx-auto p-6 bg-white rounded-lg">
<h2 className="text-2xl font-bold mb-4 text-center">No files in trash</h2>
<p className="text-center mb-6">
Files you mark as deleted will appear here.
</p>
<p className="text-center mb-6">Files you remove will appear here.</p>
</div>
);
};
6 changes: 2 additions & 4 deletions frontend/src/components/UploadedObjectInformation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ import {
OwnerRole,
UploadedObjectMetadata,
} from "../../models/UploadedObjectMetadata";
import { getTypeFromMetadata, handleFileDownload } from "../../utils/file";
import { getTypeFromMetadata } from "../../utils/file";
import { useUserStore } from "../../states/user";
import { useCallback, useMemo, useState } from "react";
import { Button } from "../common/Button";
import { ApiService } from "../../services/api";
import { ObjectShareModal } from "../Files/ObjectShareModal";
import { ObjectDeleteModal } from "../Files/ObjectDeleteModal";
import { Loader } from "lucide-react";
Expand Down Expand Up @@ -98,7 +97,7 @@ export const UploadedObjectInformation = ({
onClick={handleDelete}
disabled={!hasFileOwnership}
>
Delete
Remove
</Button>
</div>
<span className="text-xl font-semibold ml-2">Metadata</span>
Expand Down Expand Up @@ -179,7 +178,6 @@ export const UploadedObjectInformation = ({
<div className="grid grid-cols-2 gap-y-2 gap-x-4 text-primary font-medium bg-gray-50 p-4 rounded-lg">
{owners?.map((o) => (
<div className="flex">
<span>{o.role.charAt(0).toUpperCase() + o.role.slice(1)}</span>
<span className="ml-[4px]">{o.publicId}</span>
</div>
))}
Expand Down

0 comments on commit f4ab6e8

Please sign in to comment.