-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
169 lines (133 loc) · 6.21 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="description" content="WebID Instant Message">
<meta name="author" content="Melvin Carvalho">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<title>WebID IM</title>
<link rel="icon" sizes="192x192" href="images/app-icon-192.png">
<link rel="icon" sizes="128x128" href="images/app-icon-128.png">
<link rel="apple-touch-icon" sizes="128x128" href="images/app-icon-128.png">
<link rel="apple-touch-icon-precomposed" sizes="128x128" href="images/app-icon-128.png">
<!-- Polymer -->
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<script src="bower_components/dexie/dist/latest/Dexie.js"></script>
<link rel="import" href="bower_components/core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="bower_components/core-collapse/core-collapse.html" >
<link rel="import" href="bower_components/core-item/core-item.html">
<link rel="import" href="bower_components/core-scaffold/core-scaffold.html">
<link rel="import" href="bower_components/paper-action-dialog/paper-action-dialog.html">
<link rel="import" href="bower_components/paper-dialog/paper-dialog.html">
<link rel="import" href="bower_components/paper-dropdown/paper-dropdown.html">
<link rel="import" href="bower_components/paper-fab/paper-fab.html">
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="bower_components/paper-input/paper-input.html">
<link rel="import" href="x-chat-list.html">
<link rel="import" href="x-friend-list.html">
<link rel="import" href="login.html">
<link rel="stylesheet" href="css/style.css">
<script src="app/vendor/reconnecting-websocket.min.js"></script>
<script src="app/vendor/sha256.js"></script>
<script src="app/vendor/jquery-2.1.3.min.js"></script>
<script src="app/vendor/rdflib.js/rdflib.js"></script>
<script src="app/vendor/howler.min.js"></script>
<script src="app/vendor/common.js"></script>
<script src="app/app.js"></script>
</head>
<body unresolved fullbleed>
<template is="auto-binding">
<core-scaffold>
<!-- sidebar -->
<core-header-panel navigation flex>
<!-- avatar -->
<core-toolbar id="navheader" class="tall">
<div class="middle avatar {{color}}" style="background-image: url({{avatar}})"></div>
<div class="bottom uuid">{{name}}</div>
</core-toolbar>
<!-- end avatar -->
<!-- sidebar content -->
<section layout vertical id="onlineList">
<template if={{ui.friends}}>
<core-collapse id="storage">
</core-collapse>
</template>
<template if={{chat}}>
<template if={{ui.chat}}>
<section layout vertical>
<core-collapse opened="true" id="roster">
<template repeat="{{friend in friends}}">
<x-friend-list id={{friend['@id']}} unread={{friend.unread}} webid="{{friend.webid}}" type="{{friend.type}}" ldpc="{{friend.ldpc}}" lastActive="{{friend.lastActive}}" uri="{{friend.uri}}" img="{{friend.img}}" color="{{friend.color}}" avatar="{{friend.avatar}}" username="{{friend.name}}" text="{{friend.text}}" status="{{friend.status}}" timestamp="{{friend.timestamp}}"></x-friend-list>
</template>
</core-collapse>
</section>
<section layout vertical>
<core-collapse id="dates">
<template repeat="{{date in settings.dates}}">
<div id="{{date}}" on-tap={{renderDate}} class="date">{{date}}</div>
</template>
</core-collapse>
</section>
</template>
</template>
</section>
<!-- end sidebar content -->
</core-header-panel>
<!-- end sidebar -->
<!-- main -->
<div tool layout horizontal flex>
<!-- header -->
<template if={{chat}}>
<core-icon id="back" icon="chevron-left"></core-icon>
</template>
<span id="title" flex>{{title}}</span>
<template if={{chat}}>
<core-icon onclick="document.getElementById('dates').toggle() ; document.getElementById('roster').toggle() " icon="view-list"></core-icon>
</template>
<template if={{ui.friends}}>
<core-icon onclick="document.getElementById('storage').toggle()" icon="folder"></core-icon>
</template>
<core-icon on-tap={{refresh}} id="refresh" icon="refresh"></core-icon>
<core-icon on-tap={{modal}} id="settings" icon="settings"></core-icon>
<!-- end header -->
</div>
<!-- body -->
<section layout vertical fit id="friends">
<template if={{ui.friends}}>
<div flex class="chat-list">
<template repeat="{{friend in friends}}">
<x-friend-list id={{friend['@id']}} unread={{friend.unread}} webid="{{friend.webid}}" type="{{friend.type}}" ldpc="{{friend.ldpc}}" lastActive="{{friend.lastActive}}" uri="{{friend.uri}}" img="{{friend.img}}" color="{{friend.color}}" avatar="{{friend.avatar}}" username="{{friend.name}}" text="{{friend.text}}" status="{{friend.status}}" timestamp="{{friend.timestamp}}"></x-friend-list>
</template>
</div>
<template if={{new}}>
<webid-login id="webid-login"></webid-login>
</template>
</template>
<template if={{chat}}>
<div id="scroll" flex class="post-list">
<template repeat="{{post in posts}}">
<x-chat-list on-like-tap="handleLike" viewer="{{post.viewer}}" webid="{{post.webid}}" like="{{post.like}}" uri="{{post.uri}}" img="{{post.img}}" color="{{post.color}}" avatar="{{post.avatar}}" username="{{post.name}}" text="{{post.text}}" status="{{post.status}}" timestamp="{{post.timestamp}}" video="{{post.video}}" audio="{{post.audio}}"></x-chat-list>
</template>
</div>
<template if={{show}}>
<div class="shim"></div>
<div class="send-message" layout horizontal>
<paper-input flex label="Type message..." id="input" value="{{input}}" on-keyup="{{checkKey}}"></paper-input>
<paper-fab icon="send" id="sendButton" on-tap="{{sendMyMessage}}"></paper-fab>
</div>
</template>
</template>
</section>
<!-- end body -->
<paper-dialog id="modal">
<h3>Settings</h3>
<pre>{{printSettings}}</pre>
<paper-button on-tap={{modal}} affirmative autofocus>Close</paper-button>
</paper-dialog>
</core-scaffold>
</template>
</body>
</html>