Commit a2f1fca6 authored by Nathan Friend's avatar Nathan Friend

Merge branch 'design-management-user-glalert' into 'master'

Use GlAlert component for design list load error

See merge request gitlab-org/gitlab!28079
parents 6e8bbae7 d25c0746
<script> <script>
import { GlLoadingIcon, GlButton } from '@gitlab/ui'; import { GlLoadingIcon, GlButton, GlAlert } from '@gitlab/ui';
import createFlash from '~/flash'; import createFlash from '~/flash';
import { s__, sprintf } from '~/locale'; import { s__, sprintf } from '~/locale';
import UploadButton from '../components/upload/button.vue'; import UploadButton from '../components/upload/button.vue';
...@@ -28,8 +28,9 @@ const MAXIMUM_FILE_UPLOAD_LIMIT = 10; ...@@ -28,8 +28,9 @@ const MAXIMUM_FILE_UPLOAD_LIMIT = 10;
export default { export default {
components: { components: {
GlLoadingIcon, GlLoadingIcon,
UploadButton, GlAlert,
GlButton, GlButton,
UploadButton,
Design, Design,
DesignDestroyer, DesignDestroyer,
DesignVersionDropdown, DesignVersionDropdown,
...@@ -260,9 +261,9 @@ export default { ...@@ -260,9 +261,9 @@ export default {
</header> </header>
<div class="mt-4"> <div class="mt-4">
<gl-loading-icon v-if="isLoading" size="md" /> <gl-loading-icon v-if="isLoading" size="md" />
<div v-else-if="error" class="alert alert-danger"> <gl-alert v-else-if="error" variant="danger" :dismissible="false">
{{ __('An error occurred while loading designs. Please try again.') }} {{ __('An error occurred while loading designs. Please try again.') }}
</div> </gl-alert>
<ol v-else class="list-unstyled row"> <ol v-else class="list-unstyled row">
<li class="col-md-6 col-lg-4 mb-3"> <li class="col-md-6 col-lg-4 mb-3">
<design-dropzone class="design-list-item" @change="onUploadDesign" /> <design-dropzone class="design-list-item" @change="onUploadDesign" />
......
...@@ -194,13 +194,19 @@ exports[`Design management index page designs renders error 1`] = ` ...@@ -194,13 +194,19 @@ exports[`Design management index page designs renders error 1`] = `
<div <div
class="mt-4" class="mt-4"
> >
<div <gl-alert-stub
class="alert alert-danger" dismisslabel="Dismiss"
primarybuttonlink=""
primarybuttontext=""
secondarybuttonlink=""
secondarybuttontext=""
title=""
variant="danger"
> >
An error occurred while loading designs. Please try again. An error occurred while loading designs. Please try again.
</div> </gl-alert-stub>
</div> </div>
<router-view-stub <router-view-stub
......
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