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-12-24 03:10:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-12-24 03:10:25 +0300
commitb2e2c43b3c5aebf47d7f6114b172551e4fa97e58 (patch)
tree5358eb8e4b7fa85f87f13524ab520b460a62ce24 /app/assets/javascripts/snippets
parent5838993b5f3e2d861d9dd7c82dfeea71506b9fc2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets')
-rw-r--r--app/assets/javascripts/snippets/components/edit.vue6
-rw-r--r--app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue4
-rw-r--r--app/assets/javascripts/snippets/components/snippet_blob_edit.vue6
-rw-r--r--app/assets/javascripts/snippets/components/snippet_blob_view.vue2
-rw-r--r--app/assets/javascripts/snippets/components/snippet_header.vue4
-rw-r--r--app/assets/javascripts/snippets/mixins/snippets.js2
6 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue
index 08683f25651..ffb5e242973 100644
--- a/app/assets/javascripts/snippets/components/edit.vue
+++ b/app/assets/javascripts/snippets/components/edit.vue
@@ -73,7 +73,7 @@ export default {
return this.actions.length > 0;
},
hasValidBlobs() {
- return this.actions.every(x => x.content);
+ return this.actions.every((x) => x.content);
},
updatePrevented() {
return this.snippet.title === '' || !this.hasValidBlobs || this.isUpdating;
@@ -130,7 +130,7 @@ export default {
},
getAttachedFiles() {
const fileInputs = Array.from(this.$el.querySelectorAll('[name="files[]"]'));
- return fileInputs.map(node => node.value);
+ return fileInputs.map((node) => node.value);
},
createMutation() {
return {
@@ -166,7 +166,7 @@ export default {
redirectTo(baseObj.snippet.webUrl);
}
})
- .catch(e => {
+ .catch((e) => {
this.flashAPIFailure(e);
});
},
diff --git a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
index ab2553265a2..ff27c90a84d 100644
--- a/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
+++ b/app/assets/javascripts/snippets/components/snippet_blob_actions_edit.vue
@@ -74,7 +74,7 @@ export default {
this.blobsOrig = blobsById;
this.blobs = cloneDeep(blobsById);
- this.blobIds = blobs.map(x => x.id);
+ this.blobIds = blobs.map((x) => x.id);
// Show 1 empty blob if none exist
if (!this.blobIds.length) {
@@ -108,7 +108,7 @@ export default {
this.blobIds.push(blob.id);
},
deleteBlob(id) {
- this.blobIds = this.blobIds.filter(x => x !== id);
+ this.blobIds = this.blobIds.filter((x) => x !== id);
this.$delete(this.blobs, id);
},
updateBlob(id, args) {
diff --git a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue
index 6a10dc38f2c..c8545e334a6 100644
--- a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue
+++ b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue
@@ -55,12 +55,12 @@ export default {
axios
.get(url, {
// This prevents axios from automatically JSON.parse response
- transformResponse: [f => f],
+ transformResponse: [(f) => f],
})
- .then(res => {
+ .then((res) => {
this.notifyAboutUpdates({ content: res.data });
})
- .catch(e => this.flashAPIFailure(e));
+ .catch((e) => this.flashAPIFailure(e));
},
flashAPIFailure(err) {
Flash(sprintf(SNIPPET_BLOB_CONTENT_FETCH_ERROR, { err }));
diff --git a/app/assets/javascripts/snippets/components/snippet_blob_view.vue b/app/assets/javascripts/snippets/components/snippet_blob_view.vue
index 5a9ac0af060..b01fae6a88f 100644
--- a/app/assets/javascripts/snippets/components/snippet_blob_view.vue
+++ b/app/assets/javascripts/snippets/components/snippet_blob_view.vue
@@ -88,7 +88,7 @@ export default {
const {
blobs: { nodes: dataBlobs },
} = data.snippets.nodes[0];
- const updatedBlobData = dataBlobs.find(blob => blob.path === blobPath);
+ const updatedBlobData = dataBlobs.find((blob) => blob.path === blobPath);
return updatedBlobData.richData || updatedBlobData.plainData;
},
},
diff --git a/app/assets/javascripts/snippets/components/snippet_header.vue b/app/assets/javascripts/snippets/components/snippet_header.vue
index 32c4c1039f5..e65e55f6595 100644
--- a/app/assets/javascripts/snippets/components/snippet_header.vue
+++ b/app/assets/javascripts/snippets/components/snippet_header.vue
@@ -69,7 +69,7 @@ export default {
},
computed: {
snippetHasBinary() {
- return Boolean(this.snippet.blobs.find(blob => blob.binary));
+ return Boolean(this.snippet.blobs.find((blob) => blob.binary));
},
authoredMessage() {
return this.snippet.author
@@ -164,7 +164,7 @@ export default {
this.closeDeleteModal();
this.redirectToSnippets();
})
- .catch(err => {
+ .catch((err) => {
this.isDeleting = false;
this.errorMessage = err.message;
});
diff --git a/app/assets/javascripts/snippets/mixins/snippets.js b/app/assets/javascripts/snippets/mixins/snippets.js
index 5844a55e4f5..89a88958152 100644
--- a/app/assets/javascripts/snippets/mixins/snippets.js
+++ b/app/assets/javascripts/snippets/mixins/snippets.js
@@ -11,7 +11,7 @@ export const getSnippetMixin = {
ids: [this.snippetGid],
};
},
- update: data => {
+ update: (data) => {
const res = data.snippets.nodes[0];
if (res) {
res.blobs = res.blobs.nodes;