api proxy & file listing
This commit is contained in:
parent
5cc652b0af
commit
db68058d5b
5 changed files with 96 additions and 35 deletions
10
src/components/Controlbar.tsx
Normal file
10
src/components/Controlbar.tsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import { component$ } from "@builder.io/qwik";
|
||||
|
||||
// TODO: add upload button and other stuff fr
|
||||
export default component$(() => {
|
||||
return (
|
||||
<div class="absolute bottom-4 left-1/2 transform -translate-x-1/2 bg-red-400 w-1/4 p-4 rounded-lg flex items-center justify-center">
|
||||
hi
|
||||
</div>
|
||||
)
|
||||
})
|
15
src/components/File.tsx
Normal file
15
src/components/File.tsx
Normal file
|
@ -0,0 +1,15 @@
|
|||
import { component$ } from "@builder.io/qwik";
|
||||
import { StereoFile } from "~/lib/types";
|
||||
|
||||
export default component$(({ file }: { file: StereoFile }) => {
|
||||
return (
|
||||
<div key={file.ID}>
|
||||
<h2>Owner: {file.Owner}</h2>
|
||||
<p>File ID: {file.ID}</p>
|
||||
<p>Created: {new Date(file.CreatedAt).toLocaleString()}</p>
|
||||
{ file.Base64 && (file.ID.endsWith(".png") || file.ID.endsWith(".jpg") || file.ID.endsWith(".jpeg")) && (
|
||||
<img src={`data:image/png;base64,${file.Base64}`} alt="Stereo File" class="w-full h-auto" />
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue