<script setup lang="ts">
import { onMounted, ref } from "vue";
import { fetchText } from "@/api";
import PageHeader from "@/components/common/PageHeader.vue";

const help = ref("加载中");
onMounted(async () => {
  const response = await fetchText("/help.md", { timeoutMs: 8000 });
  help.value = response.ok ? response.data ?? "" : response.error ?? "帮助内容加载失败";
});
</script>

<template>
  <section class="route-stack">
    <PageHeader eyebrow="System" title="帮助" />
    <pre class="help-body">{{ help }}</pre>
  </section>
</template>
