aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/components/ExternalShareAction.vue
blob: c2c86cc86793ee98a00f49142c3c3c4e4d7ec001 (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
<!--
  - SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  - SPDX-License-Identifier: AGPL-3.0-or-later
-->

<template>
	<Component :is="data.is"
		v-bind="data"
		v-on="action.handlers">
		{{ data.text }}
	</Component>
</template>

<script>
import Share from '../models/Share.ts'

export default {
	name: 'ExternalShareAction',

	props: {
		id: {
			type: String,
			required: true,
		},
		action: {
			type: Object,
			default: () => ({}),
		},
		fileInfo: {
			type: Object,
			default: () => {},
			required: true,
		},
		share: {
			type: Share,
			default: null,
		},
	},

	computed: {
		data() {
			return this.action.data(this)
		},
	},
}
</script>