Skip to content

Commit 715fa0f

Browse files
committed
[REF]: Saving changes before past tarvel to recover file-item/utils/getLocalFileItemData.ts
1 parent fed6fa0 commit 715fa0f

File tree

6 files changed

+88
-25
lines changed

6 files changed

+88
-25
lines changed

src/components/demo-components/dropzone-demo/DemoDropzoneUploading.jsx

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ const DemoDropzoneUploading = ({ button }) => {
1616
const removeFile = (id) => {
1717
setFiles(files.filter((x) => x.id !== id));
1818
};
19-
const handleFinishUpload=(uploadedFiles)=>{
19+
const handleFinishUpload = (uploadedFiles) => {
2020
console.log("Upload has finished", uploadedFiles);
21-
}
21+
};
2222
if (button)
2323
return (
2424
<div
@@ -38,7 +38,7 @@ const DemoDropzoneUploading = ({ button }) => {
3838
maxFileSize={28 * 1024 * 1024}
3939
maxFiles={2}
4040
actionButtons={{
41-
position: "bottom",
41+
position: "after",
4242
uploadButton: {},
4343
abortButton: {},
4444
}}
@@ -65,7 +65,13 @@ const DemoDropzoneUploading = ({ button }) => {
6565
}}
6666
>
6767
{files.map((file) => (
68-
<FileCard key={file.id} {...file} onDelete={removeFile} info preview/>
68+
<FileCard
69+
key={file.id}
70+
{...file}
71+
onDelete={removeFile}
72+
info
73+
preview
74+
/>
6975
))}
7076
</div>
7177
)}
@@ -78,7 +84,7 @@ const DemoDropzoneUploading = ({ button }) => {
7884
accept={"image/*"}
7985
maxFileSize={28 * 1024 * 1024}
8086
maxFiles={2}
81-
actionButtons={{ position: "bottom", uploadButton: {}, abortButton: {} }}
87+
actionButtons={{ position: "after", uploadButton: {}, abortButton: {} }}
8288
uploadConfig={{
8389
url: "https://www.myawsomeserver.com/upload",
8490
method: "POST",
@@ -92,8 +98,14 @@ const DemoDropzoneUploading = ({ button }) => {
9298
fakeUpload
9399
>
94100
{files.map((file) => (
95-
<FileMosaic key={file.id} {...file} onDelete={removeFile} info preview/>
96-
))}
101+
<FileMosaic
102+
key={file.id}
103+
{...file}
104+
onDelete={removeFile}
105+
info
106+
preview
107+
/>
108+
))}
97109
</Dropzone>
98110
);
99111
};

src/pages/MainPage.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import GettingStarted from "../components/MainPage/GettingStarted";
88
import MainNavBar from "../components/MainPage/MainNavBar";
99
import MainFooter from "../components/MainPage/MainFooter";
1010
import FileMosaicImageVideoPreviews from "../components/MainPage/MainRight/FileMosaicImageVideoPreviews";
11-
//import FileCard from "../files-ui/components/file-item/components/FileCard/FileCard";
1211
import { Divider } from "@mui/material";
1312
import ExtraComponentsMainPage from "../components/MainPage/SecondaryRight/ExtraComponentsMainPage";
1413
import ExtraComponentsMainPageInputButton from "../components/MainPage/SecondaryRight/ExtraComponentsMainPageInputButton";

src/pages/server-side/ServerSidePage.tsx

Lines changed: 65 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import MainTitle from "../../components/main-title/MainTitle";
88
import MainParagraph from "../../components/paragraph-main/MainParagraph";
99
import RightMenu from "../../components/RightMenu/RightMenu";
1010
import AnchorToTab from "../../components/util-components/AnchorToTab";
11-
11+
import { FileMosaic } from "../../files-ui";
12+
import expressjslogo from "../../static/serverside/expressjslogo.webp";
13+
import javalogo from "../../static/serverside/springbootjavalogo.png";
1214
const ServerSidePage = () => {
1315
return (
1416
<React.Fragment>
@@ -25,25 +27,57 @@ const ServerSidePage = () => {
2527
</DescParagraph>
2628
<section id="expressjs">
2729
<SubTitle content="Express JS" />
28-
<DescParagraph>
29-
The following code is just the main part of a project. Check it up
30-
in the following{" "}
31-
<AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/expressjs">
32-
here
33-
</AnchorToTab>
34-
.
35-
</DescParagraph>
30+
<div
31+
style={{
32+
display: "flex",
33+
flexDirection: "revert",
34+
flexWrap: "nowrap",
35+
alignItems: "center",
36+
justifyContent: "space-between",
37+
}}
38+
>
39+
<DescParagraph>
40+
The following code is just the main part of a project. Check it
41+
up in the following{" "}
42+
<AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/expressjs">
43+
link
44+
</AnchorToTab>
45+
.
46+
</DescParagraph>
47+
<FileMosaic
48+
{...logoExpress}
49+
onClick={() => {
50+
alert("open");
51+
}}
52+
/>
53+
</div>
3654
</section>
3755
<section id="springboot">
3856
<SubTitle content="Java - Spring boot" />{" "}
39-
<DescParagraph>
40-
The following code is just the main part of a project. Check it up
41-
in the following{" "}
42-
<AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/springboot">
43-
here
44-
</AnchorToTab>
45-
.
46-
</DescParagraph>
57+
<div
58+
style={{
59+
display: "flex",
60+
flexDirection: "revert",
61+
flexWrap: "nowrap",
62+
alignItems: "center",
63+
justifyContent: "space-between",
64+
}}
65+
>
66+
<DescParagraph>
67+
The following code is just the main part of a project. Check it
68+
up in the following{" "}
69+
<AnchorToTab href="https://github.com/files-ui/files-ui-web-test/tree/master/springboot">
70+
link
71+
</AnchorToTab>
72+
.
73+
</DescParagraph>
74+
<FileMosaic
75+
{...logoJava}
76+
onClick={() => {
77+
alert("open");
78+
}}
79+
/>
80+
</div>
4781
</section>
4882
</MainContentContainer>
4983
<RightMenuContainer>
@@ -67,3 +101,17 @@ const rightMenuItems = [
67101
referTo: "/server-side#springboot",
68102
},
69103
];
104+
105+
const logoExpress = {
106+
id: ":0:",
107+
//size: 28 * 1024 * 1024,
108+
type: "image/png",
109+
imageUrl: expressjslogo,
110+
};
111+
112+
const logoJava = {
113+
id: ":1:",
114+
//size: 28 * 1024 * 1024,
115+
type: "image/png",
116+
imageUrl: javalogo,
117+
};

src/static/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
declare module '*.png';
2+
declare module '*.jpg';
3+
declare module '*.webp';
4+
declare module '*.mp4';
23.8 KB
Loading
82.7 KB
Loading

0 commit comments

Comments
 (0)