diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 15:09:44 +0000 |
commit | 874ead9c3a50de4c4ca4551eaf5b7eb976d26b50 (patch) | |
tree | 637ee9f2da5e251bc08ebf3e972209d51966bf7c /app/assets/javascripts/snippets/components | |
parent | 2e4c4055181eec9186458dd5dd3219c937032ec7 (diff) | |
download | gitlab-ce-874ead9c3a50de4c4ca4551eaf5b7eb976d26b50.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/snippets/components')
-rw-r--r-- | app/assets/javascripts/snippets/components/show.vue | 33 | ||||
-rw-r--r-- | app/assets/javascripts/snippets/components/snippet_blob_edit.vue | 2 |
2 files changed, 5 insertions, 30 deletions
diff --git a/app/assets/javascripts/snippets/components/show.vue b/app/assets/javascripts/snippets/components/show.vue index e98f56d87f5..bc0034d397e 100644 --- a/app/assets/javascripts/snippets/components/show.vue +++ b/app/assets/javascripts/snippets/components/show.vue @@ -1,10 +1,11 @@ <script> -import GetSnippetQuery from '../queries/snippet.query.graphql'; import SnippetHeader from './snippet_header.vue'; import SnippetTitle from './snippet_title.vue'; import SnippetBlob from './snippet_blob_view.vue'; import { GlLoadingIcon } from '@gitlab/ui'; +import { getSnippetMixin } from '../mixins/snippets'; + export default { components: { SnippetHeader, @@ -12,33 +13,7 @@ export default { GlLoadingIcon, SnippetBlob, }, - apollo: { - snippet: { - query: GetSnippetQuery, - variables() { - return { - ids: this.snippetGid, - }; - }, - update: data => data.snippets.edges[0].node, - }, - }, - props: { - snippetGid: { - type: String, - required: true, - }, - }, - data() { - return { - snippet: {}, - }; - }, - computed: { - isLoading() { - return this.$apollo.queries.snippet.loading; - }, - }, + mixins: [getSnippetMixin], }; </script> <template> @@ -46,7 +21,7 @@ export default { <gl-loading-icon v-if="isLoading" :label="__('Loading snippet')" - :size="2" + size="lg" class="loading-animation prepend-top-20 append-bottom-20" /> <template v-else> diff --git a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue index ae6f451df18..44b4607e5a9 100644 --- a/app/assets/javascripts/snippets/components/snippet_blob_edit.vue +++ b/app/assets/javascripts/snippets/components/snippet_blob_edit.vue @@ -37,7 +37,7 @@ export default { <gl-loading-icon v-if="isLoading" :label="__('Loading snippet')" - :size="2" + size="lg" class="loading-animation prepend-top-20 append-bottom-20" /> <blob-content-edit |