Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions js/editor-rich.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/editor-rich.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-files.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-files.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-public.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-public.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-text.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-text.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js/text-viewer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/text-viewer.js.map

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions src/helpers/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

import { subscribe } from '@nextcloud/event-bus'
import { openMimetypes } from './mime.js'
import RichWorkspace from '../views/RichWorkspace.vue'
import { imagePath } from '@nextcloud/router'
Expand Down Expand Up @@ -170,6 +171,12 @@ const FilesWorkspacePlugin = {
store,
}).$mount(this.el)

subscribe('files:navigation:changed', () => {
// Expose if the default file list is active to the component
// to only render the workspace if the file list is actually visible
vm.active = OCA.Files.App.getCurrentFileList() === fileList
})

fileList.$el.on('urlChanged', data => {
vm.path = data.dir.toString()
})
Expand Down
6 changes: 5 additions & 1 deletion src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
-->

<template>
<div v-if="enabled" id="rich-workspace" :class="{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}">
<div v-if="enabled && active" id="rich-workspace" :class="{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}">
<div v-if="showEmptyWorkspace" class="empty-workspace" @click="createNew">
<p class="placeholder">
{{ t('text', 'Add notes, lists or links …') }}
Expand Down Expand Up @@ -63,6 +63,10 @@ export default {
type: String,
required: true,
},
active: {
type: Boolean,
default: true,
},
},
data() {
return {
Expand Down