Add user header to the dashboard view

Change-Id: I2e3dace179e2cadcab21df33fc3cdaff6babad96
This commit is contained in:
Wyatt Allen
2017-10-03 10:41:32 +01:00
parent 50a9d5f1c3
commit 50d6cb54e4
2 changed files with 10 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ limitations under the License.
<link rel="import" href="../../../styles/shared-styles.html">
<link rel="import" href="../../change-list/gr-change-list/gr-change-list.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../gr-user-header/gr-user-header.html">
<dom-module id="gr-dashboard-view">
<template>
@@ -34,6 +35,9 @@ limitations under the License.
gr-change-list {
width: 100%;
}
.hide {
display: none;
}
@media only screen and (max-width: 50em) {
.loading {
padding: 0 var(--default-horizontal-margin);
@@ -42,6 +46,9 @@ limitations under the License.
</style>
<div class="loading" hidden$="[[!_loading]]">Loading...</div>
<div hidden$="[[_loading]]" hidden>
<gr-user-header
user-id="[[params.user]]"
class$="[[_computeUserHeaderClass(params.user)]]"></gr-user-header>
<gr-change-list
show-star
show-reviewed-state

View File

@@ -144,5 +144,8 @@
return query.replace(/\$\{user\}/g, user);
},
_computeUserHeaderClass(userParam) {
return userParam === 'self' ? 'hide' : '';
},
});
})();