<div class="navbar-menu">
<div class="navbar-start">
+ <RouterLink to="/packages" class="navbar-item">
+ {{ $t("Packages") }}
+ </RouterLink>
+
<RouterLink to="/builders" class="navbar-item">
{{ $t("Builders") }}
</RouterLink>
--- /dev/null
+import api from "@/api"
+
+export interface Package {
+ // Name
+ name: string;
+
+ // Summary
+ summary: string;
+}
+
+// Fetch all packages
+export async function fetchPackages(): Promise<Package[]> {
+ const response = await api.get("/v1/packages")
+ return response.data;
+}
import BuildersView from "../views/BuildersView.vue"
import MirrorsView from "../views/MirrorsView.vue"
import NotFoundView from "../views/NotFoundView.vue"
+import PackagesView from "../views/PackagesView.vue"
const router = createRouter({
history: createWebHistory(import.meta.env.BASE_URL),
component: MirrorsView,
},
+ // Packages
+ {
+ path: "/packages",
+ name: "packages",
+ component: PackagesView,
+ },
+
// 404 - Not Found
{
path: "/:pathMatch(.*)*",
--- /dev/null
+<script setup lang="ts">
+ import { onMounted, ref } from "vue";
+
+ // API
+ import type { Package } from "@/api/packages";
+ import { fetchPackages } from "@/api/packages";
+
+ // Components
+ import Section from "@/components/Section.vue";
+
+ // Create a list with all packages
+ const packages = ref<Package[]>([]);
+
+ // Fetch all packages on load
+ onMounted(async () => {
+ packages.value = await fetchPackages();
+ });
+</script>
+
+<template>
+ <Section :title="$t('Packages')">
+ <table class="table is-fullwidth">
+ <tbody>
+ <tr v-for="pkg in packages">
+ <th scope="row">
+ <a href="/packages/{{ pkg.name }}">
+ {{ pkg.name }}
+ </a>
+ </th>
+
+ <td>
+ {{ pkg.summary }}
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </Section>
+</template>