-
Notifications
You must be signed in to change notification settings - Fork 120
/
index.html
220 lines (190 loc) · 9.35 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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!-- 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">
<title>Polymer Mail</title>
<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="msapplication-TileColor" content="#e51c23">
<meta name="msapplication-tap-highlight" content="no">
<meta name="theme-color" content="#e51c23">
<link rel="icon" sizes="192x192" href="images/gmail.png">
<link rel="manifest" href="manifest.json">
<link rel="stylesheet" href="styles/app.css">
<link rel="import" id="bundle" href="elements/elements.html" async>
</head>
<body class="fullbleed loading">
<!-- Loading screens happen outside of HTML Imports + Polymer so 1st
paint is fast and does not depend on network resources. Mobile gets
a loading splash screen. Desktop the layout/shell of the app. -->
<div id="splash">
<div class="appshell_drawer">
<div class="appshell_drawer_top"></div>
<div class="appshell_drawer_bottom"></div>
</div>
<div class="appshell_main">
<div class="appshell_header"><h1>Inbox</h1></div>
<div class="appshell_content"></div>
</div>
</div>
<template id="t" is="dom-bind">
<template is="dom-if" if="{{syncing}}">
<div id="refresh" class="fit layout vertical center-center">
<div id="refresh-spinner-container" class="layout vertical center-center shrink">
<paper-spinner active></paper-spinner>
</div>
</div>
</template>
<div id="loginscreen" class="layout vertical center-center fit"
hidden="[[_computeHideLogin(isAuthenticated)]]">
<google-signin width="wide" height="tall"
client-id="229000986068-hld1d9ovioamaaur218vg3jg5dgvf2a2.apps.googleusercontent.com"
scopes="https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/gmail.readonly"
on-google-signin-success="onSigninSuccess"
signed-in="{{signedIn}}"></google-signin>
</div>
<material-search id="search" narrow="[[narrow]]"
previous-searches="{{previousSearches}}"
on-search-change="_onSearch" class="fit"></material-search>
<paper-drawer-panel id="drawerPanel" narrow="{{narrow}}">
<paper-header-panel mode="scroll" drawer>
<paper-toolbar id="navheader" class="tall">
<iron-image id="coverimage" placeholder="images/beach.jpg"
src="[[user.cover]]"
sizing="cover" preload fade class="fit"></iron-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>
</paper-toolbar>
<paper-menu selected="0" selectable="paper-icon-item" on-iron-activate="menuSelect">
<paper-icon-item role="menuitem">
<iron-icon icon="inbox" item-icon></iron-icon>Inbox
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="social:people" item-icon></iron-icon>Social
</paper-icon-item>
<div class="separator">All labels</div>
<paper-icon-item role="menuitem">
<iron-icon icon="star" item-icon></iron-icon>Starred
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="send" item-icon></iron-icon>Sent
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="icons:drafts" item-icon></iron-icon>Drafts
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="mail" item-icon></iron-icon>All Mail
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="report" item-icon></iron-icon>Spam
</paper-icon-item>
<paper-icon-item role="menuitem">
<iron-icon icon="delete" item-icon></iron-icon>Trash
</paper-icon-item>
<template is="dom-repeat" items="{{labels}}">
<paper-icon-item class$="{{item.color}}">
<iron-icon icon="label" item-icon></iron-icon><span>{{item.name}}</span>
</paper-icon-item>
</template>
</paper-menu>
<div class="version">@VERSION@</div>
</paper-header-panel>
<paper-scroll-header-panel id="scrollheader" main
keep-condensed-header condenses fixed="{{narrow}}">
<paper-toolbar id="mainheader" class$="[[headerClass]]">
<paper-icon-button icon="arrow-back" class="selected-item" on-tap="deselectAll"></paper-icon-button>
<paper-icon-button id="navicon" icon="menu" paper-drawer-toggle></paper-icon-button>
<div class="flex"></div>
<span class="bottom indent title">{{headerTitle}}</span>
<paper-icon-button icon="refresh" class="fade-on-drawer-open"
on-tap="onRefreshInboxButton"></paper-icon-button>
<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" class="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> -->
</paper-toolbar>
<div class="scroll-content" on-thread-archive="onThreadArchive">
<template is="dom-if" if="[[_computeShowNoResults(threads, syncing)]]">
<span class="layout horizontal center-center fit">No results.</span>
</template>
<!-- TODO: don't pass all messages, users, labels into mail-thread -->
<!-- activate-event="" ensures entire thread isn't selectable. -->
<iron-selector id="threadlist" multi activate-event=""
selected-attribute="selected"
selected-items="{{selectedThreads}}"
on-iron-select="_onThreadSelectChange"
on-iron-deselect="_onThreadSelectChange">
<template is="dom-repeat" items="[[threads]]">
<mail-thread messages="[[item.messages]]"
labels="[[labelMap]]" users="[[users]]"
narrow="[[narrow]]"
on-thread-select="_onThreadTap"
tabindex="0" data-thread-index$="[[index]]"></mail-thread>
</template>
</iron-selector>
</div>
</paper-scroll-header-panel>
</paper-drawer-panel>
<paper-toast id="toast" class="toast layout horizontal justified" duration="7000"></paper-toast>
<paper-toast id="swtoast" class="toast layout horizontal justified" duration="7000"
text="Ready to work offline. Tap to refresh.">
<span on-tap="refreshApp" class="action">Refresh</span>
</paper-toast>
<paper-toast id="arhivedtoast" class="toast layout horizontal justified"
duration="7000" text="{{inboxToastMessage}}"
on-transitionend="_onArchivedToastOpenClose">
<div on-tap="undoAll" class="action">Undo</div>
</paper-toast>
<paper-fab id="fab" icon="create" on-tap="newMail"></paper-fab>
<!-- Cache data requests. -->
<iron-localstorage name="polymer-mail-user" value="{{user}}"></iron-localstorage>
<iron-localstorage name="polymer-mail-labels" value="{{labels}}"></iron-localstorage>
<iron-localstorage name="polymer-mail-threads" value="{{threads}}"
on-iron-localstorage-load-empty="_onCachedThreadsEmpty"></iron-localstorage>
<iron-localstorage name="polymer-mail-users" value="{{users}}"></iron-localstorage>
</template>
<platinum-sw-register skip-waiting clients-claim auto-register>
<platinum-sw-cache default-cache-strategy="networkFirst"></platinum-sw-cache>
<!-- <platinum-sw-cache default-cache-strategy="networkFirst"
precache-file="precache.json"></platinum-sw-cache> -->
<!-- <platinum-sw-fetch origin="https://content\.googleapis\.com"
path="/gmail/v1/users/me/threads(.*)"
handler="networkFirst"></platinum-sw-fetch>
<platinum-sw-fetch origin="https://content\.googleapis\.com"
path="/plus/v1/(.*)"
handler="networkFirst"></platinum-sw-fetch -->
<!-- <platinum-sw-fetch origin="https://content\.googleapis\.com"
path="/plus/v1/people/me"></platinum-sw-fetch> -->
</platinum-sw-register>
<!-- <script src="scripts/polymer_metrics.js"></script> -->
<script src="scripts/bundle.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>