summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/registry/components/app.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/registry/components/app.vue')
-rw-r--r--app/assets/javascripts/registry/components/app.vue32
1 files changed, 16 insertions, 16 deletions
diff --git a/app/assets/javascripts/registry/components/app.vue b/app/assets/javascripts/registry/components/app.vue
index 2d8ca443ea7..ea0f7199a70 100644
--- a/app/assets/javascripts/registry/components/app.vue
+++ b/app/assets/javascripts/registry/components/app.vue
@@ -1,14 +1,17 @@
<script>
- /* globals Flash */
import { mapGetters, mapActions } from 'vuex';
- import '../../flash';
+ import Flash from '../../flash';
import loadingIcon from '../../vue_shared/components/loading_icon.vue';
import store from '../stores';
import collapsibleContainer from './collapsible_container.vue';
import { errorMessages, errorMessagesTypes } from '../constants';
export default {
- name: 'registryListApp',
+ name: 'RegistryListApp',
+ components: {
+ collapsibleContainer,
+ loadingIcon,
+ },
props: {
endpoint: {
type: String,
@@ -16,22 +19,12 @@
},
},
store,
- components: {
- collapsibleContainer,
- loadingIcon,
- },
computed: {
...mapGetters([
'isLoading',
'repos',
]),
},
- methods: {
- ...mapActions([
- 'setMainEndpoint',
- 'fetchRepos',
- ]),
- },
created() {
this.setMainEndpoint(this.endpoint);
},
@@ -39,6 +32,12 @@
this.fetchRepos()
.catch(() => Flash(errorMessages[errorMessagesTypes.FETCH_REPOS]));
},
+ methods: {
+ ...mapActions([
+ 'setMainEndpoint',
+ 'fetchRepos',
+ ]),
+ },
};
</script>
<template>
@@ -46,17 +45,18 @@
<loading-icon
v-if="isLoading"
size="3"
- />
+ />
<collapsible-container
v-else-if="!isLoading && repos.length"
v-for="(item, index) in repos"
:key="index"
:repo="item"
- />
+ />
<p v-else-if="!isLoading && !repos.length">
- {{__("No container images stored for this project. Add one by following the instructions above.")}}
+ {{ __(`No container images stored for this project.
+Add one by following the instructions above.`) }}
</p>
</div>
</template>