2020-01-01 13:55:28 +05:30
|
|
|
<script>
|
|
|
|
import SnippetHeader from './snippet_header.vue';
|
2020-03-13 15:44:24 +05:30
|
|
|
import SnippetTitle from './snippet_title.vue';
|
|
|
|
import SnippetBlob from './snippet_blob_view.vue';
|
2020-01-01 13:55:28 +05:30
|
|
|
import { GlLoadingIcon } from '@gitlab/ui';
|
|
|
|
|
2020-04-22 19:07:51 +05:30
|
|
|
import { getSnippetMixin } from '../mixins/snippets';
|
|
|
|
|
2020-01-01 13:55:28 +05:30
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
SnippetHeader,
|
2020-03-13 15:44:24 +05:30
|
|
|
SnippetTitle,
|
2020-01-01 13:55:28 +05:30
|
|
|
GlLoadingIcon,
|
2020-03-13 15:44:24 +05:30
|
|
|
SnippetBlob,
|
2020-01-01 13:55:28 +05:30
|
|
|
},
|
2020-04-22 19:07:51 +05:30
|
|
|
mixins: [getSnippetMixin],
|
2020-01-01 13:55:28 +05:30
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<div class="js-snippet-view">
|
|
|
|
<gl-loading-icon
|
|
|
|
v-if="isLoading"
|
|
|
|
:label="__('Loading snippet')"
|
2020-04-22 19:07:51 +05:30
|
|
|
size="lg"
|
2020-01-01 13:55:28 +05:30
|
|
|
class="loading-animation prepend-top-20 append-bottom-20"
|
|
|
|
/>
|
2020-03-13 15:44:24 +05:30
|
|
|
<template v-else>
|
|
|
|
<snippet-header :snippet="snippet" />
|
|
|
|
<snippet-title :snippet="snippet" />
|
|
|
|
<snippet-blob :snippet="snippet" />
|
|
|
|
</template>
|
2020-01-01 13:55:28 +05:30
|
|
|
</div>
|
|
|
|
</template>
|