forked from Pancake-CMS/developer-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeveloper-console.html
68 lines (58 loc) · 2.37 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
<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">
<dom-module id="developer-console">
<template>
<style></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"
active="{{templateActive}}"></app-route>
<app-route
route="{{route}}"
pattern="/components"
active="{{componentActive}}"></app-route>
<main>
<authentication-page active$="{{authenticationActive}}" route="{{route}}"></authentication-page>
<template-creator active$="{{templateActive}}"></template-creator>
<component-page active$="{{componentActive}}"></component-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>