Resolve "Add Avatar from author of the last commit to WebIDE status bar"

This commit is contained in:
Jose 2019-01-31 08:22:29 +00:00 committed by Phil Hughes
parent dd1348bd90
commit 2375f7ff68
3 changed files with 18 additions and 3 deletions

View file

@ -107,16 +107,23 @@ export default {
class="commit-sha" class="commit-sha"
>{{ lastCommit.short_id }}</a >{{ lastCommit.short_id }}</a
> >
by {{ lastCommit.author_name }} by
<user-avatar-image
css-classes="ide-status-avatar"
:size="18"
:img-src="latestPipeline && latestPipeline.commit.author_gravatar_url"
:img-alt="lastCommit.author_name"
:tooltip-text="lastCommit.author_name"
/>
{{ lastCommit.author_name }}
<time <time
v-tooltip v-tooltip
:datetime="lastCommit.committed_date" :datetime="lastCommit.committed_date"
:title="tooltipTitle(lastCommit.committed_date)" :title="tooltipTitle(lastCommit.committed_date)"
data-placement="top" data-placement="top"
data-container="body" data-container="body"
>{{ lastCommitFormatedAge }}</time
> >
{{ lastCommitFormatedAge }}
</time>
</div> </div>
<div v-if="file" class="ide-status-file">{{ file.name }}</div> <div v-if="file" class="ide-status-file">{{ file.name }}</div>
<div v-if="file" class="ide-status-file">{{ file.eol }}</div> <div v-if="file" class="ide-status-file">{{ file.eol }}</div>

View file

@ -395,6 +395,11 @@ $ide-commit-header-height: 48px;
svg { svg {
vertical-align: sub; vertical-align: sub;
} }
.ide-status-avatar {
float: none;
margin: 0 0 1px;
}
} }
.ide-status-file { .ide-status-file {

View file

@ -76,6 +76,9 @@ describe('ideStatusBar', () => {
icon: 'status_success', icon: 'status_success',
}, },
}, },
commit: {
author_gravatar_url: 'www',
},
}); });
vm.$nextTick() vm.$nextTick()