feat: add new about page

This commit is contained in:
Prayag Prajapati committed 2025-07-06 21:11:43 +05:30
1 parent a8ee9c190c
commit 333fe09f45
9 files changed
+238 -48

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import type { Api } from "@jellyfin/sdk";
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api";
import { queryOptions } from "@tanstack/react-query";
import { check } from "@tauri-apps/plugin-updater";
export const getSystemInfoQueryOptions = (api: Api | null | undefined) =>
queryOptions({
queryKey: ["about", "serverInfo"],
queryFn: async () => {
if (!api) {
throw Error("API is not defined");
}
const result = await getSystemApi(api).getSystemInfo();
return result.data;
},
});
export const getUpdateQueryOptions = queryOptions({
queryKey: ["about", "checkForUpdates"],
queryFn: async () => await check(),
});