diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-02 06:08:01 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-02 06:08:01 +0000 |
commit | f4251f269416f881d921a1bf89de802e4a70c11a (patch) | |
tree | 4de8da4dae1608a9cf7ad8539d2f2525aec0e209 /app/assets | |
parent | 553b76c07a318811434878eca75e31f193734d34 (diff) | |
download | gitlab-ce-f4251f269416f881d921a1bf89de802e4a70c11a.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
6 files changed, 20 insertions, 36 deletions
diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index 5fe58c5e512..0fb06dab635 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -122,7 +122,7 @@ export default { v-tooltip :href="group.relativePath" :title="group.fullName" - class="no-expand gl-mt-3 gl-mr-3" + class="no-expand gl-mt-3 gl-mr-3 gl-text-gray-900!" data-placement="bottom" >{{ // ending bracket must be by closing tag to prevent diff --git a/app/assets/javascripts/groups/components/item_actions.vue b/app/assets/javascripts/groups/components/item_actions.vue index 5454480e61a..985ea5a9019 100644 --- a/app/assets/javascripts/groups/components/item_actions.vue +++ b/app/assets/javascripts/groups/components/item_actions.vue @@ -53,7 +53,7 @@ export default { :aria-label="leaveBtnTitle" data-container="body" data-placement="bottom" - class="leave-group btn btn-xs no-expand" + class="leave-group btn btn-xs no-expand gl-text-gray-700 gl-ml-5" @click.prevent="onLeaveGroup" > <icon name="leave" class="position-top-0" /> @@ -66,7 +66,7 @@ export default { :aria-label="editBtnTitle" data-container="body" data-placement="bottom" - class="edit-group btn btn-xs no-expand" + class="edit-group btn btn-xs no-expand gl-text-gray-700 gl-ml-5" > <icon name="settings" class="position-top-0 align-middle" /> </a> diff --git a/app/assets/javascripts/groups/components/item_stats.vue b/app/assets/javascripts/groups/components/item_stats.vue index 53da3f7b2ee..ffe4b18dea1 100644 --- a/app/assets/javascripts/groups/components/item_stats.vue +++ b/app/assets/javascripts/groups/components/item_stats.vue @@ -44,26 +44,26 @@ export default { </script> <template> - <div class="stats"> + <div class="stats gl-text-gray-700"> <item-stats-value v-if="isGroup" :title="__('Subgroups')" :value="item.subgroupCount" - css-class="number-subgroups" + css-class="number-subgroups gl-ml-5" icon-name="folder-o" /> <item-stats-value v-if="isGroup" :title="__('Projects')" :value="item.projectCount" - css-class="number-projects" + css-class="number-projects gl-ml-5" icon-name="bookmark" /> <item-stats-value v-if="isGroup" :title="__('Members')" :value="item.memberCount" - css-class="number-users" + css-class="number-users gl-ml-5" icon-name="users" /> <item-stats-value diff --git a/app/assets/javascripts/snippets/components/edit.vue b/app/assets/javascripts/snippets/components/edit.vue index e8d6c005435..a8af27dd2ae 100644 --- a/app/assets/javascripts/snippets/components/edit.vue +++ b/app/assets/javascripts/snippets/components/edit.vue @@ -11,7 +11,11 @@ import FormFooterActions from '~/vue_shared/components/form/form_footer_actions. import UpdateSnippetMutation from '../mutations/updateSnippet.mutation.graphql'; import CreateSnippetMutation from '../mutations/createSnippet.mutation.graphql'; import { getSnippetMixin } from '../mixins/snippets'; -import { SNIPPET_VISIBILITY_PRIVATE } from '../constants'; +import { + SNIPPET_VISIBILITY_PRIVATE, + SNIPPET_CREATE_MUTATION_ERROR, + SNIPPET_UPDATE_MUTATION_ERROR, +} from '../constants'; import SnippetBlobEdit from './snippet_blob_edit.vue'; import SnippetVisibilityEdit from './snippet_visibility_edit.vue'; import SnippetDescriptionEdit from './snippet_description_edit.vue'; @@ -98,7 +102,11 @@ export default { this.fileName = newName; }, flashAPIFailure(err) { - Flash(sprintf(__("Can't update snippet: %{err}"), { err })); + const defaultErrorMsg = this.newSnippet + ? SNIPPET_CREATE_MUTATION_ERROR + : SNIPPET_UPDATE_MUTATION_ERROR; + Flash(sprintf(defaultErrorMsg, { err })); + this.isUpdating = false; }, onNewSnippetFetched() { this.newSnippet = true; @@ -151,7 +159,6 @@ export default { redirectTo(baseObj.snippet.webUrl); }) .catch(e => { - this.isUpdating = false; this.flashAPIFailure(e); }); }, diff --git a/app/assets/javascripts/snippets/constants.js b/app/assets/javascripts/snippets/constants.js index 7fd5e5b8ee4..b3abc73557c 100644 --- a/app/assets/javascripts/snippets/constants.js +++ b/app/assets/javascripts/snippets/constants.js @@ -22,3 +22,6 @@ export const SNIPPET_VISIBILITY = { description: __('The snippet can be accessed without any authentication.'), }, }; + +export const SNIPPET_CREATE_MUTATION_ERROR = __("Can't create snippet: %{err}"); +export const SNIPPET_UPDATE_MUTATION_ERROR = __("Can't update snippet: %{err}"); diff --git a/app/assets/stylesheets/pages/groups.scss b/app/assets/stylesheets/pages/groups.scss index beb0ea27de0..6e76db6b68a 100644 --- a/app/assets/stylesheets/pages/groups.scss +++ b/app/assets/stylesheets/pages/groups.scss @@ -14,17 +14,12 @@ flex-direction: column; margin: 0; - .group-row-contents .controls > .btn:last-child { - margin: 0; - } - li { .title { font-weight: 600; } a { - color: $gray-900; text-decoration: none; &:hover { @@ -42,8 +37,6 @@ } .group-row { - @include basic-list-stats; - .description p { margin-bottom: 0; color: $gl-text-color-secondary; @@ -454,29 +447,10 @@ table.pipeline-project-metrics tr td { min-width: 30px; } - > span:last-child { - margin-right: 0; - } - .stat-value { margin: 2px 0 0 5px; } } - - .controls { - flex-basis: 90px; - - > .btn { - margin: 0 $btn-side-margin 0 0; - color: $gl-text-color-secondary; - } - } - - .metadata { - @include media-breakpoint-up(md) { - flex-basis: 240px; - } - } } .project-row-contents .stats { |