-
Notifications
You must be signed in to change notification settings - Fork 4
/
developer-console.html
129 lines (114 loc) · 4.52 KB
/
developer-console.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<link rel="import" href="./bower_components/polymer/polymer.html">
<link rel="import" href="./bower_components/app-route/app-location.html">
<link rel="import" href="./bower_components/app-route/app-route.html">
<link rel="import" href="./bower_components/polymerfire/firebase-app.html">
<link rel="import" href="./bower_components/iron-selector/iron-selector.html">
<link rel="import" href="./bower_components/authentication-page/authentication-page.html">
<link rel="import" href="./bower_components/template-creator/template-creator.html">
<link rel="import" href="./bower_components/component-page/component-page.html">
<link rel="import" href="./bower_components/page-links/page-links.html">
<link rel="import" href="./bower_components/locales-page/locales-page.html">
<link rel="import" href="./bower_components/page-manager/page-manager.html">
<link rel="import" href="./bower_components/template-manager/template-manager.html">
<link rel="import" href="./bower_components/page-editor/page-editor.html">
<link rel="import" href="./bower_components/approvals-page/approvals-page.html">
<dom-module id="developer-console">
<template>
<style>
:host {
font-family: 'Roboto Condensed', sans-serif;
}
</style>
<firebase-app
auth-domain="__YOUR_AUTH_DOMAIN__"
database-url="__YOUR_DATABASE_URL__"
api-key="__YOUR_API_KEY__">
</firebase-app>
<!-- app-location binds to the app's URL -->
<app-location route="{{route}}" use-hash-as-path></app-location>
<!-- this app-route manages the top-level routes -->
<app-route
route="{{route}}"
pattern="/login"
active="{{authenticationActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/templates/list"
active="{{templateActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/templates/edit"
active="{{templateCreatorActive}}"
tail="{{subroute}}"></app-route>
<app-route
route="{{route}}"
pattern="/components"
active="{{componentActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/locales"
active="{{localesActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/pages/list"
active="{{pageManagerActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/pages/:locale/edit/:name"
data="{{routeData}}"
active="{{pageEditorActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/approvals"
tail="{{subroute}}"
active="{{approvalsPageActive}}"></app-route>
<main>
<authentication-page
active$="{{authenticationActive}}"
route="{{route}}"></authentication-page>
<template-manager
active$="{{templateActive}}"
route="{{route}}"></template-manager>
<template-creator
active$="{{templateCreatorActive}}"
route="{{route}}"
subroute$="{{subroute.path}}"></template-creator>
<component-page
active$="{{componentActive}}"
route="{{route}}"></component-page>
<locales-page
active$="{{localesActive}}"
route="{{route}}"></locales-page>
<page-manager
active$="{{pageManagerActive}}"
route="{{route}}"></page-manager>
<page-editor
active$="{{pageEditorActive}}"
route="{{route}}"
routedata$="{{routeData}}"></page-editor>
<approvals-page
active$="{{approvalsPageActive}}"
tail="{{subroute}}"
route="{{route}}"></approvals-page>
</main>
<template is="dom-if" if="[[!authenticationActive]]">
<page-links></page-links>
</template>
</template>
<script>
Polymer({
is: 'developer-console',
properties: {
authenticationActive: {
type: Boolean,
notify: true
}
},
attached: function() {
if(!this.route.path) {
this.set('route.path', '/login')
}
}
});
</script>
</dom-module>