Commit 9df0f0a7 authored by Scott Hampton's avatar Scott Hampton

Merge branch '341314-improve-empty-state' into 'master'

Improves the empty state when artifacts fail to load

See merge request gitlab-org/gitlab!71666
parents 7e66d89d e9bc002c
......@@ -95,9 +95,9 @@ export default {
{{ $options.i18n.artifactsFetchErrorMessage }}
</gl-alert>
<gl-loading-icon v-if="isLoading" size="sm" />
<gl-loading-icon v-else-if="isLoading" size="sm" />
<gl-dropdown-item v-if="!artifacts.length && !isLoading" data-testid="artifacts-empty-message">
<gl-dropdown-item v-else-if="!artifacts.length" data-testid="artifacts-empty-message">
{{ $options.i18n.emptyArtifactsMessage }}
</gl-dropdown-item>
......
......@@ -50,11 +50,6 @@ export default {
isLoading: false,
};
},
computed: {
hasArtifacts() {
return Boolean(this.artifacts.length);
},
},
methods: {
fetchArtifacts() {
this.isLoading = true;
......@@ -99,9 +94,9 @@ export default {
{{ $options.i18n.artifactsFetchErrorMessage }}
</gl-alert>
<gl-loading-icon v-if="isLoading" size="sm" />
<gl-loading-icon v-else-if="isLoading" size="sm" />
<gl-alert v-else-if="!hasArtifacts" variant="info" :dismissible="false">
<gl-alert v-else-if="!artifacts.length" variant="info" :dismissible="false">
{{ $options.i18n.noArtifacts }}
</gl-alert>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment