@skalfa/skalfa-app 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +43 -43
- package/.github/workflows/publish.yml +39 -0
- package/CONTRIBUTING.md +45 -0
- package/LICENSE +21 -0
- package/README.md +91 -28
- package/app/auth/edit/page.tsx +65 -65
- package/app/auth/login/page.tsx +63 -63
- package/app/auth/me/page.tsx +58 -58
- package/app/auth/register/page.tsx +69 -69
- package/app/auth/verify/page.tsx +53 -53
- package/app/dashboard/user/page.tsx +76 -76
- package/app/layout.tsx +37 -37
- package/app/manifest.ts +25 -0
- package/app/page.tsx +13 -13
- package/barrels.json +5 -5
- package/blueprints/starter.blueprint.json +102 -102
- package/bun.lock +916 -0
- package/components/base.components/chip/Chip.component.tsx +39 -39
- package/components/base.components/document/DocumentViewer.component.tsx +163 -163
- package/components/base.components/document/ExportExcel.component.tsx +340 -340
- package/components/base.components/document/ImportExcel.component.tsx +315 -315
- package/components/base.components/document/PrintTable.component.tsx +204 -204
- package/components/base.components/document/RenderPDF.component.tsx +415 -415
- package/components/base.components/input/Checkbox.component.tsx +109 -109
- package/components/base.components/input/Input.component.tsx +332 -332
- package/components/base.components/input/InputCheckbox.component.tsx +174 -174
- package/components/base.components/input/InputCurrency.component.tsx +163 -163
- package/components/base.components/input/InputDate.component.tsx +352 -352
- package/components/base.components/input/InputDatetime.component.tsx +260 -260
- package/components/base.components/input/InputDocument.component.tsx +351 -351
- package/components/base.components/input/InputImage.component.tsx +533 -533
- package/components/base.components/input/InputMap.component.tsx +317 -317
- package/components/base.components/input/InputNumber.component.tsx +192 -192
- package/components/base.components/input/InputOtp.component.tsx +169 -169
- package/components/base.components/input/InputPassword.component.tsx +236 -236
- package/components/base.components/input/InputRadio.component.tsx +175 -175
- package/components/base.components/input/InputTime.component.tsx +275 -275
- package/components/base.components/input/InputValues.component.tsx +68 -68
- package/components/base.components/input/Radio.component.tsx +102 -102
- package/components/base.components/input/Select.component.tsx +541 -541
- package/components/base.components/modal/BottomSheet.component.tsx +245 -245
- package/components/base.components/supervision/FormSupervision.component.tsx +433 -433
- package/components/base.components/supervision/TableSupervision.component.tsx +697 -697
- package/components/base.components/table/ControlBar.component.tsx +497 -497
- package/components/base.components/table/FilterComponent.tsx +518 -518
- package/components/base.components/table/Table.component.tsx +469 -469
- package/components/base.components/typography/TypographyArticle.component.tsx +26 -26
- package/components/base.components/typography/TypographyColumn.component.tsx +20 -20
- package/components/base.components/typography/TypographyContent.component.tsx +20 -20
- package/components/base.components/typography/TypographyTips.component.tsx +20 -20
- package/components/base.components/wrap/Draggable.component.tsx +303 -303
- package/components/base.components/wrap/IDBProvider.tsx +12 -12
- package/components/base.components/wrap/Image.component.tsx +9 -9
- package/components/base.components/wrap/ShortcutProvider.tsx +57 -57
- package/components/base.components/wrap/Swipe.component.tsx +93 -93
- package/components/index.ts +2 -2
- package/contexts/AppProvider.tsx +11 -11
- package/contexts/Auth.context.tsx +64 -64
- package/contexts/Toggle.context.tsx +44 -44
- package/next.config.ts +15 -1
- package/package.json +14 -13
- package/public/204.svg +19 -19
- package/public/500.svg +39 -39
- package/public/icon-192.png +0 -0
- package/public/icon-512.png +0 -0
- package/public/images/logo-fill.png +0 -0
- package/public/images/logo-full-fill.png +0 -0
- package/public/images/logo-full.png +0 -0
- package/public/images/logo.png +0 -0
- package/schema/idb/app.schema.ts +8 -8
- package/src-tauri/Cargo.toml +14 -0
- package/src-tauri/build.rs +3 -0
- package/src-tauri/capabilities/default.json +11 -0
- package/src-tauri/icons/128x128.png +0 -0
- package/src-tauri/icons/128x128@2x.png +0 -0
- package/src-tauri/icons/32x32.png +0 -0
- package/src-tauri/icons/icon.icns +0 -0
- package/src-tauri/icons/icon.ico +0 -0
- package/src-tauri/src/main.rs +7 -0
- package/src-tauri/tauri.conf.json +36 -0
- package/styles/globals.css +231 -231
- package/styles/tailwind.safelist +68 -68
- package/utils/commands/barrels.ts +27 -27
- package/utils/commands/light.ts +21 -21
- package/utils/commands/logger.ts +42 -42
- package/utils/commands/stubs/table-blueprint.stub +12 -12
- package/utils/commands/use-pdf.ts +29 -29
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { faTimes } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
-
import { cn } from "@utils";
|
|
4
|
-
|
|
5
|
-
export function ChipComponent({
|
|
6
|
-
items,
|
|
7
|
-
onClick,
|
|
8
|
-
onDelete,
|
|
9
|
-
className,
|
|
10
|
-
} : {
|
|
11
|
-
items : Record<string, any>,
|
|
12
|
-
onClick ?: (item: any, index: number) => void,
|
|
13
|
-
onDelete ?: (item: any, index: number) => void,
|
|
14
|
-
className ?: string,
|
|
15
|
-
}) {
|
|
16
|
-
return (
|
|
17
|
-
<div className={cn(`overflow-hidden flex gap-2 flex-wrap`, className)}>
|
|
18
|
-
{items?.map((item: any, key: number) => {
|
|
19
|
-
return (
|
|
20
|
-
<div
|
|
21
|
-
key={key}
|
|
22
|
-
className={`flex text-xs py-0.5 px-2 justify-between text-foreground border items-center rounded-md cursor-pointer`}
|
|
23
|
-
onClick={() => onClick?.(item, key)}
|
|
24
|
-
>
|
|
25
|
-
<span>{item}</span>
|
|
26
|
-
|
|
27
|
-
{onDelete && (
|
|
28
|
-
<FontAwesomeIcon
|
|
29
|
-
icon={faTimes}
|
|
30
|
-
className={`text-xs cursor-pointer text-light-foreground pl-2 py-1 hover:text-danger`}
|
|
31
|
-
onClick={() => onDelete?.(item, key)}
|
|
32
|
-
/>
|
|
33
|
-
)}
|
|
34
|
-
</div>
|
|
35
|
-
);
|
|
36
|
-
})}
|
|
37
|
-
</div>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
1
|
+
import { faTimes } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import { cn } from "@utils";
|
|
4
|
+
|
|
5
|
+
export function ChipComponent({
|
|
6
|
+
items,
|
|
7
|
+
onClick,
|
|
8
|
+
onDelete,
|
|
9
|
+
className,
|
|
10
|
+
} : {
|
|
11
|
+
items : Record<string, any>,
|
|
12
|
+
onClick ?: (item: any, index: number) => void,
|
|
13
|
+
onDelete ?: (item: any, index: number) => void,
|
|
14
|
+
className ?: string,
|
|
15
|
+
}) {
|
|
16
|
+
return (
|
|
17
|
+
<div className={cn(`overflow-hidden flex gap-2 flex-wrap`, className)}>
|
|
18
|
+
{items?.map((item: any, key: number) => {
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
key={key}
|
|
22
|
+
className={`flex text-xs py-0.5 px-2 justify-between text-foreground border items-center rounded-md cursor-pointer`}
|
|
23
|
+
onClick={() => onClick?.(item, key)}
|
|
24
|
+
>
|
|
25
|
+
<span>{item}</span>
|
|
26
|
+
|
|
27
|
+
{onDelete && (
|
|
28
|
+
<FontAwesomeIcon
|
|
29
|
+
icon={faTimes}
|
|
30
|
+
className={`text-xs cursor-pointer text-light-foreground pl-2 py-1 hover:text-danger`}
|
|
31
|
+
onClick={() => onDelete?.(item, key)}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
})}
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
39
|
+
}
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
|
|
3
|
-
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
-
import Image from "next/image";
|
|
5
|
-
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
|
-
import { faFilePdf, faFileImage, faFileWord, faFileExcel, faFile } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
-
import { cn } from "@/utils";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type Props = {
|
|
12
|
-
file ?: File | string | null;
|
|
13
|
-
width ?: number;
|
|
14
|
-
height ?: number;
|
|
15
|
-
mode ?: "full" | "thumb";
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
export const DocumentViewerIcon = (ext: string) => {
|
|
21
|
-
switch (ext) {
|
|
22
|
-
case "jpg":
|
|
23
|
-
case "jpeg":
|
|
24
|
-
case "png":
|
|
25
|
-
case "webp":
|
|
26
|
-
return faFileImage;
|
|
27
|
-
case "pdf":
|
|
28
|
-
return faFilePdf;
|
|
29
|
-
case "doc":
|
|
30
|
-
case "docx":
|
|
31
|
-
return faFileWord;
|
|
32
|
-
case "xls":
|
|
33
|
-
case "xlsx":
|
|
34
|
-
return faFileExcel;
|
|
35
|
-
default:
|
|
36
|
-
return faFile;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
export function DocumentViewerComponent({ file, width, height, mode = "full" }: Props) {
|
|
43
|
-
const [fileUrl, setFileUrl] = useState<string | null>(null);
|
|
44
|
-
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
45
|
-
|
|
46
|
-
useEffect(() => {
|
|
47
|
-
if (!file) {
|
|
48
|
-
setFileUrl(null);
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (typeof file === "string") {
|
|
53
|
-
setFileUrl(file);
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const objectUrl = URL.createObjectURL(file);
|
|
58
|
-
setFileUrl(objectUrl);
|
|
59
|
-
return () => URL.revokeObjectURL(objectUrl);
|
|
60
|
-
}, [file]);
|
|
61
|
-
|
|
62
|
-
const extension = useMemo(() => {
|
|
63
|
-
if (!file) return null;
|
|
64
|
-
if (typeof file === "string") {
|
|
65
|
-
const clean = file.split("?")[0].split("#")[0];
|
|
66
|
-
return clean.split(".").pop()?.toLowerCase() || null;
|
|
67
|
-
}
|
|
68
|
-
return file.name.split(".").pop()?.toLowerCase() || null;
|
|
69
|
-
}, [file]);
|
|
70
|
-
|
|
71
|
-
const isImage = ["jpg", "jpeg", "png", "webp"].includes(extension || "");
|
|
72
|
-
const isPdf = extension === "pdf";
|
|
73
|
-
|
|
74
|
-
const renderTaskRef = useRef<any>(null);
|
|
75
|
-
|
|
76
|
-
useEffect(() => {
|
|
77
|
-
if (!file || !isPdf || !fileUrl || !canvasRef.current) return;
|
|
78
|
-
|
|
79
|
-
let cancelled = false;
|
|
80
|
-
|
|
81
|
-
const renderPdf = async () => {
|
|
82
|
-
const pdfjs = await import("pdfjs-dist/legacy/build/pdf.mjs");
|
|
83
|
-
pdfjs.GlobalWorkerOptions.workerSrc = "/pdf.worker.min.mjs";
|
|
84
|
-
|
|
85
|
-
if (renderTaskRef.current) {
|
|
86
|
-
try {
|
|
87
|
-
await renderTaskRef.current.cancel();
|
|
88
|
-
} catch {}
|
|
89
|
-
renderTaskRef.current = null;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
let loadingTask;
|
|
93
|
-
|
|
94
|
-
if (typeof file === "string") {
|
|
95
|
-
loadingTask = pdfjs.getDocument(fileUrl);
|
|
96
|
-
} else {
|
|
97
|
-
const buf = await file.arrayBuffer();
|
|
98
|
-
const uint8 = new Uint8Array(buf);
|
|
99
|
-
loadingTask = pdfjs.getDocument({ data: uint8 });
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
const pdf = await loadingTask.promise;
|
|
103
|
-
if (cancelled) return;
|
|
104
|
-
|
|
105
|
-
const page = await pdf.getPage(1);
|
|
106
|
-
if (cancelled) return;
|
|
107
|
-
|
|
108
|
-
const scale = mode === "thumb" ? 0.35 : 1;
|
|
109
|
-
const viewport = page.getViewport({ scale });
|
|
110
|
-
|
|
111
|
-
const canvas = canvasRef.current;
|
|
112
|
-
if (!canvas) return;
|
|
113
|
-
|
|
114
|
-
const ctx = canvas.getContext("2d");
|
|
115
|
-
if (!ctx) return;
|
|
116
|
-
|
|
117
|
-
canvas.width = viewport.width;
|
|
118
|
-
canvas.height = viewport.height;
|
|
119
|
-
|
|
120
|
-
const renderTask = page.render({ canvasContext: ctx, viewport, canvas });;
|
|
121
|
-
renderTaskRef.current = renderTask;
|
|
122
|
-
|
|
123
|
-
await renderTask.promise;
|
|
124
|
-
renderTaskRef.current = null;
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
renderPdf();
|
|
128
|
-
|
|
129
|
-
return () => {
|
|
130
|
-
cancelled = true;
|
|
131
|
-
if (renderTaskRef.current) {
|
|
132
|
-
try {
|
|
133
|
-
renderTaskRef.current.cancel();
|
|
134
|
-
} catch {}
|
|
135
|
-
renderTaskRef.current = null;
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
}, [isPdf, fileUrl, mode]);
|
|
139
|
-
|
|
140
|
-
if (!fileUrl) return null;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return (
|
|
144
|
-
<div
|
|
145
|
-
style={{
|
|
146
|
-
width: width ? width : "100%",
|
|
147
|
-
height: height ? height : "100%",
|
|
148
|
-
overflow: "hidden",
|
|
149
|
-
position: "relative",
|
|
150
|
-
}}
|
|
151
|
-
>
|
|
152
|
-
{isImage && <Image src={fileUrl} alt="document" fill className={mode === "thumb" ? "object-cover" : "object-contain"}/>}
|
|
153
|
-
|
|
154
|
-
{isPdf && <canvas ref={canvasRef} className={cn("block w-full h-full", mode === "thumb" ? "object-cover" : "object-contain")} />}
|
|
155
|
-
|
|
156
|
-
{!isImage && !isPdf && (
|
|
157
|
-
<div className={cn("w-full h-full flex flex-col items-center justify-center opacity-50 gap-4")}>
|
|
158
|
-
<FontAwesomeIcon icon={DocumentViewerIcon(extension || "")} className={mode !== "thumb" ? "text-3xl" : "text-lg"} />
|
|
159
|
-
{mode !== "thumb" && file instanceof File && (<p className="text-center text-sm">{file.name}</p>)}
|
|
160
|
-
</div>
|
|
161
|
-
)}
|
|
162
|
-
</div>
|
|
163
|
-
);
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
6
|
+
import { faFilePdf, faFileImage, faFileWord, faFileExcel, faFile } from "@fortawesome/free-solid-svg-icons";
|
|
7
|
+
import { cn } from "@/utils";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
type Props = {
|
|
12
|
+
file ?: File | string | null;
|
|
13
|
+
width ?: number;
|
|
14
|
+
height ?: number;
|
|
15
|
+
mode ?: "full" | "thumb";
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
export const DocumentViewerIcon = (ext: string) => {
|
|
21
|
+
switch (ext) {
|
|
22
|
+
case "jpg":
|
|
23
|
+
case "jpeg":
|
|
24
|
+
case "png":
|
|
25
|
+
case "webp":
|
|
26
|
+
return faFileImage;
|
|
27
|
+
case "pdf":
|
|
28
|
+
return faFilePdf;
|
|
29
|
+
case "doc":
|
|
30
|
+
case "docx":
|
|
31
|
+
return faFileWord;
|
|
32
|
+
case "xls":
|
|
33
|
+
case "xlsx":
|
|
34
|
+
return faFileExcel;
|
|
35
|
+
default:
|
|
36
|
+
return faFile;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export function DocumentViewerComponent({ file, width, height, mode = "full" }: Props) {
|
|
43
|
+
const [fileUrl, setFileUrl] = useState<string | null>(null);
|
|
44
|
+
const canvasRef = useRef<HTMLCanvasElement>(null);
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (!file) {
|
|
48
|
+
setFileUrl(null);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
if (typeof file === "string") {
|
|
53
|
+
setFileUrl(file);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const objectUrl = URL.createObjectURL(file);
|
|
58
|
+
setFileUrl(objectUrl);
|
|
59
|
+
return () => URL.revokeObjectURL(objectUrl);
|
|
60
|
+
}, [file]);
|
|
61
|
+
|
|
62
|
+
const extension = useMemo(() => {
|
|
63
|
+
if (!file) return null;
|
|
64
|
+
if (typeof file === "string") {
|
|
65
|
+
const clean = file.split("?")[0].split("#")[0];
|
|
66
|
+
return clean.split(".").pop()?.toLowerCase() || null;
|
|
67
|
+
}
|
|
68
|
+
return file.name.split(".").pop()?.toLowerCase() || null;
|
|
69
|
+
}, [file]);
|
|
70
|
+
|
|
71
|
+
const isImage = ["jpg", "jpeg", "png", "webp"].includes(extension || "");
|
|
72
|
+
const isPdf = extension === "pdf";
|
|
73
|
+
|
|
74
|
+
const renderTaskRef = useRef<any>(null);
|
|
75
|
+
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
if (!file || !isPdf || !fileUrl || !canvasRef.current) return;
|
|
78
|
+
|
|
79
|
+
let cancelled = false;
|
|
80
|
+
|
|
81
|
+
const renderPdf = async () => {
|
|
82
|
+
const pdfjs = await import("pdfjs-dist/legacy/build/pdf.mjs");
|
|
83
|
+
pdfjs.GlobalWorkerOptions.workerSrc = "/pdf.worker.min.mjs";
|
|
84
|
+
|
|
85
|
+
if (renderTaskRef.current) {
|
|
86
|
+
try {
|
|
87
|
+
await renderTaskRef.current.cancel();
|
|
88
|
+
} catch {}
|
|
89
|
+
renderTaskRef.current = null;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
let loadingTask;
|
|
93
|
+
|
|
94
|
+
if (typeof file === "string") {
|
|
95
|
+
loadingTask = pdfjs.getDocument(fileUrl);
|
|
96
|
+
} else {
|
|
97
|
+
const buf = await file.arrayBuffer();
|
|
98
|
+
const uint8 = new Uint8Array(buf);
|
|
99
|
+
loadingTask = pdfjs.getDocument({ data: uint8 });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const pdf = await loadingTask.promise;
|
|
103
|
+
if (cancelled) return;
|
|
104
|
+
|
|
105
|
+
const page = await pdf.getPage(1);
|
|
106
|
+
if (cancelled) return;
|
|
107
|
+
|
|
108
|
+
const scale = mode === "thumb" ? 0.35 : 1;
|
|
109
|
+
const viewport = page.getViewport({ scale });
|
|
110
|
+
|
|
111
|
+
const canvas = canvasRef.current;
|
|
112
|
+
if (!canvas) return;
|
|
113
|
+
|
|
114
|
+
const ctx = canvas.getContext("2d");
|
|
115
|
+
if (!ctx) return;
|
|
116
|
+
|
|
117
|
+
canvas.width = viewport.width;
|
|
118
|
+
canvas.height = viewport.height;
|
|
119
|
+
|
|
120
|
+
const renderTask = page.render({ canvasContext: ctx, viewport, canvas });;
|
|
121
|
+
renderTaskRef.current = renderTask;
|
|
122
|
+
|
|
123
|
+
await renderTask.promise;
|
|
124
|
+
renderTaskRef.current = null;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
renderPdf();
|
|
128
|
+
|
|
129
|
+
return () => {
|
|
130
|
+
cancelled = true;
|
|
131
|
+
if (renderTaskRef.current) {
|
|
132
|
+
try {
|
|
133
|
+
renderTaskRef.current.cancel();
|
|
134
|
+
} catch {}
|
|
135
|
+
renderTaskRef.current = null;
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
}, [isPdf, fileUrl, mode]);
|
|
139
|
+
|
|
140
|
+
if (!fileUrl) return null;
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
return (
|
|
144
|
+
<div
|
|
145
|
+
style={{
|
|
146
|
+
width: width ? width : "100%",
|
|
147
|
+
height: height ? height : "100%",
|
|
148
|
+
overflow: "hidden",
|
|
149
|
+
position: "relative",
|
|
150
|
+
}}
|
|
151
|
+
>
|
|
152
|
+
{isImage && <Image src={fileUrl} alt="document" fill className={mode === "thumb" ? "object-cover" : "object-contain"}/>}
|
|
153
|
+
|
|
154
|
+
{isPdf && <canvas ref={canvasRef} className={cn("block w-full h-full", mode === "thumb" ? "object-cover" : "object-contain")} />}
|
|
155
|
+
|
|
156
|
+
{!isImage && !isPdf && (
|
|
157
|
+
<div className={cn("w-full h-full flex flex-col items-center justify-center opacity-50 gap-4")}>
|
|
158
|
+
<FontAwesomeIcon icon={DocumentViewerIcon(extension || "")} className={mode !== "thumb" ? "text-3xl" : "text-lg"} />
|
|
159
|
+
{mode !== "thumb" && file instanceof File && (<p className="text-center text-sm">{file.name}</p>)}
|
|
160
|
+
</div>
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
);
|
|
164
164
|
}
|