remade frontend

This commit is contained in:
Fishandchips321 2026-02-22 18:44:44 +00:00
parent 02281120dc
commit 36d99b1e35
45 changed files with 1290 additions and 4979 deletions

View file

@ -0,0 +1,32 @@
import type { Server } from "./Servers";
export interface SearchResult {
name: string;
id: string;
serverId: string;
type: SearchResultType;
episodes: number;
}
export type SearchResultType = "movie" | "tv show" | "music";
export const search = async (searchTerm: string, serverId: string): Promise<Array<SearchResult>> => {
return [{
name: "Test Result",
episodes: 0,
id: "awawa",
serverId: serverId,
type: "movie"
},
{
name: "Test result 2",
episodes: 0,
id: "awawa 2",
serverId: serverId,
type: "movie"
}];
}
export const getUrlForSearchResult = (result: SearchResult, server: Server): string => {
return `${server.url}/web/#/details?id=${result.id}`;
}

View file

@ -0,0 +1,25 @@
export interface Server {
name: string;
id: string;
online?: boolean;
owner: string;
url: string;
}
export const getServerList = async (): Promise<Array<Server>> => {
return [{
id: "asdf",
name: "test server",
owner: "meeeee",
url: "https://jellyfin.foxhawk.co.uk",
online: true
},
{
id: "qwer",
name: "test server 2",
owner: "someone else",
url: "https://jellyfin.foxhawk.co.uk",
online: true
}];
}