Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!-- | |
| 2 Copyright 2017 The LUCI Authors. All rights reserved. | |
| 3 Use of this source code is governed under the Apache License, Version 2.0 | |
| 4 that can be found in the LICENSE file. | |
| 5 --> | |
| 6 | |
| 7 <link rel="import" href="../../bower_components/polymer/polymer.html"> | |
| 8 <link rel="import" href="../../bower_components/app-layout/app-layout.html"> | |
| 9 <link rel="import" href="../../bower_components/paper-search/paper-search-bar.ht ml"> | |
| 10 <link rel="import" href="../../bower_components/app-route/app-location.html"> | |
| 11 <link rel="import" href="../../bower_components/app-route/app-route.html"> | |
| 12 | |
| 13 <link rel="import" href="config-set.html"> | |
| 14 <link rel="import" href="front-page.html"> | |
| 15 | |
| 16 <dom-module id="config-ui"> | |
| 17 <template> | |
| 18 <style> | |
| 19 app-toolbar { | |
| 20 background-color: #efefef; | |
| 21 color: #232323; | |
| 22 } | |
| 23 | |
| 24 app-header { | |
| 25 @apply --layout-fixed-top; | |
| 26 } | |
| 27 | |
| 28 .logo { | |
| 29 height: 100%; | |
| 30 } | |
| 31 | |
| 32 .title { | |
| 33 padding-left: 1%; | |
| 34 padding-bottom: 0.5%; | |
| 35 font-size: 150%; | |
| 36 font-family: sans-serif; | |
| 37 } | |
| 38 </style> | |
| 39 | |
| 40 <app-header reveals> | |
| 41 <app-toolbar> | |
| 42 <image class="logo" src="/static/images/chromium.png"/> | |
| 43 <div class="title" main-title>Configuration Service (not fully implement ed)</div> | |
|
seanmccullough1
2017/06/15 19:50:00
80char
ayanaadylova
2017/06/15 21:26:00
Done.
| |
| 44 </app-toolbar> | |
| 45 </app-header> | |
| 46 | |
| 47 | |
| 48 <app-location route="{{route}}" use-hash-as-path></app-location> | |
|
seanmccullough1
2017/06/15 19:50:00
Every browser we care about supports html5 navigat
Ryan Tseng
2017/06/15 20:01:54
We're doing it this way because for example "/" is
ayanaadylova
2017/06/15 21:26:00
Done.
ayanaadylova
2017/06/15 21:26:00
Done.
| |
| 49 <app-route route="{{route}}" | |
| 50 pattern="/services/:serviceName" | |
| 51 data="{{serviceData}}" | |
| 52 tail="{{serviceTail}}" | |
| 53 active="{{serviceActive}}"></app-route> | |
| 54 | |
| 55 <app-route route="{{route}}" | |
| 56 pattern="/projects/:projectName" | |
| 57 data="{{projectData}}" | |
| 58 tail="{{projectTail}}" | |
| 59 active="{{projectActive}}"></app-route> | |
| 60 | |
| 61 <app-route route="{{route}}" | |
| 62 pattern="/" | |
| 63 active="{{frontPageActive}}"></app-route> | |
| 64 | |
| 65 <div hidden$="{{!frontPageActive}}"> | |
|
seanmccullough1
2017/06/15 19:50:01
[[ ]] instead of {{ }}. You don't need two-way bin
ayanaadylova
2017/06/15 21:26:00
Done.
| |
| 66 <front-page></front-page> | |
| 67 </div> | |
| 68 <div hidden$="{{!serviceActive}}"> | |
| 69 <config-set category="Service" config-set-name="{{serviceData.serviceName} }" route="{{serviceTail}}" ></config-set> | |
|
Ryan Tseng
2017/06/15 18:55:56
nit: 80 char. The indentation style you used in L
ayanaadylova
2017/06/15 21:26:00
Done.
| |
| 70 </div> | |
| 71 <div hidden$="{{!projectActive}}"> | |
| 72 <config-set category="Project" config-set-name="{{projectData.projectName }}" route="{{projectTail}}"></config-set> | |
|
Ryan Tseng
2017/06/15 18:55:56
nit: same here, 80 char
ayanaadylova
2017/06/15 21:26:00
Done.
| |
| 73 </div> | |
| 74 | |
| 75 </template> | |
| 76 | |
| 77 <script> | |
| 78 Polymer({ | |
|
seanmccullough1
2017/06/15 19:50:01
IIUC you can use native ES6 classes instead of the
ayanaadylova
2017/06/15 21:26:00
Acknowledged.
| |
| 79 is: 'config-ui', | |
| 80 | |
| 81 ready: function() { | |
| 82 this.async(function() { | |
| 83 // If the path is blank, redirect to / | |
| 84 if (!this.route.path) { | |
| 85 this.set('route.path', '/'); | |
| 86 } | |
| 87 }); | |
| 88 }, | |
| 89 | |
| 90 }); | |
| 91 </script> | |
| 92 </dom-module> | |
| OLD | NEW |