summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatalia Tepluhina <ntepluhina@gitlab.com>2019-04-22 16:10:50 +0000
committerClement Ho <clemmakesapps@gmail.com>2019-04-22 16:10:50 +0000
commit988fde17fd31c10547bab66eb3a505e0f58b8191 (patch)
tree9d6cf158cc28e95bb7c10d068f84597656b2f633
parentfc77a89d589a3116cc710bb4dab6ff16fd4dd775 (diff)
downloadgitlab-ce-988fde17fd31c10547bab66eb3a505e0f58b8191.tar.gz
Revert "Created a hack to prevent setting content on image"
This reverts commit e8c1c930c3bc7c159463ed3bed8765db01b40328.
-rw-r--r--app/assets/javascripts/ide/components/repo_editor.vue2
-rw-r--r--app/assets/javascripts/ide/stores/mutations.js4
-rw-r--r--changelogs/unreleased/57293-fix-image-rename.yml5
3 files changed, 8 insertions, 3 deletions
diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue
index 94a9e87369c..c7798ad0cd7 100644
--- a/app/assets/javascripts/ide/components/repo_editor.vue
+++ b/app/assets/javascripts/ide/components/repo_editor.vue
@@ -35,7 +35,7 @@ export default {
]),
...mapGetters('fileTemplates', ['showFileTemplatesBar']),
shouldHideEditor() {
- return this.file && this.file.binary && !this.file.content;
+ return this.file && this.file.binary;
},
showContentViewer() {
return (
diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js
index 9b9f4b21f1c..344b189decf 100644
--- a/app/assets/javascripts/ide/stores/mutations.js
+++ b/app/assets/javascripts/ide/stores/mutations.js
@@ -213,7 +213,7 @@ export default {
? `${slashedParentPath}${oldEntry.name}`
: `${slashedParentPath}${name}`;
- state.entries[newPath] = {
+ Vue.set(state.entries, newPath, {
...oldEntry,
id: newPath,
key: `${newPath}-${oldEntry.type}-${oldEntry.id}`,
@@ -225,7 +225,7 @@ export default {
tree: [],
parentPath,
raw: '',
- };
+ });
oldEntry.moved = true;
oldEntry.movedPath = newPath;
diff --git a/changelogs/unreleased/57293-fix-image-rename.yml b/changelogs/unreleased/57293-fix-image-rename.yml
new file mode 100644
index 00000000000..50dddbdf114
--- /dev/null
+++ b/changelogs/unreleased/57293-fix-image-rename.yml
@@ -0,0 +1,5 @@
+---
+title: Resolve Renaming an image via Web IDE corrupts it
+merge_request: 27486
+author:
+type: fixed