diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
commit | 143f196f8b3c40ceb7e9335a8dcc712b079519b9 (patch) | |
tree | 909df13e1f99b456287934741ba466b506e01129 /app/assets/javascripts/repository/components | |
parent | 575ccb036ea14c6a899482a83bd985ffbc992077 (diff) | |
download | gitlab-ce-143f196f8b3c40ceb7e9335a8dcc712b079519b9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/repository/components')
3 files changed, 15 insertions, 3 deletions
diff --git a/app/assets/javascripts/repository/components/last_commit.vue b/app/assets/javascripts/repository/components/last_commit.vue index 26c1f5813f5..70678b0db37 100644 --- a/app/assets/javascripts/repository/components/last_commit.vue +++ b/app/assets/javascripts/repository/components/last_commit.vue @@ -1,5 +1,6 @@ <script> import { GlTooltipDirective, GlLink, GlButton, GlLoadingIcon } from '@gitlab/ui'; +import defaultAvatarUrl from 'images/no_avatar.png'; import { sprintf, s__ } from '~/locale'; import Icon from '../../vue_shared/components/icon.vue'; import UserAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; @@ -83,6 +84,7 @@ export default { this.showDescription = !this.showDescription; }, }, + defaultAvatarUrl, }; </script> @@ -97,6 +99,9 @@ export default { :img-size="40" class="avatar-cell" /> + <span v-else class="avatar-cell user-avatar-link"> + <img :src="$options.defaultAvatarUrl" width="40" height="40" class="avatar s40" /> + </span> <div class="commit-detail flex-list"> <div class="commit-content qa-commit-content"> <gl-link :href="commit.webUrl" class="commit-row-message item-title"> @@ -119,6 +124,9 @@ export default { > {{ commit.author.name }} </gl-link> + <template v-else> + {{ commit.authorName }} + </template> {{ s__('LastCommit|authored') }} <timeago-tooltip :time="commit.authoredDate" tooltip-placement="bottom" /> </div> @@ -132,9 +140,8 @@ export default { </div> <div class="commit-actions flex-row"> <div v-if="commit.signatureHtml" v-html="commit.signatureHtml"></div> - <div class="ci-status-link"> + <div v-if="commit.pipeline" class="ci-status-link"> <gl-link - v-if="commit.pipeline" v-gl-tooltip.left :href="commit.pipeline.detailedStatus.detailsPath" :title="statusTitle" diff --git a/app/assets/javascripts/repository/components/table/index.vue b/app/assets/javascripts/repository/components/table/index.vue index ac20549acb8..8f2e9264bca 100644 --- a/app/assets/javascripts/repository/components/table/index.vue +++ b/app/assets/javascripts/repository/components/table/index.vue @@ -75,6 +75,7 @@ export default { v-for="entry in val" :id="entry.id" :key="`${entry.flatPath}-${entry.id}`" + :sha="entry.sha" :project-path="projectPath" :current-path="path" :name="entry.name" diff --git a/app/assets/javascripts/repository/components/table/row.vue b/app/assets/javascripts/repository/components/table/row.vue index 52f861fbb61..cf0457a2abf 100644 --- a/app/assets/javascripts/repository/components/table/row.vue +++ b/app/assets/javascripts/repository/components/table/row.vue @@ -37,6 +37,10 @@ export default { type: String, required: true, }, + sha: { + type: String, + required: true, + }, projectPath: { type: String, required: true, @@ -98,7 +102,7 @@ export default { return this.path.replace(new RegExp(`^${this.currentPath}/`), ''); }, shortSha() { - return this.id.slice(0, 8); + return this.sha.slice(0, 8); }, hasLockLabel() { return this.commit && this.commit.lockLabel; |