Skip to content

Commit 0c01399

Browse files
committed
fix(menu): exclude "New text file" from create file menu options
Signed-off-by: Jonas <jonas@freesources.org>
1 parent b75b6f9 commit 0c01399

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/Menu/ActionAttachmentUpload.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ export default {
120120
if (!templates.length) {
121121
templates = loadState('files', 'templates', [])
122122
}
123-
return templates
123+
return (
124+
templates
125+
// Exclude "New text file" as it doesn't make much sense from a text file
126+
.filter((t) => !(t.app === 'text' && t.extension === '.md'))
127+
)
124128
},
125129
isUploadDisabled() {
126130
return !this.openData?.hasOwner || !this.networkOnline

0 commit comments

Comments
 (0)