From ae6580bd8220f668788f1b214f904e0137aadd00 Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Tue, 1 Feb 2022 02:03:15 +0100 Subject: [PATCH 1/9] [main][renderer] add information about the task in the commands launched after export --- app/main/src/index.js | 2 +- .../src/components/modals/AddPreviewModal.vue | 47 +++++++++++++------ .../src/components/pages/Settings.vue | 29 ++++++++++++ app/renderer/src/components/pages/Task.vue | 2 + .../src/components/sides/TaskInfo.vue | 2 + app/renderer/src/locales/en.js | 9 +++- app/renderer/src/locales/fr.json | 9 +++- 7 files changed, 83 insertions(+), 17 deletions(-) diff --git a/app/main/src/index.js b/app/main/src/index.js index 48be236..1feac62 100644 --- a/app/main/src/index.js +++ b/app/main/src/index.js @@ -160,7 +160,7 @@ const createWindow = async () => { codePage = Number(stdout.split(':')[1]) } catch { codePage = undefined - } + } } }) } diff --git a/app/renderer/src/components/modals/AddPreviewModal.vue b/app/renderer/src/components/modals/AddPreviewModal.vue index c781ab0..cadbb9c 100644 --- a/app/renderer/src/components/modals/AddPreviewModal.vue +++ b/app/renderer/src/components/modals/AddPreviewModal.vue @@ -279,6 +279,10 @@ export default { extensions: { type: String, default: files.ALL_EXTENSIONS_STRING + }, + currentTask: { + type: Object, + default: null } }, @@ -374,21 +378,36 @@ export default { this.DCCsExportsDirectory ) ).then((data) => { + let variablesFormat = { + exportsDirectory: this.DCCsExportsDirectory, + exportFile: data.file, + exportIsAnimation: isAnimation, + exportIsScreenshot: !isAnimation, + DCCName: DCCClient.DCCName, + DCCVersion: DCCClient.DCCVersion, + currentProject: DCCClient.currentProject, + cameraSelected: DCCClient.cameraSelected, + rendererSelected: DCCClient.rendererSelected, + extensionSelected: isAnimation + ? DCCClient.videoExtensionSelected + : DCCClient.imageExtensionSelected + } + if (this.currentTask) { + variablesFormat = { + ...variablesFormat, + ...{ + entityName: this.currentTask.entity_name, + entityTypeName: this.currentTask.entity_type_name, + episodeName: this.currentTask.episode_name, + fullEntityName: this.currentTask.full_entity_name, + projectName: this.currentTask.project_name, + taskStatusName: this.currentTask.task_status_name, + taskTypeName: this.currentTask.task_type_name + } + } + } window.electron - .launchCommandBeforeExport(this.PostExportsCommand, { - exportsDirectory: this.DCCsExportsDirectory, - exportFile: data.file, - exportIsAnimation: isAnimation, - exportIsScreenshot: !isAnimation, - DCCName: DCCClient.DCCName, - DCCVersion: DCCClient.DCCVersion, - currentProject: DCCClient.currentProject, - cameraSelected: DCCClient.cameraSelected, - rendererSelected: DCCClient.rendererSelected, - extensionSelected: isAnimation - ? DCCClient.videoExtensionSelected - : DCCClient.imageExtensionSelected - }) + .launchCommandBeforeExport(this.PostExportsCommand, variablesFormat) .then((success, _) => { if (!success) { this.exportCommandOutput = null diff --git a/app/renderer/src/components/pages/Settings.vue b/app/renderer/src/components/pages/Settings.vue index 3e29a2c..2b5b2b2 100644 --- a/app/renderer/src/components/pages/Settings.vue +++ b/app/renderer/src/components/pages/Settings.vue @@ -109,6 +109,35 @@ ) }} +
  • + {{ $t('publishersettings.post_exports_command.entityName') }} +
  • +
  • + {{ + $t('publishersettings.post_exports_command.entityTypeName') + }} +
  • +
  • + {{ $t('publishersettings.post_exports_command.episodeName') }} +
  • +
  • + {{ + $t('publishersettings.post_exports_command.fullEntityName') + }} +
  • +
  • + {{ $t('publishersettings.post_exports_command.projectName') }} +
  • +
  • + {{ + $t('publishersettings.post_exports_command.taskStatusName') + }} +
  • +
  • + {{ + $t('publishersettings.post_exports_command.taskTypeName') + }} +
  • diff --git a/app/renderer/src/components/pages/Task.vue b/app/renderer/src/components/pages/Task.vue index 7eab050..a66085d 100644 --- a/app/renderer/src/components/pages/Task.vue +++ b/app/renderer/src/components/pages/Task.vue @@ -241,6 +241,7 @@ :is-loading="loading.addPreview" :is-error="errors.addPreview" :form-data="addPreviewFormData" + :current-task="currentTask" @cancel="modals.addPreview = false" @fileselected="selectFile" @confirm="closeAddPreviewModal" @@ -252,6 +253,7 @@ :is-loading="loading.addExtraPreview" :is-error="errors.addExtraPreview" :form-data="addExtraPreviewFormData" + :current-task="currentTask" @cancel="hideExtraPreviewModal" @fileselected="selectFile" @confirm="createExtraPreview" diff --git a/app/renderer/src/components/sides/TaskInfo.vue b/app/renderer/src/components/sides/TaskInfo.vue index db196e1..dbe63a7 100644 --- a/app/renderer/src/components/sides/TaskInfo.vue +++ b/app/renderer/src/components/sides/TaskInfo.vue @@ -179,6 +179,7 @@ :active="modals.addPreview" :is-loading="loading.addPreview" :is-error="errors.addPreview" + :current-task="task" @cancel="onClosePreview" @fileselected="selectFile" @confirm="onClosePreview" @@ -190,6 +191,7 @@ :is-loading="loading.addExtraPreview" :is-error="errors.addExtraPreview" :form-data="addExtraPreviewFormData" + :current-task="task" extensions=".png,.jpg,.jpeg" @cancel="onCloseExtraPreview" @fileselected="selectFile" diff --git a/app/renderer/src/locales/en.js b/app/renderer/src/locales/en.js index 42263e5..fcb7c68 100644 --- a/app/renderer/src/locales/en.js +++ b/app/renderer/src/locales/en.js @@ -764,7 +764,14 @@ export default { rendererSelected: 'rendererSelected (String) : the name of the renderer selected.', extensionSelected: - 'extensionSelected (String) : the name of the extension selected.' + 'extensionSelected (String) : the name of the extension selected.', + entityName: 'entityName (String) : the name of the entity.', + entityTypeName: 'entityTypeName (String) : the name of the entity type.', + episodeName: 'episodeName (String) : the name of the episode type.', + fullEntityName: 'fullEntityName (String) : the full name of the entity.', + projectName: 'projectName (String) : the name of the project.', + taskStatusName: 'taskStatusName (String) : the name of the task status.', + taskTypeName: 'taskTypeName (String) : the name of the task type.' }, save: { button: 'Save changes' diff --git a/app/renderer/src/locales/fr.json b/app/renderer/src/locales/fr.json index 361ab9f..d294c58 100644 --- a/app/renderer/src/locales/fr.json +++ b/app/renderer/src/locales/fr.json @@ -642,7 +642,14 @@ "currentProject": "currentProject (String) : le chemin du projet courant ouvert dans le DCC.", "cameraSelected": "cameraSelected (String) : le nom de la caméra selectionnée.", "rendererSelected": "rendererSelected (String) : le nom du moteur de rendu selectionné.", - "extensionSelected": "extensionSelected (String) : le nom de l'extension selectionnée." + "extensionSelected": "extensionSelected (String) : le nom de l'extension selectionnée.", + "entityName": "entityName (String) : le nom de l'entité.", + "entityTypeName": "entityTypeName (String) : le nom du type d'entité.", + "episodeName": "episodeName (String) : le nom de l'épisode.", + "fullEntityName": "fullEntityName (String) : le nom complet de l'entité.", + "projectName": "projectName (String) : le nom du projet.", + "taskStatusName": "taskStatusName (String) : le nom du statut de la tâche.", + "taskTypeName": "taskTypeName (String) : le nom du type de la tâche." }, "save": { "button": "Sauvegardez vos changements" From 4e789ed675a66a2d1c3304f419dc49042dacd5cd Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Tue, 1 Feb 2022 03:17:20 +0100 Subject: [PATCH 2/9] [qa] use only eslint not prettier --- .eslintrc.json | 5 +- .../src/components/cells/DescriptionCell.vue | 11 +- .../src/components/cells/LastCommentCell.vue | 5 +- .../src/components/cells/PeopleNameCell.vue | 15 ++- .../components/cells/ProductionNameCell.vue | 7 +- .../src/components/cells/TaskTypeName.vue | 5 +- .../src/components/cells/TimeSliderCell.vue | 14 +- .../src/components/cells/ValidationCell.vue | 22 ++- .../src/components/lists/EntityTaskList.vue | 10 +- .../src/components/lists/TaskList.vue | 127 ++++++++++++++---- .../src/components/lists/TimesheetList.vue | 40 ++++-- .../src/components/lists/TodosList.vue | 55 ++++++-- .../modals/AddCommentImageModal.vue | 47 +++++-- .../src/components/modals/AddPreviewModal.vue | 90 ++++++++++--- .../components/modals/ChangeAvatarModal.vue | 10 +- .../src/components/modals/DeleteModal.vue | 15 ++- .../src/components/modals/EditAssetModal.vue | 30 ++++- .../components/modals/EditCommentModal.vue | 10 +- .../components/modals/EditMilestoneModal.vue | 15 ++- .../modals/EditSearchFilterModal.vue | 5 +- .../src/components/modals/EditShotModal.vue | 15 ++- .../src/components/modals/ModalFooter.vue | 10 +- .../src/components/modals/ShortcutModal.vue | 12 +- app/renderer/src/components/pages/Asset.vue | 38 ++++-- app/renderer/src/components/pages/Login.vue | 37 +++-- app/renderer/src/components/pages/Person.vue | 35 ++++- app/renderer/src/components/pages/Profile.vue | 10 +- .../src/components/pages/ResetPassword.vue | 24 +++- .../src/components/pages/ServerDown.vue | 2 +- .../src/components/pages/Settings.vue | 15 ++- app/renderer/src/components/pages/Shot.vue | 32 ++++- app/renderer/src/components/pages/Task.vue | 51 +++++-- .../src/components/pages/TaskType.vue | 35 ++++- app/renderer/src/components/pages/Todos.vue | 9 +- .../pages/playlists/AnnotationBar.vue | 5 +- .../components/pages/schedule/Schedule.vue | 100 ++++++++++---- .../pages/tasktype/EstimationHelper.vue | 65 +++++++-- .../src/components/previews/BrowsingBar.vue | 5 +- .../src/components/previews/PictureViewer.vue | 14 +- .../src/components/previews/PreviewPlayer.vue | 85 +++++++++--- .../src/components/previews/PreviewViewer.vue | 10 +- .../components/previews/RevisionPreview.vue | 15 ++- .../src/components/previews/SoundViewer.vue | 10 +- .../src/components/previews/VideoViewer.vue | 15 ++- .../src/components/sides/TaskInfo.vue | 38 ++++-- .../src/components/spinners/Origami.vue | 10 +- .../src/components/spinners/SquareGrid.vue | 50 +++++-- app/renderer/src/components/tops/Topbar.vue | 75 ++++++++--- .../src/components/widgets/AddComment.vue | 22 ++- .../src/components/widgets/ButtonLink.vue | 11 +- .../src/components/widgets/ButtonSimple.vue | 6 +- .../src/components/widgets/Checklist.vue | 17 ++- .../src/components/widgets/ColorPicker.vue | 6 +- .../src/components/widgets/Combobox.vue | 10 +- .../src/components/widgets/ComboboxNumber.vue | 15 ++- .../src/components/widgets/ComboboxStatus.vue | 26 +++- .../src/components/widgets/Comment.vue | 47 +++++-- .../src/components/widgets/CommentMenu.vue | 21 ++- .../src/components/widgets/DateField.vue | 5 +- .../components/widgets/EntityThumbnail.vue | 4 +- .../src/components/widgets/FileUpload.vue | 17 ++- app/renderer/src/components/widgets/Icon.vue | 5 +- .../src/components/widgets/PencilPicker.vue | 11 +- .../src/components/widgets/PeopleAvatar.vue | 22 ++- .../src/components/widgets/PeopleName.vue | 5 +- .../src/components/widgets/PreviewRow.vue | 5 +- .../src/components/widgets/ProductionName.vue | 7 +- .../src/components/widgets/SearchField.vue | 33 ++++- .../components/widgets/SearchQueryList.vue | 6 +- .../src/components/widgets/Spinner.vue | 25 +++- .../components/widgets/SubscribeButton.vue | 18 ++- .../src/components/widgets/TableInfo.vue | 5 +- .../src/components/widgets/TaskTypeName.vue | 6 +- .../src/components/widgets/TextField.vue | 17 ++- .../src/components/widgets/TextareaField.vue | 5 +- .../src/components/widgets/ValidationTag.vue | 11 +- app/renderer/src/lib/color2.js | 2 +- package.json | 8 +- 78 files changed, 1372 insertions(+), 386 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 10757f3..a7e1c97 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -9,13 +9,12 @@ "ecmaVersion": 2021, "sourceType": "module" }, - "extends": ["eslint:recommended", "prettier"], + "extends": ["eslint:recommended"], "globals": { "defineProps": "readonly", "defineEmits": "readonly", "defineExpose": "readonly", "withDefaults": "readonly" }, - "ignorePatterns": ["node_modules/**", "**/dist/**"], - "plugins": ["prettier"] + "ignorePatterns": ["node_modules/**", "**/dist/**"] } diff --git a/app/renderer/src/components/cells/DescriptionCell.vue b/app/renderer/src/components/cells/DescriptionCell.vue index 0ac0316..897b78a 100644 --- a/app/renderer/src/components/cells/DescriptionCell.vue +++ b/app/renderer/src/components/cells/DescriptionCell.vue @@ -1,5 +1,9 @@