-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4278 from nextcloud/fix/viewer-wrapper
fix: Apply viewer wrapper as we do it in text
- Loading branch information
Showing
4 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!-- | ||
- SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors | ||
- SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
<!-- | ||
- This component is a wrapper around the Office component to be used in the viewer | ||
- We currently need this to isolate the vue instances | ||
--> | ||
<template> | ||
<Office :filename="filename" | ||
:fileid="fileid" | ||
:has-preview="hasPreview" | ||
:source="source" | ||
:mime="mime" | ||
:permissions="permissions" | ||
:is-embedded="isEmbedded" | ||
@close="$parent.close()" | ||
@update:loaded="$emit('update:loaded', $event)" /> | ||
</template> | ||
<script> | ||
import Vue from 'vue' | ||
import Office from './Office.vue' | ||
|
||
Vue.prototype.t = t | ||
Vue.prototype.n = n | ||
|
||
export default { | ||
name: 'Viewer', | ||
components: { | ||
Office: Vue.extend(Office), | ||
}, | ||
props: { | ||
filename: { | ||
type: String, | ||
default: null, | ||
}, | ||
fileid: { | ||
type: Number, | ||
default: null, | ||
}, | ||
hasPreview: { | ||
type: Boolean, | ||
required: false, | ||
default: () => false, | ||
}, | ||
source: { | ||
type: String, | ||
default: null, | ||
}, | ||
mime: { | ||
type: String, | ||
default: null, | ||
}, | ||
permissions: { | ||
type: String, | ||
default: '', | ||
}, | ||
isEmbedded: { | ||
type: Boolean, | ||
default: false, | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters