summaryrefslogtreecommitdiff
path: root/src/client/pages/docs.vue
blob: a880e8abe44d6935b239cb994fe8aa8a9ec6c732 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
<div>
	<portal to="icon"><fa :icon="faQuestionCircle"/></portal>
	<portal to="title">{{ $t('help') }}</portal>
	<main class="_card">
		<div class="_content">
			<ul>
				<li v-for="doc in docs" :key="doc.path">
					<router-link :to="`/docs/${doc.path}`">{{ doc.title }}</router-link>
				</li>
			</ul>
		</div>
	</main>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import { faQuestionCircle } from '@fortawesome/free-solid-svg-icons'
import { url, lang } from '../config';

export default Vue.extend({
	metaInfo() {
		return {
			title: this.$t('help') as string,
		};
	},

	data() {
		return {
			docs: [],
			faQuestionCircle
		}
	},

	created() {
		fetch(`${url}/docs.json?lang=${lang}`).then(res => res.json()).then(docs => {
			this.docs = docs;
		});
	},
});
</script>