diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-11-05 14:46:09 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-11-05 14:46:09 +0300 |
commit | 5eb7b205b3aed1f1e6fd5bbec41c947df46d4f39 (patch) | |
tree | 89b62bd7485689e6f226677e34c3ca22e7e41804 /src/components | |
parent | b6a2f9c87d4b46476f5a343d9bec252886a3d34f (diff) |
Move to @nextcloud packages
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/CollisionResolveDialog.vue | 2 | ||||
-rw-r--r-- | src/components/EditorWrapper.vue | 42 | ||||
-rw-r--r-- | src/components/FilesEditor.vue | 16 | ||||
-rw-r--r-- | src/components/GuestNameDialog.vue | 18 | ||||
-rw-r--r-- | src/components/MenuBar.vue | 24 | ||||
-rw-r--r-- | src/components/MenuBubble.vue | 14 | ||||
-rw-r--r-- | src/components/PublicFilesEditor.vue | 20 | ||||
-rw-r--r-- | src/components/ReadOnlyEditor.vue | 12 | ||||
-rw-r--r-- | src/components/SessionList.vue | 22 |
9 files changed, 85 insertions, 85 deletions
diff --git a/src/components/CollisionResolveDialog.vue b/src/components/CollisionResolveDialog.vue index b78aded8a..bcdfe55e9 100644 --- a/src/components/CollisionResolveDialog.vue +++ b/src/components/CollisionResolveDialog.vue @@ -33,7 +33,7 @@ <script> export default { - name: 'CollisionResolveDialog' + name: 'CollisionResolveDialog', } </script> diff --git a/src/components/EditorWrapper.vue b/src/components/EditorWrapper.vue index f1ab885ff..9186fc500 100644 --- a/src/components/EditorWrapper.vue +++ b/src/components/EditorWrapper.vue @@ -89,34 +89,34 @@ export default { ReadOnlyEditor: () => import(/* webpackChunkName: "editor" */'./ReadOnlyEditor'), CollisionResolveDialog: () => import(/* webpackChunkName: "editor" */'./CollisionResolveDialog'), GuestNameDialog: () => import(/* webpackChunkName: "editor-guest" */'./GuestNameDialog'), - SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList') + SessionList: () => import(/* webpackChunkName: "editor-collab" */'./SessionList'), }, directives: { - Tooltip + Tooltip, }, mixins: [ - isMobile + isMobile, ], props: { relativePath: { type: String, - default: null + default: null, }, fileId: { type: Number, - default: null + default: null, }, active: { type: Boolean, - default: false + default: false, }, autofocus: { type: Boolean, - default: true + default: true, }, shareToken: { type: String, - default: null + default: null, }, mime: { type: String, @@ -147,7 +147,7 @@ export default { readOnly: true, forceRecreate: false, - saveStatusPolling: null + saveStatusPolling: null, } }, computed: { @@ -202,12 +202,12 @@ export default { }, fileExtension() { return this.relativePath ? this.relativePath.split('/').pop().split('.').pop() : 'txt' - } + }, }, watch: { lastSavedStatus: function() { this.$refs.menubar && this.$refs.menubar.redrawMenuBar() - } + }, }, mounted() { if (this.active && (this.hasDocumentParameters)) { @@ -260,7 +260,7 @@ export default { console.debug('serialized document', { file }) return file - } + }, }) .on('opened', ({ document, session }) => { this.currentSession = session @@ -304,17 +304,17 @@ export default { if (this.syncService) { this.syncService.sendSteps() } - } + }, }), new Keymap({ 'Ctrl-s': () => { this.syncService.save() return true - } - }) + }, + }), ], enableRichEditing: this.isRichEditor, - languages + languages, }) this.syncService.state = this.tiptap.state }) @@ -324,7 +324,7 @@ export default { try { this.tiptap.extensions.options.collaboration.update({ version: document.currentVersion, - steps: steps + steps: steps, }) this.syncService.state = this.tiptap.state this.updateLastSavedStatus() @@ -340,7 +340,7 @@ export default { this.initialLoading = true this.syncError = { type: error, - data: data + data: data, } } if (error === ERROR_TYPE.CONNECTION_FAILED && !this.hasConnectionIssue) { @@ -369,7 +369,7 @@ export default { }) this.syncService.open({ fileId: this.fileId, - filePath: this.relativePath + filePath: this.relativePath, }).catch((e) => { this.hasConnectionIssue = true }) @@ -435,8 +435,8 @@ export default { event.stopPropagation() return true } - } - } + }, + }, } </script> diff --git a/src/components/FilesEditor.vue b/src/components/FilesEditor.vue index 7e301de15..28c3df2b7 100644 --- a/src/components/FilesEditor.vue +++ b/src/components/FilesEditor.vue @@ -32,35 +32,35 @@ export default { name: 'FilesEditor', components: { - EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper') + EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper'), }, props: { davPath: { type: String, - default: null + default: null, }, fileId: { type: Number, - default: null + default: null, }, active: { type: Boolean, - default: false + default: false, }, shareToken: { type: String, - default: null + default: null, }, mime: { type: String, - default: null - } + default: null, + }, }, beforeMount() { // FIXME Dirty fix to avoid recreating the component on stable16 if (typeof this.$parent.$parent !== 'undefined' && this.$parent.$parent.onResize) { window.removeEventListener('resize', this.$parent.$parent.onResize) } - } + }, } </script> diff --git a/src/components/GuestNameDialog.vue b/src/components/GuestNameDialog.vue index 92525c3cb..ccd40a1c2 100644 --- a/src/components/GuestNameDialog.vue +++ b/src/components/GuestNameDialog.vue @@ -35,21 +35,21 @@ import Avatar from 'nextcloud-vue/dist/Components/Avatar' export default { name: 'GuestNameDialog', components: { - Avatar + Avatar, }, directives: { - tooltip: Tooltip + tooltip: Tooltip, }, props: { syncService: { type: Object, - default: null - } + default: null, + }, }, data() { return { guestName: '', - guestNameBuffered: '' + guestNameBuffered: '', } }, computed: { @@ -59,10 +59,10 @@ export default { '/avatar/guest/{user}/{size}', { user: this.guestNameBuffered, - size: size + size: size, }) return window.location.protocol + '//' + window.location.host + avatarUrl - } + }, }, beforeMount() { this.guestName = this.syncService.session.guestName @@ -80,8 +80,8 @@ export default { }, updateBufferedGuestName() { this.guestNameBuffered = this.guestName - } - } + }, + }, } </script> diff --git a/src/components/MenuBar.vue b/src/components/MenuBar.vue index b848988e0..d6b6255a9 100644 --- a/src/components/MenuBar.vue +++ b/src/components/MenuBar.vue @@ -88,17 +88,17 @@ export default { EditorMenuBar, ActionButton, PopoverMenu, - Actions + Actions, }, directives: { Tooltip, - ClickOutside + ClickOutside, }, props: { editor: { type: Object, required: false, - default: null + default: null, }, isRichEditor: { type: Boolean, @@ -115,7 +115,7 @@ export default { windowHeight: 0, forceRecompute: 0, submenuVisibility: {}, - icons: [...menuBarIcons] + icons: [...menuBarIcons], } }, computed: { @@ -128,7 +128,7 @@ export default { getIconClasses() { return (isActive, icon) => { const classes = { - 'is-active': icon.isActive(isActive) + 'is-active': icon.isActive(isActive), } classes[icon.class] = true return classes @@ -150,7 +150,7 @@ export default { }, action: (commands) => { this.showImagePrompt(commands.image) - } + }, }] }, childPopoverMenu() { @@ -164,7 +164,7 @@ export default { icons[index].action(commands) this.hideChildMenu(parent) }, - active: icons[index].isActive(isActive) + active: icons[index].isActive(isActive), }) } return popoverMenuItems @@ -187,7 +187,7 @@ export default { const menuBarWidth = this.$refs.menubar && this.$refs.menubar.clientWidth > 100 ? this.$refs.menubar.clientWidth : this.windowWidth - 200 const iconCount = Math.max((Math.floor(menuBarWidth / 44) - 2), 0) return iconCount - } + }, }, beforeMount() { this.redrawMenuBar() @@ -238,7 +238,7 @@ export default { const appendMeta = { mimetype: fileInfo.mimetype, hasPreview: fileInfo.hasPreview, - fileId: fileInfo.id + fileId: fileInfo.id, } const src = (fileInfo.hasPreview ? previewUrl : internalLink) + '#' @@ -246,12 +246,12 @@ export default { _command({ src: src, - alt: fileInfo.name + alt: fileInfo.name, }) }) }, false, [], true) - } - } + }, + }, } </script> diff --git a/src/components/MenuBubble.vue b/src/components/MenuBubble.vue index 3e421ef73..aa250eac2 100644 --- a/src/components/MenuBubble.vue +++ b/src/components/MenuBubble.vue @@ -56,22 +56,22 @@ import Tooltip from 'nextcloud-vue/dist/Directives/Tooltip' export default { name: 'MenuBubble', components: { - EditorMenuBubble + EditorMenuBubble, }, directives: { - tooltip: Tooltip + tooltip: Tooltip, }, props: { editor: { type: Object, required: false, - default: null - } + default: null, + }, }, data: () => { return { linkUrl: null, - linkMenuIsActive: false + linkMenuIsActive: false, } }, methods: { @@ -93,8 +93,8 @@ export default { } command({ href: url }) this.hideLinkMenu() - } - } + }, + }, } </script> diff --git a/src/components/PublicFilesEditor.vue b/src/components/PublicFilesEditor.vue index b2e4a0b27..829879f69 100644 --- a/src/components/PublicFilesEditor.vue +++ b/src/components/PublicFilesEditor.vue @@ -37,39 +37,39 @@ export default { name: 'PublicFilesEditor', components: { Modal, - EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper') + EditorWrapper: () => import(/* webpackChunkName: "editor" */'./EditorWrapper'), }, props: { fileId: { type: Number, - default: null + default: null, }, relativePath: { type: String, - default: null + default: null, }, active: { type: Boolean, - default: false + default: false, }, shareToken: { type: String, - default: null + default: null, }, mimeType: { type: String, - default: null - } + default: null, + }, }, computed: { fileName() { return this.relativePath.substring(this.relativePath.lastIndexOf('/') + 1) - } + }, }, methods: { close() { this.active = false - } - } + }, + }, } </script> diff --git a/src/components/ReadOnlyEditor.vue b/src/components/ReadOnlyEditor.vue index 4273f79a7..3bd967e2f 100644 --- a/src/components/ReadOnlyEditor.vue +++ b/src/components/ReadOnlyEditor.vue @@ -35,28 +35,28 @@ export default { props: { content: { type: String, - required: true + required: true, }, isRichEditor: { type: Boolean, - default: true - } + default: true, + }, }, data: () => { return { - editor: null + editor: null, } }, mounted() { this.editor = createEditor({ content: this.isRichEditor ? markdownit.render(this.content) : '<pre>' + escapeHtml(this.content) + '</pre>', - enableRichEditing: this.isRichEditor + enableRichEditing: this.isRichEditor, }) this.editor.setOptions({ editable: false }) }, beforeDestroy() { this.editor.destroy() - } + }, } </script> diff --git a/src/components/SessionList.vue b/src/components/SessionList.vue index 67ca08d8a..d6210a4ab 100644 --- a/src/components/SessionList.vue +++ b/src/components/SessionList.vue @@ -50,21 +50,21 @@ export default { name: 'SessionList', components: { Avatar, - PopoverMenu + PopoverMenu, }, directives: { - tooltip: Tooltip + tooltip: Tooltip, }, props: { sessions: { type: Object, - default: () => { return {} } - } + default: () => { return {} }, + }, }, data() { return { popoverVisible: '', - myName: '' + myName: '', } }, computed: { @@ -85,7 +85,7 @@ export default { guest ? '/avatar/guest/{user}/{size}' : '/avatar/{user}/{size}', { user: user, - size: size + size: size, }) return window.location.protocol + '//' + window.location.host + avatarUrl } @@ -97,7 +97,7 @@ export default { sessionStyle() { return (session) => { return { - 'opacity': session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5 + 'opacity': session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5, // 'border-color': session.color } } @@ -111,14 +111,14 @@ export default { return { href: '#', icon: this.avatarUrl(session), - text: session.guestName ? session.guestName : session.displayName + text: session.guestName ? session.guestName : session.displayName, } - }) + }), ] - } + }, }, methods: { - } + }, } </script> |