@@ -4,6 +4,7 @@ import {Link} from 'preact-router/match';
4
4
import { Loading } from '../components/loading' ;
5
5
import { Page } from './page' ;
6
6
import { createStagingLink } from '../utils/links' ;
7
+ import { prettyDate } from '../utils/formatters' ;
7
8
import { rpc } from '../utils/rpc' ;
8
9
9
10
interface BuildPageProps {
@@ -146,6 +147,39 @@ export class BuildPage extends Page<BuildPageProps, BuildPageState> {
146
147
) ;
147
148
}
148
149
150
+ renderGitData ( ) {
151
+ return (
152
+ < div >
153
+ { this . state . manifest && this . state . manifest . commit ? (
154
+ < div class = "BuildPage__content__gitData" >
155
+ < div class = "BuildPage__content__gitData__primary" >
156
+ < span
157
+ class = "BuildPage__content__gitData__primary__author"
158
+ title = "{this.state.manifest.commit.author.email}"
159
+ >
160
+ { this . state . manifest . commit . author . name }
161
+ </ span >
162
+ < span class = "BuildPage__content__gitData__primary__message" >
163
+ { this . state . manifest . commit . message }
164
+ </ span >
165
+ </ div >
166
+ < div class = "BuildPage__content__gitData__secondary" >
167
+ < span class = "BuildPage__content__gitData__secondary__shortSha" >
168
+ { this . state . manifest . ref . slice ( 0 , 7 ) }
169
+ </ span >
170
+ on
171
+ < span class = "BuildPage__content__gitData__secondary__modified" >
172
+ { prettyDate ( this . state . manifest . modified ) }
173
+ </ span >
174
+ </ div >
175
+ </ div >
176
+ ) : (
177
+ ''
178
+ ) }
179
+ </ div >
180
+ ) ;
181
+ }
182
+
149
183
render ( ) {
150
184
return (
151
185
< div class = "BuildPage" >
@@ -164,6 +198,7 @@ export class BuildPage extends Page<BuildPageProps, BuildPageState> {
164
198
</ Link >
165
199
</ div >
166
200
< div class = "BuildPage__content" >
201
+ { this . state . loading ? '' : this . renderGitData ( ) }
167
202
{ this . state . loading ? this . renderLoading ( ) : this . renderPathsTable ( ) }
168
203
{ this . state . loading ? '' : this . renderRedirectsTable ( ) }
169
204
</ div >
0 commit comments