summaryrefslogtreecommitdiff
path: root/app/assets/javascripts
diff options
context:
space:
mode:
authorNick Kipling <nkipling@gitlab.com>2019-07-18 17:56:09 +0100
committerNathan Friend <nathan@gitlab.com>2019-07-30 13:49:48 -0300
commit237f434ce83488f252b5f593c67ecaf76ceb9e86 (patch)
tree59a07f848fb4720ab4d7f6ffbf7aa12f946547e6 /app/assets/javascripts
parentb5d50025fc8bc232de1a82ccb2d13906a96cd829 (diff)
downloadgitlab-ce-237f434ce83488f252b5f593c67ecaf76ceb9e86.tar.gz
Updating with suggestions as per review
Diffstat (limited to 'app/assets/javascripts')
-rw-r--r--app/assets/javascripts/registry/components/table_registry.vue7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue
index cf1ee0e06a6..807b81c66e9 100644
--- a/app/assets/javascripts/registry/components/table_registry.vue
+++ b/app/assets/javascripts/registry/components/table_registry.vue
@@ -52,7 +52,7 @@ export default {
return this.repo.pagination.total > this.repo.pagination.perPage;
},
modalTitle() {
- if (this.singleItemToBeDeleted !== null || this.itemsToBeDeleted.length === 1) {
+ if (this.singleItemSelected) {
return s__('ContainerRegistry|Remove image');
}
return s__('ContainerRegistry|Remove images');
@@ -60,7 +60,7 @@ export default {
modalDescription() {
const selectedCount = this.itemsToBeDeleted.length;
- if (this.singleItemToBeDeleted !== null || selectedCount === 1) {
+ if (this.singleItemSelected) {
const { tag } =
this.singleItemToBeDeleted !== null
? this.repo.list[this.singleItemToBeDeleted]
@@ -79,6 +79,9 @@ export default {
{ count: selectedCount },
);
},
+ singleItemSelected() {
+ return this.singleItemToBeDeleted !== null || this.itemsToBeDeleted.length === 1;
+ },
},
methods: {
...mapActions(['fetchList', 'deleteItems']),