aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/src/views/ExampleContentSettingsSection.vue
blob: 5e65a1ba3b44de6628aa1a75f47c79e50fe1e1ea (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
<!--
  - SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
  - SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
	<NcSettingsSection id="example-content"
		:name="$t('dav', 'Example content')"
		class="example-content-setting"
		:description="$t('dav', 'Example content serves to showcase the features of Nextcloud. Default content is shipped with Nextcloud, and can be replaced by custom content.')">
		<ExampleContactSettings v-if="hasContactsApp" />
		<ExampleEventSettings v-if="hasCalendarApp" />
	</NcSettingsSection>
</template>

<script>
import { loadState } from '@nextcloud/initial-state'
import { NcSettingsSection } from '@nextcloud/vue'
import ExampleEventSettings from '../components/ExampleEventSettings.vue'
import ExampleContactSettings from '../components/ExampleContactSettings.vue'

export default {
	name: 'ExampleContentSettingsSection',
	components: {
		NcSettingsSection,
		ExampleContactSettings,
		ExampleEventSettings,
	},
	computed: {
		hasContactsApp() {
			return loadState('dav', 'contactsEnabled')
		},
		hasCalendarApp() {
			return loadState('dav', 'calendarEnabled')
		},
	}
}
</script>