api proxy & file listing

This commit is contained in:
grngxd 2025-06-08 00:32:15 +01:00
parent 5cc652b0af
commit db68058d5b
5 changed files with 96 additions and 35 deletions

View 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
View 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>
)
})