summaryrefslogtreecommitdiff
path: root/src/client/app/common/views/pages/featured.vue
blob: c00361aa854159df7a0e8681e9ab2980022318a9 (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
43
44
45
46
47
48
<template>
<div>
	<component :is="notesComponent" :pagination="pagination"/>
</div>
</template>

<script lang="ts">
import Vue from 'vue';
import { faNewspaper } from '@fortawesome/free-solid-svg-icons';
import i18n from '../../../i18n';
//import Progress from '../../../common/scripts/loading';

export default Vue.extend({
	i18n: i18n(),

	props: {
		platform: {
			type: String,
			required: true
		}
	},

	data() {
		return {
			pagination: {
				endpoint: 'notes/featured',
				limit: 29,
			},

			notesComponent:
				this.platform === 'desktop' ? () => import('../../../desktop/views/components/detail-notes.vue').then(m => m.default) :
				this.platform === 'mobile' ? () => import('../../../mobile/views/components/detail-notes.vue').then(m => m.default) :
				this.platform === 'deck' ? () => import('../deck/deck.notes.vue').then(m => m.default) : null
		};
	},

	created() {
		this.$emit('init', {
			title: this.$t('@.featured-notes'),
			icon: faNewspaper
		});
	},

	mounted() {
		document.title = this.$root.instanceName;
	},
});
</script>