Spaces:
Paused
Paused
Commit
β’
db81aaa
1
Parent(s):
1994a9c
add actions
Browse files
src/components/business/video-form.tsx
CHANGED
@@ -26,10 +26,9 @@ export const VideoForm = () => {
|
|
26 |
</div>
|
27 |
<div className="flex flex-col w-1/2 text-center">
|
28 |
<p className="text-md font-thin">
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
This page has a unique URL, keep <a href={`/studio/${ownerId}`} className="font-normal" target="_blank">the link</a> to share videos!
|
33 |
</p>
|
34 |
</div>
|
35 |
</div>
|
|
|
26 |
</div>
|
27 |
<div className="flex flex-col w-1/2 text-center">
|
28 |
<p className="text-md font-thin">
|
29 |
+
Video generation use shared resources, so please use responsibly. You can delete pending videos to accelerate other ones.
|
30 |
+
You have been assigned this temporary unique URL ID: <a href={`/studio/${ownerId}`} className="font-normal" target="_blank">{ownerId}</a>
|
31 |
+
|
|
|
32 |
</p>
|
33 |
</div>
|
34 |
</div>
|
src/components/business/videos/columns.tsx
CHANGED
@@ -57,8 +57,20 @@ export const columns: ColumnDef<Video>[] = [
|
|
57 |
header: ({ column }) => (
|
58 |
<DataTableColumnHeader column={column} title="Progress" />
|
59 |
),
|
60 |
-
cell: ({ row: { original: { progressPercent }} }) => (
|
61 |
-
<div className="flex items-center"><span>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
),
|
63 |
enableSorting: false,
|
64 |
},
|
@@ -111,10 +123,21 @@ export const columns: ColumnDef<Video>[] = [
|
|
111 |
enableSorting: false,
|
112 |
enableHiding: false,
|
113 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
{
|
115 |
id: "delete",
|
116 |
header: ({ column }) => null, // no header
|
117 |
-
cell: ({ row: { original } }) =>
|
118 |
<ChangeStatusButton video={original} status="delete">Delete</ChangeStatusButton>,
|
119 |
enableSorting: false,
|
120 |
enableHiding: false,
|
|
|
57 |
header: ({ column }) => (
|
58 |
<DataTableColumnHeader column={column} title="Progress" />
|
59 |
),
|
60 |
+
cell: ({ row: { original: { progressPercent, status }} }) => (
|
61 |
+
<div className="flex items-center"><span>{
|
62 |
+
status === "pending"
|
63 |
+
? `${Number(progressPercent || 0)}%}`
|
64 |
+
: status === "completed"
|
65 |
+
? "done"
|
66 |
+
: status === "abort"
|
67 |
+
? "N.A."
|
68 |
+
: status === "delete"
|
69 |
+
? "N.A."
|
70 |
+
: status === "pause"
|
71 |
+
? "paused"
|
72 |
+
: "N.A."
|
73 |
+
}</span></div>
|
74 |
),
|
75 |
enableSorting: false,
|
76 |
},
|
|
|
123 |
enableSorting: false,
|
124 |
enableHiding: false,
|
125 |
},
|
126 |
+
{
|
127 |
+
id: "status",
|
128 |
+
header: ({ column }) => null, // no header
|
129 |
+
cell: ({ row: { original, original: { status } } }) =>
|
130 |
+
status === "pending" ? <ChangeStatusButton video={original} status="pause">Pause</ChangeStatusButton> :
|
131 |
+
status === "pause" ? <ChangeStatusButton video={original} status="pending">Continue</ChangeStatusButton> :
|
132 |
+
null,
|
133 |
+
enableSorting: false,
|
134 |
+
enableHiding: false,
|
135 |
+
},
|
136 |
+
|
137 |
{
|
138 |
id: "delete",
|
139 |
header: ({ column }) => null, // no header
|
140 |
+
cell: ({ row: { original, original: { status } } }) =>
|
141 |
<ChangeStatusButton video={original} status="delete">Delete</ChangeStatusButton>,
|
142 |
enableSorting: false,
|
143 |
enableHiding: false,
|