Compare commits

...
40 Commits
Author SHA1 Message Date
or-else 37bad29350 upgrade, bump version, and rebuild 2018-10-16 10:43:37 +03:00
or-else 58c29a8248 add missing badge image 2018-10-12 10:27:19 +03:00
or-else cbc3875288 bump version and rebuild 2018-10-11 15:56:19 +03:00
or-else e43e3ffcbc ensure correct sorting even in presence of undefined values 2018-10-11 12:51:55 +03:00
or-else 57ca428a65 add bw badge for mobile pushes 2018-10-11 11:13:08 +03:00
or-else b2ffb626da start groupping notifications + notification click works now 2018-10-10 17:21:57 +03:00
or-else a1cb605f37 update versions and rebuild 2018-10-08 15:48:48 +03:00
or-else c7b2a30f24 crash on error 2018-10-06 13:50:01 +03:00
or-else da24e28a92 start handling MESSAGE_STATUS_FAILED 2018-10-06 12:44:24 +03:00
or-else c52b661c87 check if topic has unsubscribed while processing pending messages 2018-10-06 11:49:34 +03:00
or-else ca212fb038 try re-sending pending messages on reconnect 2018-10-06 11:47:41 +03:00
or-else 44039f9a82 add android asset links verification file 2018-10-04 17:23:16 +03:00
or-else bcee90ef06 correctly reset Tinode object on change in settings 2018-10-04 17:22:37 +03:00
or-else e712bff7b3 correctly re-initialize tinode after logout 2018-10-03 12:48:43 +03:00
or-else 57fa378f4d apply es6 -> es5 transform 2018-10-02 14:17:09 +03:00
or-else 6cbf536fa8 bump version and rebuild 2018-10-01 20:02:00 +03:00
or-else 13f492285e password reset works now 2018-10-01 19:31:50 +03:00
or-else 60968b84c6 cosmetic bugs 2018-09-30 21:43:10 +03:00
or-else 114bfc409f add password entry form 2018-09-30 21:28:28 +03:00
or-else 871a1e5b5b adding ability to reset the password 2018-09-30 14:22:02 +03:00
or-else 7a3212cf36 rebuild with the new firebase 2018-09-29 10:38:20 +03:00
or-else 82dda02b12 update firebase 2018-09-29 10:37:11 +03:00
or-else 76620cc9b5 final fixes for logout crash, bump version and rebuild 2018-09-29 10:10:54 +03:00
or-else dba9500825 reset title and favicon on logout 2018-09-27 20:26:14 +03:00
or-else 62cac29071 dont't crash on logout 2018-09-27 20:10:26 +03:00
or-else 07e095aa9a update dependencies and bump version 2018-09-24 17:15:48 +03:00
or-else c8a47efde2 move firebase credentials to a separate file 2018-09-24 12:37:35 +03:00
or-else 3ad8274ad8 fix for #19 2018-09-23 19:11:03 +03:00
or-else 64219b9343 0.15.6 release 2018-09-23 10:30:33 +03:00
or-else a6fe3e59d4 remove unnecessary css styling 2018-09-23 09:36:23 +03:00
or-else 0231de6086 bump version and regenerate files 2018-09-22 09:55:14 +03:00
or-else 22a2954eb8 0.15.6-rc5 2018-09-22 09:47:06 +03:00
or-else a884f6fea2 add missing comma 2018-09-21 16:49:54 +03:00
or-else 6ac0ad6fbf add missing service worker to package 2018-09-21 16:41:43 +03:00
or-else 15393198be ignore click for the current topic in found contacts 2018-09-21 13:09:59 +03:00
or-else c56c91afce simplify SearchContacts component 2018-09-21 09:56:44 +03:00
or-else 4a66c1ee73 regenerated files 2018-09-20 16:44:43 +03:00
or-else b9bdeeae19 finished up webpush, rearranged settings 2018-09-20 16:42:46 +03:00
or-else c14a2044cd push notifications work now 2018-09-19 17:52:29 +03:00
or-else 72aef53c7e use explicit fb version as in service worker 2018-09-19 17:42:50 +03:00
14 changed files with 18258 additions and 8714 deletions
+25
View File
@@ -0,0 +1,25 @@
[{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "co.tinode.tindroid",
"sha256_cert_fingerprints":
["AA:0A:FF:C4:F3:1F:58:83:F3:8E:69:03:2E:B9:AA:1A:C4:62:65:F1:1E:50:F9:7E:AD:35:56:55:32:B7:1A:C6"]
}
},
{
"relation": ["delegate_permission/common.get_login_creds"],
"target": {
"namespace": "web",
"site": "https://api.tinode.co"
}
},
{
"relation": ["delegate_permission/common.get_login_creds"],
"target": {
"namespace": "android_app",
"package_name": "co.tinode.tindroid",
"sha256_cert_fingerprints":
["AA:0A:FF:C4:F3:1F:58:83:F3:8E:69:03:2E:B9:AA:1A:C4:62:65:F1:1E:50:F9:7E:AD:35:56:55:32:B7:1A:C6"]
}
}]
+1 -2
View File
@@ -7,7 +7,7 @@ Overall it's a lot like open source WhatsApp or Telegram web apps.
The app is about 200KB minified and gzipped. That includes all dependencies (React, ReactDOM), fonts, graphics, css etc.
Although the app is generally usable, keep in mind that this is work in progress. Some bugs probably exist. The app was tested in the latest Chrome & Firefox only. NPM [is available](https://www.npmjs.com/package/tinode-webapp).
Although the app is generally usable, keep in mind that this is work in progress. Some bugs probably exist. The app was tested in the latest Chrome & Firefox only. NPM package is available at https://www.npmjs.com/package/tinode-webapp.
Try possibly newer or older version live at https://api.tinode.co/. For login and other instructions [see here](https://github.com/tinode/chat/#demo).
@@ -24,7 +24,6 @@ Background pattern from http://subtlepatterns.com/, commercial and non-commercia
## Missing functionality
* Previews not generated for videos, audio, links or docs.
* Browser push notifications are not implemented.
* No end-to-end encryption.
* Editing chat permissions is incomplete.
* Emoji support is weak.
+28 -15
View File
@@ -31,11 +31,6 @@ a:focus {
color: #0a6ebd;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
a.red:hover,
a.red:focus {
@@ -180,17 +175,26 @@ textarea {
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
height: 2.5rem;
border-bottom: 1px solid #ccc;
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
transition: all 0.1s ease-in-out;
}
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
width: 100%;
}
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
input[type="password"]:focus,
input[type="search"]:focus {
border-bottom: 1px solid #2196f3;
box-shadow: 0 1px 0 rgba(33, 150, 243, 0.25);
}
@@ -198,10 +202,17 @@ input[type="password"]:focus {
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder,
textarea::placeholder {
color: #bbb;
}
input[type="text"].with-visibility,
input[type="password"].with-visibility {
margin-right:-2rem;
padding-right:2rem;
}
/* Scrollbar styling for Chrome. Firefox does not support scrollbar styling. */
::-webkit-scrollbar {
width: 0.6rem;
@@ -295,6 +306,10 @@ li.right:hover .menuTrigger {
color: #757575;
}
.light-gray {
color: #bbb;
}
.small {
font-size: 90%;
}
@@ -309,6 +324,11 @@ li.right:hover .menuTrigger {
inset 0 -0.25rem 0.25rem -0.25rem rgba(0,0,0,0.15);
}
/* Element which can take focus but shows no outline */
.group-focus {
outline: none;
}
/* END generic text colors */
/* END of basic elements */
@@ -401,7 +421,7 @@ li.right:hover .menuTrigger {
/* Quoted div */
.quoted {
padding-left: 1.5rem;
margin-left: 1.5rem;
}
/* BEGIN InPlaceEdit styles */
@@ -410,7 +430,7 @@ li.right:hover .menuTrigger {
font-family: inherit;
font-size: 1.1rem;
height: 2.5rem;
line-height: 1.5;
line-height: 2.25;
margin: 0.25rem 0.125rem;
width: 100%;
vertical-align: baseline;
@@ -1078,13 +1098,6 @@ i.search {
text-align: left;
border-radius: 0.5rem;
-webkit-border-radius: 0.5rem;
-moz-border-radius: 0.5rem;
/* tested in chrome 47 on mac - performance sucks
-webkit-filter: drop-shadow(0px 1px 1px -1px rgba(0,0,0,0.3));
-filter: drop-shadow(0px 1px 1px -1px rgba(0,0,0,0.3));
*/
}
.chat-box li.single {
+1 -1
View File
File diff suppressed because one or more lines are too long
+9
View File
@@ -0,0 +1,9 @@
// Get these values for your project from the https://console.firebase.google.com/
const FIREBASE_INIT = {
// Project Settings -> Cloud Messaging, "Sender ID".
messagingSenderId: "114126160546",
// Project Settings -> Cloud Messaging -> Web configuration -> Web Push certificates.
// This value IS NOT included in the generated js config you can download from
// the firebase console. It needs to be added separately.
messagingVapidKey: "BOgQVPOMzIMXUpsYGpbVkZoEBc0ifKY_f2kSU5DNDGYI6i6CoKqqxDd7w7PJ3FaGRBgVGJffldETumOx831jl58"
};
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

+3 -2
View File
@@ -33,8 +33,8 @@
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script crossorigin src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<!-- Firebase push notifications. -->
<script crossorigin src="https://unpkg.com/firebase@5/firebase-app.js"></script>
<script crossorigin src="https://unpkg.com/firebase@5/firebase-messaging.js"></script>
<script crossorigin src="https://unpkg.com/firebase@5.5.2/firebase-app.js"></script>
<script crossorigin src="https://unpkg.com/firebase@5.5.2/firebase-messaging.js"></script>
</head>
<body>
@@ -47,6 +47,7 @@
<script src="src/drafty.js"></script>
<script src="src/tinode.js"></script>
<!-- the application -->
<script src="/firebase-init.js"></script>
<script type="text/babel" src="src/webapp.jsx"></script>
<script type="text/babel">
ReactDOM.render(
+1
View File
@@ -26,6 +26,7 @@
</head>
<body>
<div id="mountPoint"></div>
<script src="/firebase-init.js"></script>
<script src="umd/index.prod.js"></script>
</body>
</html>
+10 -6
View File
@@ -1,7 +1,7 @@
{
"name": "tinode-webapp",
"description": "Tinode messenger for the web",
"version": "0.15.6-rc4",
"version": "0.15.7",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-preset-env": "^1.7.0",
@@ -14,10 +14,10 @@
"url": "https://github.com/tinode/example-react-js.git"
},
"scripts": {
"build": "npm run build:babel && npm run build:prod && npm run build:dev && npm run build:css",
"build": "npm run vers && npm run build:babel && npm run build:prod && npm run build:dev && npm run build:css",
"build:prod": "browserify ./src/index.js --standalone Webapp | uglifyjs --compress --mangle > ./umd/index.prod.js",
"build:dev": "browserify ./src/index.js --standalone Webapp > ./umd/index.dev.js",
"build:babel": "babel ./src/webapp.jsx --presets react --out-file ./src/webapp.js",
"build:babel": "babel ./src/webapp.jsx --presets react,env --out-file ./src/webapp.es5.js",
"build:css": "postcss css/base.css > css/base.min.css",
"vers": "echo \"{\\\"version\\\": \\\"`node -p -e \"require('./package.json').version\"`\\\"}\" > version.json"
},
@@ -35,11 +35,14 @@
"img/logo32x32a.png",
"img/logo96.png",
"img/logo192.png",
"img/badge96.png",
"index-dev.html",
"index.html",
"index.js",
"index.min.js",
"manifest.json",
"service-worker.js",
"firebase-init.js",
"web-desktop-2.png",
"web-mob-chat-1.png",
"web-mob-contacts-1.png",
@@ -63,8 +66,9 @@
"author": "Tinode Authors <info@tinode.co>",
"license": "Apache-2.0",
"dependencies": {
"react": "^16.5.1",
"react-dom": "^16.4.2",
"tinode-sdk": "^0.15.6-rc3"
"firebase": "^5.5.4",
"react": "^16.5.2",
"react-dom": "^16.5.2",
"tinode-sdk": "^0.15.7"
}
}
+61 -15
View File
@@ -1,23 +1,69 @@
// Must be located at the root.
'use strict';
importScripts("https://unpkg.com/firebase@5.5.4/firebase-app.js");
importScripts("https://unpkg.com/firebase@5.5.4/firebase-messaging.js");
importScripts("/firebase-init.js")
importScripts("https://unpkg.com/firebase@5.5.0/firebase-app.js");
importScripts("https://unpkg.com/firebase@5.5.0/firebase-messaging.js");
const FIREBASE_PUBLIC_API_KEY = "AIzaSyD6X4ULR-RUsobvs1zZ2bHdJuPz39q2tbQ";
const FIREBASE_SENDER_ID = "114126160546";
firebase.initializeApp({
apiKey: FIREBASE_PUBLIC_API_KEY,
messagingSenderId: FIREBASE_SENDER_ID
});
firebase.initializeApp(FIREBASE_INIT);
// This method shows the notifications.
firebase.messaging().setBackgroundMessageHandler(function(payload) {
let title = payload.notification.title || "New message";
let title = payload.data.title || "New message";
let options = {
body: payload.notification.body || "",
icon: '/img/logo96.png'
body: payload.data.content || "",
icon: '/img/logo96.png',
badge: '/img/badge96.png',
tag: payload.data.topic || undefined,
data: {
topic: payload.data.topic
}
};
return self.registration.showNotification(title, options);
});
// This code handles a click on notification: takes
// the user to the browser tab with the chat or opens a new tab.
self.addEventListener('notificationclick', function(event) {
const notification = event.notification;
notification.close();
const urlHash = '#/' + notification.data.topic;
const promises = self.clients.matchAll({
type: 'window',
includeUncontrolled: true
}).then((windowClients) => {
let matchingClient = null;
let anyClient = null;
for (let i = 0; i < windowClients.length; i++) {
const url = new URL(windowClients[i].url);
if (url.hash.includes(notification.data.topic)) {
matchingClient = windowClients[i];
break;
} else {
anyClient = windowClients[i];
}
}
// Found browser tab with the topic already open.
if (matchingClient) {
return matchingClient.focus();
}
// Found browser tab with Tinode on a different topic,
// navigate to the right topic.
if (anyClient) {
const url = new URL(anyClient.url);
url.hash = '#/' + notification.data.topic;
return anyClient.navigate(url).then(() => { return anyClient.focus(); });
}
// Did not find a Tinode browser tab. Open one.
const url = new URL(self.location.origin);
url.hash = '#/' + notification.data.topic;
return clients.openWindow(url);
});
event.waitUntil(promises);
});
+1 -1
View File
@@ -3,7 +3,7 @@
var React = require('react');
var ReactDOM = require('react-dom');
var TinodeWeb = require('./webapp.js');
var TinodeWeb = require('./webapp.es5.js');
ReactDOM.render(
React.createElement(TinodeWeb, null),
+447 -213
View File
File diff suppressed because it is too large Load Diff
+13911 -4699
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long