Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
llm-train
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wuhao
llm-train
Commits
a7b4f7eb
Commit
a7b4f7eb
authored
Apr 03, 2024
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
f6034a3d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
23 additions
and
28 deletions
+23
-28
1674969615895-1712109317051-913464763.jpeg
...ads/2024-04-03/1674969615895-1712109317051-913464763.jpeg
+0
-0
1674969615895-1712109784665-469825162.jpeg
...ads/2024-04-03/1674969615895-1712109784665-469825162.jpeg
+0
-0
b6-1712109984097-357339440.jpeg
public/uploads/2024-04-03/b6-1712109984097-357339440.jpeg
+0
-0
AddFolder.jsx
src/components/AddFolder.jsx
+3
-1
Cards.jsx
src/components/Cards.jsx
+15
-22
EditFolder.jsx
src/components/EditFolder.jsx
+5
-3
doFetch.js
src/lib/doFetch.js
+0
-2
No files found.
public/uploads/2024-04-03/1674969615895-171210
4613664-89018490
3.jpeg
→
public/uploads/2024-04-03/1674969615895-171210
9317051-91346476
3.jpeg
View file @
a7b4f7eb
File moved
public/uploads/2024-04-03/1674969615895-1712109784665-469825162.jpeg
0 → 100644
View file @
a7b4f7eb
177 KB
public/uploads/2024-04-03/b6-1712109984097-357339440.jpeg
0 → 100644
View file @
a7b4f7eb
79.6 KB
src/components/AddFolder.jsx
View file @
a7b4f7eb
...
...
@@ -15,7 +15,7 @@ import { useForm } from "react-hook-form";
import
{
doFetch
}
from
"@/lib/doFetch"
;
import
UploadImage
from
"./UploadImage"
;
export
default
function
AddFolder
({
refresh
})
{
export
default
function
AddFolder
({
refresh
})
{
const
{
isOpen
,
onOpen
,
onOpenChange
}
=
useDisclosure
();
const
{
register
,
handleSubmit
,
control
,
setValue
}
=
useForm
();
...
...
@@ -82,6 +82,8 @@ export default function AddFolder({refresh}) {
</
div
>
<
Input
isRequired
isClearable
type=
"text"
label=
"文件夹"
name=
"name"
...
...
src/components/Cards.jsx
View file @
a7b4f7eb
/* eslint-disable import/no-anonymous-default-export */
/* eslint-disable react/display-name */
import
React
,
{
memo
}
from
"react"
;
import
React
,
{
memo
}
from
"react"
;
import
{
Card
,
CardBody
,
CardFooter
,
Image
}
from
"@nextui-org/react"
;
import
prisma
from
'@/lib/prisma'
;
import
prisma
from
"@/lib/prisma"
;
import
{
getFetch
}
from
"@/lib/doFetch"
;
import
{
difftime
}
from
"@/lib/time"
;
import
{
useRouter
}
from
"next/navigation"
;
export
default
memo
(({
list
})
=>
{
export
default
memo
(({
list
})
=>
{
const
router
=
useRouter
();
return
(
<
div
className=
"gap-2 grid xl:grid-cols-8 lg:grid-cols-6 md:grid-cols-4 sm:grid-cols-2"
>
{
list
.
map
((
item
,
index
)
=>
(
{
list
?.
map
?.
((
item
,
index
)
=>
(
<
Card
shadow=
"sm"
key=
{
index
}
isPressable
onPress=
{
()
=>
{
router
.
push
(
'/detail/'
+
item
.
id
);
router
.
push
(
"/detail/"
+
item
.
id
);
}
}
>
<
CardBody
className=
"overflow-visible p-0"
>
...
...
@@ -39,22 +39,15 @@ export default memo(({list}) => {
</
CardFooter
>
</
Card
>
))
}
{
list
.
length
===
0
&&
<
Card
isFooterBlurred
radius=
"lg"
className=
"border-none"
>
<
Image
alt=
"empty"
isBlurred
className=
"object-cover"
height=
{
200
}
src=
"/empty.png"
width=
{
200
}
/>
</
Card
>
}
{
list
?.
length
===
0
&&
(
<
Image
alt=
"empty"
isZoomed
className=
"object-cover"
src=
"/empty.png"
width=
{
240
}
/>
)
}
</
div
>
);
})
\ No newline at end of file
});
src/components/EditFolder.jsx
View file @
a7b4f7eb
/* eslint-disable react-hooks/exhaustive-deps */
import
React
,
{
useEffect
}
from
"react"
;
import
{
Modal
,
...
...
@@ -27,7 +28,7 @@ export default function EditFolder({ refresh, data }) {
});
useEffect
(()
=>
{
if
(
data
)
{
if
(
data
&&
isOpen
===
true
)
{
setValue
(
"poster"
,
data
.
poster
);
setValue
(
"name"
,
data
.
name
);
console
.
log
(
data
.
name
);
...
...
@@ -104,17 +105,18 @@ export default function EditFolder({ refresh, data }) {
}
}
render=
{
({
field
:
{
onChange
,
onBlur
,
value
}
})
=>
(
<
Input
isRequired
isClearable
type=
"text"
label=
"文件夹"
name=
"name"
onBlur=
{
onBlur
}
onChange=
{
onChange
}
on
Value
Change=
{
onChange
}
value=
{
value
}
/>
)
}
name=
"name"
/>
{
errors
.
firstName
&&
<
p
>
This is required.
</
p
>
}
</
form
>
</
ModalBody
>
<
ModalFooter
>
...
...
src/lib/doFetch.js
View file @
a7b4f7eb
...
...
@@ -4,8 +4,6 @@ export const doFetch = ({ url, params }) => {
return
request
(
url
,
{
method
:
"POST"
,
data
:
params
??
{},
}).
then
((
response
)
=>
{
});
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment