1- import { JWTPayloadSpec } from "@elysiajs/jwt" ;
21import { Elysia } from "elysia" ;
32import { BaseHtml } from "../components/base" ;
43import { Header } from "../components/header" ;
@@ -11,14 +10,10 @@ import { EyeIcon } from "../icons/eye";
1110import { userService } from "./user" ;
1211
1312function ResultsArticle ( {
14- user,
1513 job,
1614 files,
1715 outputPath,
1816} : {
19- user : {
20- id : string ;
21- } & JWTPayloadSpec ;
2217 job : Jobs ;
2318 files : Filename [ ] ;
2419 outputPath : string ;
@@ -30,24 +25,24 @@ function ResultsArticle({
3025 < div class = "flex flex-row gap-4" >
3126 < a
3227 style = { files . length !== job . num_files ? "pointer-events: none;" : "" }
33- href = { `${ WEBROOT } /archive/${ user . id } /${ job . id } ` }
34- download = { `converted_files_${ job . id } .tar` }
35- class = "flex btn-primary flex-row gap-2 text-contrast"
28+ class = "flex btn-secondary flex-row gap-2 text-contrast"
29+ href = { `${ WEBROOT } /delete/${ job . id } ` }
3630 { ...( files . length !== job . num_files ? { disabled : true , "aria-busy" : "true" } : "" ) }
3731 >
38- < DownloadIcon /> < p > Tar </ p >
32+ < DeleteIcon /> < p > Delete </ p >
3933 </ a >
40- < button class = "flex btn-primary flex-row gap-2 text-contrast" onclick = "downloadAll()" >
41- < DownloadIcon /> < p > All</ p >
42- </ button >
4334 < a
4435 style = { files . length !== job . num_files ? "pointer-events: none;" : "" }
36+ href = { `${ WEBROOT } /archive/${ job . id } ` }
37+ download = { `converted_files_${ job . id } .tar` }
4538 class = "flex btn-primary flex-row gap-2 text-contrast"
46- href = { `${ WEBROOT } /delete/${ user . id } /${ job . id } ` }
4739 { ...( files . length !== job . num_files ? { disabled : true , "aria-busy" : "true" } : "" ) }
4840 >
49- < DeleteIcon /> < p > Delete </ p >
41+ < DownloadIcon /> < p > Tar </ p >
5042 </ a >
43+ < button class = "flex btn-primary flex-row gap-2 text-contrast" onclick = "downloadAll()" >
44+ < DownloadIcon /> < p > All</ p >
45+ </ button >
5146 </ div >
5247 </ div >
5348 < progress
@@ -172,7 +167,7 @@ export const results = new Elysia()
172167 sm:px-4
173168 ` }
174169 >
175- < ResultsArticle user = { user } job = { job } files = { files } outputPath = { outputPath } />
170+ < ResultsArticle job = { job } files = { files } outputPath = { outputPath } />
176171 </ main >
177172 < script src = { `${ WEBROOT } /results.js` } defer />
178173 </ >
@@ -208,7 +203,7 @@ export const results = new Elysia()
208203 . as ( Filename )
209204 . all ( params . jobId ) ;
210205
211- return < ResultsArticle user = { user } job = { job } files = { files } outputPath = { outputPath } /> ;
206+ return < ResultsArticle job = { job } files = { files } outputPath = { outputPath } /> ;
212207 } ,
213208 { auth : true } ,
214209 ) ;
0 commit comments