diff options
author | Grigorii Shartsev <grigorii.shartsev@nextcloud.com> | 2023-05-03 17:59:25 +0200 |
---|---|---|
committer | Grigorii Shartsev <grigorii.shartsev@nextcloud.com> | 2023-05-03 19:42:55 +0200 |
commit | c9a8dfe0363feea8612f01f65a5692386b2d4a5d (patch) | |
tree | daf53def165593e1edabf1c59750ef0c67d40b9d /src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | |
parent | 4890b3a6f79eb41b2f822999565fd60dd608af51 (diff) |
refactor(frontend): make openViewer and isInCall mixins composables
Signed-off-by: Grigorii Shartsev <grigorii.shartsev@nextcloud.com>
Diffstat (limited to 'src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue')
-rw-r--r-- | src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue index 11f9cdea0..b0b8a2218 100644 --- a/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue +++ b/src/components/MessagesList/MessagesGroup/Message/MessagePart/FilePreview.vue @@ -84,7 +84,7 @@ import Tooltip from '@nextcloud/vue/dist/Directives/Tooltip.js' import AudioPlayer from './AudioPlayer.vue' -import { openViewer } from '../../../../../mixins/openViewer.js' +import { useViewer } from '../../../../../composables/useViewer.js' const PREVIEW_TYPE = { TEMPORARY: 0, @@ -107,8 +107,6 @@ export default { tooltip: Tooltip, }, - mixins: [openViewer], - props: { /** * File id @@ -236,6 +234,12 @@ export default { default: false, }, }, + + setup() { + const { openViewer } = useViewer() + return { openViewer } + }, + data() { return { isLoading: true, |