Skip to content

Commit

Permalink
feat: only show the rich workspace area if a file is present
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Trovic <[email protected]>
  • Loading branch information
luka-nextcloud committed Oct 20, 2022
1 parent be1c579 commit a773ba6
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/views/RichWorkspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@

<template>
<div v-if="enabled" id="rich-workspace" :class="{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate, 'empty': showEmptyWorkspace}">
<a v-if="showEmptyWorkspace"
tabindex="0"
class="empty-workspace"
@keyup.enter="createNew"
@keyup.space="createNew"
@click="createNew">
<p class="placeholder">
{{ t('text', 'Add notes, lists or links …') }}
</p>
</a>

<Editor v-if="file"
v-show="ready"
Expand Down Expand Up @@ -93,7 +83,7 @@ export default {
return !!(this.folder && (this.folder.permissions & OC.PERMISSION_CREATE))
},
showEmptyWorkspace() {
return (!this.file || (this.autofocus && !this.ready)) && this.canCreate
return (this.file || (this.autofocus && !this.ready)) && this.canCreate
},
},
watch: {
Expand Down

0 comments on commit a773ba6

Please sign in to comment.