Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 00:07:45 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-15 00:07:45 +0300
commit0b12a5312c9701fbfed25fbb334d47900ced736b (patch)
treea29a27e297134f573fd8e5c298d241f3156c207a /app/assets/javascripts/ide/components
parent92f95ccac81911d1fcc32e999a7f1ce04624a56c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide/components')
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/modal.vue25
1 files changed, 7 insertions, 18 deletions
diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
index ecafb4e81c4..bf3d736ddf3 100644
--- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue
+++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue
@@ -67,8 +67,8 @@ export default {
if (this.entryModal.type === modalTypes.rename) {
if (this.entries[this.entryName] && !this.entries[this.entryName].deleted) {
flash(
- sprintf(s__('The name %{entryName} is already taken in this directory.'), {
- entryName: this.entryName,
+ sprintf(s__('The name "%{name}" is already taken in this directory.'), {
+ name: this.entryName,
}),
'alert',
document,
@@ -81,22 +81,11 @@ export default {
const entryName = parentPath.pop();
parentPath = parentPath.join('/');
- const createPromise =
- parentPath && !this.entries[parentPath]
- ? this.createTempEntry({ name: parentPath, type: 'tree' })
- : Promise.resolve();
-
- createPromise
- .then(() =>
- this.renameEntry({
- path: this.entryModal.entry.path,
- name: entryName,
- parentPath,
- }),
- )
- .catch(() =>
- flash(__('Error creating a new path'), 'alert', document, null, false, true),
- );
+ this.renameEntry({
+ path: this.entryModal.entry.path,
+ name: entryName,
+ parentPath,
+ });
}
} else {
this.createTempEntry({