Chromium Code Reviews| Index: web/apps/logdog-view/elements/logdog-view/logdog-view.html |
| diff --git a/web/apps/logdog-view/elements/logdog-view/logdog-view.html b/web/apps/logdog-view/elements/logdog-view/logdog-view.html |
| index e7e181ab5b271c744f2e5538d835df93eb6be414..c2a2328ab0507f34def82e1e6c2e84ef90537730 100644 |
| --- a/web/apps/logdog-view/elements/logdog-view/logdog-view.html |
| +++ b/web/apps/logdog-view/elements/logdog-view/logdog-view.html |
| @@ -32,7 +32,9 @@ The streams are specified by full path using the "s=" query parameter. |
| #banner { |
| background-color: #FAFAFA; |
| overflow: hidden; |
| - vertical-align: center; |
| + border-color: lightcoral; |
| + border-width: 0px 0px 2px 0px; |
| + border-style: solid; |
| } |
| .banner-content { |
| @@ -50,12 +52,7 @@ The streams are specified by full path using the "s=" query parameter. |
| #auth-bubble { |
| float: right; |
| display: inline-block; |
| - border: solid #AAAAAA; |
| - border-radius: 5px; |
| - border-width: 1px; |
| - padding: 2px; |
| - margin-left: auto; |
| - margin-right: 0; |
| + border: none; |
| } |
| </style> |
| @@ -79,12 +76,14 @@ The streams are specified by full path using the "s=" query parameter. |
| </template> |
| </div> |
| - <template is="dom-if" if="{{_hasStreams}}"> |
| - <logdog-stream-view |
| - id="view" |
| - host="[[host]]" |
| - streams="[[streams]]"></logdog-stream-view> |
| - </template> |
| + <logdog-stream-view |
| + id="streamView" |
| + host="[[host]]" |
| + mobile="[[mobile]]" |
| + metadata="[[metadata]]" |
| + toolbar-anchor="{{banner}}" |
| + toolbarAnchor="{{banner}}" |
| + streams="[[streams]]"></logdog-stream-view> |
| </div> |
| </template> |
| @@ -97,33 +96,52 @@ The streams are specified by full path using the "s=" query parameter. |
| host: { |
| type: String, |
| notify: true, |
| + value: null, |
| }, |
| + |
| clientId: { |
| type: String, |
| - nofity: true, |
| - }, |
| - accessToken: { |
| - type: String, |
| - notify: true, |
| - readOnly: true, |
| + value: null, |
| }, |
| + |
| streams: { |
| type: Array, |
| - notify: true, |
| + value: [], |
| readOnly: true, |
| }, |
| + metadata: { |
| + type: String, |
| + value: false, |
| + readOnly: true, |
| + }, |
| + |
| + mobile: { |
| + type: Boolean, |
| + value: false, |
| + }, |
| + |
| _hasStreams: { |
| computed: '_arrayHasElements(streams)', |
| }, |
| }, |
| - attached: function() { |
| + ready: function() { |
| + // Test if we're mobile. |
| + this.mobile = false; |
| + if ( window.matchMedia ) { |
| + this.mobile = window.matchMedia( |
| + "only screen and (max-width: 760px)").maches; |
|
Ryan Tseng
2016/12/06 03:38:11
matches?
|
| + } |
| + |
| // Parse the stream names from the "s" query parameter. |
| var queryString = window.location.search.replace(/^\?/, ""); |
| var streams = logdog.getQueryValues(queryString, "s"). |
| map(logdog.correctStreamPath); |
| this._setStreams(streams); |
| + |
| + // Parse the metadata option. |
| + this._setMetadata(!!logdog.getQueryValue(queryString, "m", false)); |
|
Ryan Tseng
2016/12/06 03:38:11
!!?
|
| }, |
| _onSignin: function(e) { |