forked from ebidel/polymer-gmail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
170 lines (143 loc) · 7.4 KB
/
index.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<!-- Author: Eric Bidelman <@ebidel> -->
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Fallback for manifest.json add to homescreen (Chrome Android) -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#e51c23">
<meta name="theme-color" content="#e51c23">
<meta name="msapplication-TileColor" content="#e51c23">
<meta name="msapplication-tap-highlight" content="no">
<title>Polymer Mail</title>
<link rel="manifest" href="manifest.json">
<!-- Note: webcomponent.js is only needed in non-Chrome 36 browsers. Included here for portability. -->
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="vulcanized.html">
<link rel="stylesheet" href="app.css" shim-shadowdom>
<link rel="icon" sizes="192x192" href="images/gmail.png">
</head>
<body unresolved fullbleed>
<core-style id="navheaderstyle">
#navheader::after {
/* causes console warning for incorrect mimetype */
background-image: url({{coverImg}});
}
</core-style>
<template id="t" is="auto-binding">
<core-style ref="navheaderstyle"></core-style>
<core-style ref="labelcolors"></core-style>
<div id="loginscreen" layout vertical center-center fit
class="{{ {show: !isAuthenticated} | tokenList }}">
<google-signin width="wide" height="tall"
clientId="229000986068-hld1d9ovioamaaur218vg3jg5dgvf2a2.apps.googleusercontent.com"
scopes="profile email https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/gmail.modify"
on-google-signin-success="{{onSigninSuccess}}"
on-google-signin-failure="{{onSigninFailure}}"></google-signin>
</div>
<material-search id="search" narrow="{{narrow}}"
previousSearches="{{previousSearches}}"></material-search>
<core-drawer-panel id="drawerPanel" narrow="{{narrow}}">
<core-header-panel mode="scroll" drawer>
<core-toolbar id="navheader" class="tall">
<!-- <core-image src="{{user.cover}}" sizing="cover" preload fade
style="width:400px; height:400px; background-color:#c41411;">
</core-image> -->
<img class="middle profile" src="{{user.profile}}" hidden?="{{!user.profile}}">
<div class="bottom" layout vertical>
<span>{{user.name}}</span>
<span>{{user.email}}</span>
</div>
</core-toolbar>
<core-menu selected="0" excludedLocalNames="div" on-core-select="{{menuSelect}}">
<paper-item><core-icon icon="inbox"></core-icon>Inbox</paper-item>
<paper-item><core-icon icon="social:people"></core-icon>Social</paper-item>
<div class="separator">All labels</div>
<paper-item><core-icon icon="star"></core-icon>Starred</paper-item>
<paper-item><core-icon icon="send"></core-icon>Sent</paper-item>
<paper-item><core-icon icon="mail"></core-icon>All Mail</paper-item>
<paper-item><core-icon icon="report"></core-icon>Spam</paper-item>
<paper-item><core-icon icon="delete"></core-icon>Trash</paper-item>
<template repeat="{{l in labels}}">
<paper-item class="{{l.color}}"><core-icon icon="label"></core-icon>{{l.name}}</paper-item>
</template>
</core-menu>
</core-header-panel>
<core-scroll-header-panel id="scrollheader" main condenses="{{!narrow}}" keepCondensedHeader fixed?="{{narrow}}" on-trackstart="{{onRefreshStart}}" on-tracky="{{onMainAreaTrack}}" on-trackend="{{onRefreshUp}}">
<core-toolbar id="mainheader" class="{{ {tall: !narrow, 'core-narrow': narrow, 'selected-threads': selectedThreads.length} | tokenList }}">
<paper-icon-button icon="arrow-back" class="selected-item" on-tap="{{deselectAll}}"></paper-icon-button>
<paper-icon-button id="navicon" icon="menu" core-drawer-toggle></paper-icon-button>
<div flex></div>
<span class="bottom indent title">
{{selectedThreads.length ? selectedThreads.length : 'Inbox'}}
</span>
<paper-icon-button icon="search" class="fade-on-drawer-open" on-tap="{{toggleSearch}}"></paper-icon-button>
<paper-icon-button icon="archive" class="selected-item" on-tap="{{archiveAll}}"></paper-icon-button>
<paper-icon-button icon="delete" class="selected-item"></paper-icon-button>
<paper-icon-button icon="mail" class="selected-item"></paper-icon-button>
<paper-menu-button class="selected-item" layout horizontal>
<paper-icon-button icon="more-vert"></paper-icon-button>
<paper-dropdown class="dropdown" halign="right">
<paper-item>Move to</paper-item>
<paper-item>Change labels</paper-item>
<paper-item>Add star</paper-item>
<paper-item>Mark not important</paper-item>
<paper-item>Mute</paper-item>
<paper-item>Report spam</paper-item>
<paper-item>Report phishing</paper-item>
</paper-dropdown>
</paper-menu-button>
<div id="refresh" class="bottom fit"
layout horizontal center-center on-transitionend="{{onRefreshTransitionEnd}}">
<div class="paper-shadow-bottom-z-1">
<paper-spinner id="refreshspinner"></paper-spinner>
</div>
</div>
</core-toolbar>
<div content on-thread-archive="{{onThreadArchive}}">
<template if="{{!threads.length && isAuthenticated}}">
<div layout vertical center-center style="height:100%">
<paper-spinner active></paper-spinner>
</div>
</template>
<!--<core-list data="{{data}}" height="80">-->
<!-- TODO: don't pass all messages, users, labels into mail-thread -->
<core-selector id="threadlist" multi selectedAttribute="selected"
selected="{{selectedThreads}}">
<template repeat="{{t, i in threads}}">
<mail-thread messages="{{t.messages}}"
labels="{{labelMap}}" users="{{users}}"
narrow="{{narrow}}"
on-transitionend="{{onTransitionEnd}}"
touch-action="{{touchAction}}"></mail-thread>
</template>
</core-selector>
<!--</core-list>-->
</div>
</core-scroll-header-panel>
</core-drawer-panel>
<paper-toast id="toast" duration="10000" swipeDisabled
text="{{toastMessage}}" opened="{{toastOpened}}"
on-core-overlay-open="{{onToastOpenClose}}">
<div on-tap="{{undoAll}}">Undo</div>
</paper-toast>
<paper-fab id="fab" icon="create" on-tap="{{newMail}}"></paper-fab>
<!-- Cache data requests. -->
<!--<core-localstorage name="polymer-mail-user" value="{{user}}"></core-localstorage>-->
<!--<core-localstorage name="polymer-mail-labels" value="{{labels}}"></core-localstorage>-->
<!--<core-localstorage name="polymer-mail-threads" value="{{threads}}"></core-localstorage>-->
<!--<core-localstorage name="polymer-mail-users" value="{{users}}"></core-localstorage>-->
</template>
<script src="app.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-56540783-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>