Skip to content

Commit 705ea7b

Browse files
committed
Dot show empty workspace container if files are not creatable
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 parent 9701035 commit 705ea7b

9 files changed

Lines changed: 20 additions & 18 deletions

File tree

js/editor-rich.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/editor-rich.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/files.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/public.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/public.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/text.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/text.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/views/RichWorkspace.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-->
2222

2323
<template>
24-
<div v-if="enabled" id="rich-workspace" :class="{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme }">
24+
<div v-if="enabled" id="rich-workspace" :class="{'icon-loading': !loaded || !ready, 'focus': focus, 'dark': darkTheme, 'creatable': canCreate}">
2525
<div v-if="showEmptyWorkspace" class="empty-workspace" @click="createNew">
2626
<p class="placeholder">
2727
{{ t('text', 'Add notes, lists or links …') }}
@@ -158,15 +158,17 @@ export default {
158158
}
159159
</script>
160160

161-
<style scoped>
161+
<style lang="scss" scoped>
162162
#rich-workspace {
163163
padding: 0 60px;
164-
min-height: 90px;
165164
/* Slightly reduce vertical space */
166165
margin-bottom: -24px;
167166
text-align: left;
168167
max-height: 0;
169168
transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
169+
&.creatable {
170+
min-height: 90px;
171+
}
170172
}
171173
172174
/* For subfolders, where there are no Recommendations */

0 commit comments

Comments
 (0)