diff --git a/packages/web-app-draw-io/src/index.js b/packages/web-app-draw-io/src/index.js index 32f90039321..99a7350841d 100644 --- a/packages/web-app-draw-io/src/index.js +++ b/packages/web-app-draw-io/src/index.js @@ -24,7 +24,7 @@ const appInfo = { routeName: 'draw-io', newFileMenu: { menuTitle($gettext) { - return $gettext('New draw.io document…') + return $gettext('New draw.io document') } } }, diff --git a/packages/web-app-files/src/components/AppBar/AppBar.vue b/packages/web-app-files/src/components/AppBar/AppBar.vue index 8ebf1f4c36e..ce91d846e94 100644 --- a/packages/web-app-files/src/components/AppBar/AppBar.vue +++ b/packages/web-app-files/src/components/AppBar/AppBar.vue @@ -30,30 +30,112 @@
@@ -195,12 +231,15 @@ export default { } return mimeTypes.filter((mimetype) => mimetype.allow_creation) || [] }, + createFileActionsAvailable() { + return this.newFileHandlersForRoute.length > 0 || this.mimetypesAllowedForCreation.length > 0 + }, newButtonTooltip() { if (!this.canUpload) { - return this.$gettext('You have no permission to upload!') + return this.$gettext('You have no permission to create new files!') } if (!this.hasFreeSpace) { - return this.$gettext('You have not enough space left to upload!') + return this.$gettext('You have not enough space left to create new files!') } return null }, @@ -209,7 +248,23 @@ export default { if (tooltip) { return tooltip } - return this.$gettext('Add files or folders') + return this.$gettext('Create new files or folders') + }, + uploadButtonTooltip() { + if (!this.canUpload) { + return this.$gettext('You have no permission to upload!') + } + if (!this.hasFreeSpace) { + return this.$gettext('You have not enough space left to upload!') + } + return null + }, + uploadButtonAriaLabel() { + const tooltip = this.uploadButtonTooltip + if (tooltip) { + return tooltip + } + return this.$gettext('Upload files or folders') }, currentPath() { @@ -331,7 +386,7 @@ export default { return this.selectedFiles.length < 1 }, - isNewBtnDisabled() { + uploadOrFileCreationBlocked() { return !this.canUpload || !this.hasFreeSpace }, @@ -402,6 +457,7 @@ export default { ? this.checkNewFolderName(defaultName) : this.checkNewFileName(defaultName), onCancel: this.hideModal, + // what happens below looks wrong, I don't get it onConfirm: isFolder ? this.addNewFolder : addAppProviderFile @@ -727,6 +783,14 @@ export default {