diff --git a/src/components/demo-components/dropzone-demo/DemoDropzoneUploading.jsx b/src/components/demo-components/dropzone-demo/DemoDropzoneUploading.jsx index aa568f12f38b0719beeb3af77b375ecd842b2c60..65e6adab23f12ae923ccf736b7aaa0609c977c25 100644 --- a/src/components/demo-components/dropzone-demo/DemoDropzoneUploading.jsx +++ b/src/components/demo-components/dropzone-demo/DemoDropzoneUploading.jsx @@ -16,9 +16,9 @@ const DemoDropzoneUploading = ({ button }) => { const removeFile = (id) => { setFiles(files.filter((x) => x.id !== id)); }; - const handleFinishUpload=(uploadedFiles)=>{ + const handleFinishUpload = (uploadedFiles) => { console.log("Upload has finished", uploadedFiles); - } + }; if (button) return ( <div @@ -38,7 +38,7 @@ const DemoDropzoneUploading = ({ button }) => { maxFileSize={28 * 1024 * 1024} maxFiles={2} actionButtons={{ - position: "bottom", + position: "after", uploadButton: {}, abortButton: {}, }} @@ -65,7 +65,13 @@ const DemoDropzoneUploading = ({ button }) => { }} > {files.map((file) => ( - <FileCard key={file.id} {...file} onDelete={removeFile} info preview/> + <FileCard + key={file.id} + {...file} + onDelete={removeFile} + info + preview + /> ))} </div> )} @@ -78,7 +84,7 @@ const DemoDropzoneUploading = ({ button }) => { accept={"image/*"} maxFileSize={28 * 1024 * 1024} maxFiles={2} - actionButtons={{ position: "bottom", uploadButton: {}, abortButton: {} }} + actionButtons={{ position: "after", uploadButton: {}, abortButton: {} }} uploadConfig={{ url: "https://www.myawsomeserver.com/upload", method: "POST", @@ -92,8 +98,14 @@ const DemoDropzoneUploading = ({ button }) => { fakeUpload > {files.map((file) => ( - <FileMosaic key={file.id} {...file} onDelete={removeFile} info preview/> - ))} + <FileMosaic + key={file.id} + {...file} + onDelete={removeFile} + info + preview + /> + ))} </Dropzone> ); }; diff --git a/src/pages/MainPage.jsx b/src/pages/MainPage.jsx index d726bf64b7cdb495c7db685225670174d91d72dc..d2f99b764bd4fc66319c4eb4a994b6352081e2f6 100644 --- a/src/pages/MainPage.jsx +++ b/src/pages/MainPage.jsx @@ -8,7 +8,6 @@ import GettingStarted from "../components/MainPage/GettingStarted"; import MainNavBar from "../components/MainPage/MainNavBar"; import MainFooter from "../components/MainPage/MainFooter"; import FileMosaicImageVideoPreviews from "../components/MainPage/MainRight/FileMosaicImageVideoPreviews"; -//import FileCard from "../files-ui/components/file-item/components/FileCard/FileCard"; import { Divider } from "@mui/material"; import ExtraComponentsMainPage from "../components/MainPage/SecondaryRight/ExtraComponentsMainPage"; import ExtraComponentsMainPageInputButton from "../components/MainPage/SecondaryRight/ExtraComponentsMainPageInputButton"; diff --git a/src/pages/server-side/ServerSidePage.tsx b/src/pages/server-side/ServerSidePage.tsx index 251cbfa1ddae2348578b90014953200ed9c872f2..4e4b410ff887f714db8e20e7611f5e6fd5009b35 100644 --- a/src/pages/server-side/ServerSidePage.tsx +++ b/src/pages/server-side/ServerSidePage.tsx @@ -8,7 +8,9 @@ import MainTitle from "../../components/main-title/MainTitle"; import MainParagraph from "../../components/paragraph-main/MainParagraph"; import RightMenu from "../../components/RightMenu/RightMenu"; import AnchorToTab from "../../components/util-components/AnchorToTab"; - +import { FileMosaic } from "../../files-ui"; +import expressjslogo from "../../static/serverside/expressjslogo.webp"; +import javalogo from "../../static/serverside/springbootjavalogo.png"; const ServerSidePage = () => { return ( <React.Fragment> @@ -25,25 +27,57 @@ const ServerSidePage = () => { </DescParagraph> <section id="expressjs"> <SubTitle content="Express JS" /> - <DescParagraph> - The following code is just the main part of a project. Check it up - in the following{" "} - <AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/expressjs"> - here - </AnchorToTab> - . - </DescParagraph> + <div + style={{ + display: "flex", + flexDirection: "revert", + flexWrap: "nowrap", + alignItems: "center", + justifyContent: "space-between", + }} + > + <DescParagraph> + The following code is just the main part of a project. Check it + up in the following{" "} + <AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/expressjs"> + link + </AnchorToTab> + . + </DescParagraph> + <FileMosaic + {...logoExpress} + onClick={() => { + alert("open"); + }} + /> + </div> </section> <section id="springboot"> <SubTitle content="Java - Spring boot" />{" "} - <DescParagraph> - The following code is just the main part of a project. Check it up - in the following{" "} - <AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/springboot"> - here - </AnchorToTab> - . - </DescParagraph> + <div + style={{ + display: "flex", + flexDirection: "revert", + flexWrap: "nowrap", + alignItems: "center", + justifyContent: "space-between", + }} + > + <DescParagraph> + The following code is just the main part of a project. Check it + up in the following{" "} + <AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/springboot"> + link + </AnchorToTab> + . + </DescParagraph> + <FileMosaic + {...logoJava} + onClick={() => { + alert("open"); + }} + /> + </div> </section> </MainContentContainer> <RightMenuContainer> @@ -67,3 +101,17 @@ const rightMenuItems = [ referTo: "/server-side#springboot", }, ]; + +const logoExpress = { + id: ":0:", + //size: 28 * 1024 * 1024, + type: "image/png", + imageUrl: expressjslogo, +}; + +const logoJava = { + id: ":1:", + //size: 28 * 1024 * 1024, + type: "image/png", + imageUrl: javalogo, +}; diff --git a/src/static/index.d.ts b/src/static/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..a6d28473e39c4b37bc93fd456c80242a18a3511c --- /dev/null +++ b/src/static/index.d.ts @@ -0,0 +1,4 @@ +declare module '*.png'; +declare module '*.jpg'; +declare module '*.webp'; +declare module '*.mp4'; \ No newline at end of file diff --git a/src/static/serverside/expressjslogo.webp b/src/static/serverside/expressjslogo.webp new file mode 100644 index 0000000000000000000000000000000000000000..c1ff31fc51b32c2d30c3db9f36e11abc6124751c Binary files /dev/null and b/src/static/serverside/expressjslogo.webp differ diff --git a/src/static/serverside/springbootjavalogo.png b/src/static/serverside/springbootjavalogo.png new file mode 100644 index 0000000000000000000000000000000000000000..6fa8675befd80a2b29c332c8cd5e9784c6941a4a Binary files /dev/null and b/src/static/serverside/springbootjavalogo.png differ