| OLD | NEW |
| 1 <!-- | 1 <!-- |
| 2 Copyright 2016 The LUCI Authors. All rights reserved. | 2 Copyright 2016 The LUCI Authors. All rights reserved. |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | 3 Use of this source code is governed under the Apache License, Version 2.0 |
| 4 that can be found in the LICENSE file. | 4 that can be found in the LICENSE file. |
| 5 | 5 |
| 6 This in an HTML Import-able file that contains the definition | 6 This in an HTML Import-able file that contains the definition |
| 7 of the following elements: | 7 of the following elements: |
| 8 | 8 |
| 9 <swarming-app> | 9 <swarming-app> |
| 10 | 10 |
| 11 Usage: | 11 <swarming-app> is meant to be used in top level elements to provide the header |
| 12 toolbar and authentication. |
| 12 | 13 |
| 13 <swarming-app></swarming-app> | 14 It contains the definition of the following style modules: |
| 15 |
| 16 swarming-app-style |
| 17 |
| 18 <style include="shared-style"> contains styles to be shared among all |
| 19 apps, such as colors. |
| 14 | 20 |
| 15 Properties: | 21 Properties: |
| 16 auth_headers: Object, Use this in iron-ajax to set oauth2 headers. | 22 auth_headers: Object, Use this in iron-ajax to set oauth2 headers. |
| 17 busy: Boolean, If the busy spinner should be active. | 23 busy: Boolean, If the busy spinner should be active. |
| 18 name: String, the name of the app to be displayed. | 24 name: String, the name of the app to be displayed. |
| 19 | 25 |
| 20 Methods: | 26 Methods: |
| 21 None. | 27 None. |
| 22 | 28 |
| 23 Events: | 29 Events: |
| 24 None. | 30 None. |
| 25 --> | 31 --> |
| 26 | 32 |
| 27 <link rel="import" href="/res/imp/bower_components/app-layout/app-layout.html"> | 33 <link rel="import" href="/res/imp/bower_components/app-layout/app-layout.html"> |
| 34 <link rel="import" href="/res/imp/bower_components/iron-flex-layout/iron-flex-la
yout-classes.html"> |
| 28 <link rel="import" href="/res/imp/bower_components/paper-spinner/paper-spinner-l
ite.html"> | 35 <link rel="import" href="/res/imp/bower_components/paper-spinner/paper-spinner-l
ite.html"> |
| 29 <link rel="import" href="/res/imp/bower_components/iron-flex-layout/iron-flex-la
yout-classes.html"> | |
| 30 | 36 |
| 31 <link rel="import" href="/res/imp/common/auth-signin.html"> | 37 <link rel="import" href="/res/imp/common/auth-signin.html"> |
| 32 | 38 |
| 33 <dom-module id="swarming-app"> | 39 <dom-module id="swarming-app"> |
| 34 <template> | 40 <template> |
| 35 <style include="iron-flex"> | 41 <style include="iron-flex"> |
| 36 :host { | 42 :host { |
| 37 position: absolute; | 43 position: absolute; |
| 38 top: 0; | 44 top: 0; |
| 39 bottom: 0; | 45 bottom: 0; |
| 40 left: 0; | 46 left: 0; |
| 41 right: 0; | 47 right: 0; |
| 42 } | 48 } |
| 43 | 49 |
| 44 app-toolbar { | 50 app-toolbar { |
| 45 background-color: #4285f4; | 51 background-color: #1F78B4; |
| 46 color: #fff; | 52 color: #fff; |
| 47 } | 53 } |
| 48 | 54 |
| 49 app-toolbar a { | 55 app-toolbar a { |
| 50 color: #fff; | 56 color: #fff; |
| 51 } | 57 } |
| 52 .left { | 58 .left { |
| 53 margin-right:15px; | 59 margin-right:15px; |
| 54 } | 60 } |
| 55 .right { | 61 .right { |
| 56 margin-left:15px; | 62 margin-left:15px; |
| 57 } | 63 } |
| 58 .main-content { | 64 .main-content { |
| 59 padding: 3px; | 65 padding: 3px; |
| 60 } | 66 } |
| 61 | 67 |
| 68 .main-content a { |
| 69 color: #1F78B4; |
| 70 } |
| 71 |
| 62 paper-spinner-lite { | 72 paper-spinner-lite { |
| 63 --paper-spinner-color: var(--google-yellow-500); | 73 --paper-spinner-color: var(--google-yellow-500); |
| 64 } | 74 } |
| 65 </style> | 75 </style> |
| 66 <app-header-layout> | 76 <app-header-layout> |
| 67 <app-header fixed> | 77 <app-header fixed> |
| 68 <app-toolbar> | 78 <app-toolbar> |
| 69 <div class="title left">[[name]]</div> | 79 <div class="title left">[[name]]</div> |
| 70 <paper-spinner-lite class="left" active="[[busy]]"></paper-spinner-lit
e> | 80 <paper-spinner-lite class="left" active="[[busy]]"></paper-spinner-lit
e> |
| 71 | 81 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 97 busy: { | 107 busy: { |
| 98 type: Boolean, | 108 type: Boolean, |
| 99 }, | 109 }, |
| 100 name: { | 110 name: { |
| 101 type: String, | 111 type: String, |
| 102 }, | 112 }, |
| 103 }, | 113 }, |
| 104 | 114 |
| 105 }); | 115 }); |
| 106 </script> | 116 </script> |
| 117 </dom-module> |
| 118 |
| 119 <dom-module id="swarming-app-style"> |
| 120 <style> |
| 121 * { |
| 122 font-family: sans-serif; |
| 123 } |
| 124 /* Only style anchor tags that are actually linking somewhere.*/ |
| 125 a[href] { |
| 126 color: #1F78B4; |
| 127 } |
| 128 </style> |
| 107 </dom-module> | 129 </dom-module> |
| OLD | NEW |