mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-28 07:55:54 +00:00
Add Version Tag to frontend
This commit is contained in:
@@ -8,3 +8,11 @@ export const fetchCategories = async () => {
|
||||
const categories: Category[] = await response.json();
|
||||
return categories;
|
||||
};
|
||||
|
||||
export const fetchVersions = async (slug: string) => {
|
||||
const response = await fetch(`api/versions?slug=${slug}`);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch versions: ${response.statusText}`);
|
||||
}
|
||||
return response.json();
|
||||
};
|
||||
|
||||
@@ -13,6 +13,7 @@ export type Script = {
|
||||
website: string | null;
|
||||
logo: string | null;
|
||||
description: string;
|
||||
version: string;
|
||||
install_methods: {
|
||||
type: "default" | "alpine";
|
||||
script: string;
|
||||
@@ -47,6 +48,11 @@ export type Metadata = {
|
||||
categories: Category[];
|
||||
};
|
||||
|
||||
export interface AppVersion {
|
||||
name: string;
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface Version {
|
||||
name: string;
|
||||
slug: string;
|
||||
@@ -55,4 +61,4 @@ export interface Version {
|
||||
export interface OperatingSystem {
|
||||
name: string;
|
||||
versions: Version[];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user