Compare commits

...
59 Commits
Author SHA1 Message Date
or-else c567a2678a push notifications seem to work in FF and Chrome 2018-09-19 17:38:30 +03:00
or-else 242b30cee0 adding firebase messaging 2018-09-19 11:57:57 +03:00
or-else 6c9baf3cba merged from devel 2018-09-18 19:37:36 +03:00
or-else 534a2fded7 simplified version reporting, bump version 2018-09-18 19:35:41 +03:00
or-else 2fc6bebacc incorrect type of "private" in new topics 2018-09-18 16:47:46 +03:00
or-else e761c5e0f6 simplify version reporting 2018-09-18 09:57:10 +03:00
or-else 1a00f4b844 bump version 2018-09-18 09:29:40 +03:00
or-else ab7a049512 rebuild generated files 2018-09-17 19:12:12 +03:00
or-else bffa6eb6ce add missing react-dom requirement 2018-09-17 19:11:08 +03:00
or-else cefde649ba add missing react-dom requirement 2018-09-17 19:10:51 +03:00
or-else 89c41818f0 Merge branch 'devel' into push 2018-09-17 16:29:21 +03:00
or-else f53cef6262 rename the app 2018-09-17 10:03:46 +03:00
or-else 3064c0ec2a start adding push notifications 2018-09-16 20:20:22 +03:00
or-else 1e268b3eae replace buggy tinify with uglify-es 2018-09-16 15:04:20 +03:00
or-else 7228053261 remove demo login and password hints from the login screen 2018-09-16 10:15:16 +03:00
or-else d6d9340304 rebuilding again without the prepublish 2018-09-14 16:21:17 +03:00
or-else 2bf4a0fe1f mention the app size 2018-09-14 16:18:42 +03:00
or-else f9725cb06a package TinoeWeb as npm module 2018-09-14 16:13:41 +03:00
or-else 3c20bcf6f2 fixes for various UI bugs 2018-09-13 17:10:11 +03:00
or-else 03db847d48 last fix for the attachments, bump version 2018-09-12 17:19:11 +03:00
or-else 8b71444341 fix class name 2018-09-11 20:47:05 +03:00
or-else ce20a86072 fix react-js warnings 2018-09-11 20:44:21 +03:00
or-else c768755ae4 fix for issues/17 2018-09-11 16:55:30 +03:00
or-else ef3d799411 merge chat list and found contacts 2018-09-11 15:42:05 +03:00
or-else 0ba4b85a91 Merge branch 'master' of https://github.com/tinode/webapp into repackage 2018-09-11 15:39:57 +03:00
Gene ad016b2a8e Merge pull request #18 from maksfreetimer/patch-1
GroupManager methods fix
2018-09-11 15:39:30 +03:00
Max 18c7a82ce6 GroupManager methods fix
"selectedContacts" method seems to be called statically, otherwise "handleContactSelected" & "handleMemberRemoved" methods throw an exception
2018-09-11 15:04:41 +03:00
or-else dd9fd8e345 bug due to a typo 2018-09-09 11:46:57 +03:00
or-else 1318f399e6 typo in comment 2018-09-09 10:40:05 +03:00
or-else 6ed768cacc refactoring completed 2018-09-08 21:17:18 +03:00
or-else 7d01356be7 moving contact management to <TinodeWeb /> 2018-09-08 19:51:50 +03:00
or-else 72e51b65a2 remove debug logging 2018-09-07 09:54:10 +03:00
or-else b282f789fb replacing global Tinode object with TindeWeb's state object 2018-09-06 20:55:39 +03:00
or-else a578e27c82 refactor context menu 2018-09-06 12:00:01 +03:00
or-else e23b3172c9 start tracking generated files 2018-09-05 18:58:12 +03:00
or-else 5e0713fb3e partially updated Tinode from a global object to a state one 2018-09-05 18:56:01 +03:00
or-else aafa0f74d5 trying to package the webapp 2018-09-04 19:28:46 +03:00
or-else 40000cfa44 try to make this work for both devel and prod 2018-09-04 16:37:55 +03:00
or-else 3865eb8928 Merge branch 'devel' into repackage 2018-09-04 16:27:17 +03:00
or-else 7bf26a55be desktop -> notification alearts 2018-09-04 16:26:53 +03:00
or-else 15e5dacc51 adding desktop alerts, React and js updates 2018-09-04 16:20:34 +03:00
or-else 2de87accf5 start using onAllMessagesReceived 2018-09-04 12:44:52 +03:00
or-else 78764319c0 0.15.5 2018-09-03 12:20:28 +03:00
or-else cf86af1284 change prompt wording on validation code 2018-09-02 14:32:28 +03:00
or-else 22c86747a1 update version 2018-09-01 14:25:36 +03:00
or-else 39b18ff6dd generated files updated 2018-08-28 09:35:41 +03:00
or-else f833ec6960 correct error reporting on credential validation 2018-08-28 09:32:14 +03:00
or-else cb4a0655a3 bump version 2018-08-27 14:33:45 +03:00
or-else 8354d921f3 bump version 2018-08-25 16:49:35 +03:00
or-else d178803d86 rebuilt derived files 2018-08-25 16:48:40 +03:00
or-else 4aadff8ab3 message sounds, fix in searching for contacts 2018-08-25 16:43:27 +03:00
or-else cf849d6412 rearranging files 2018-08-24 16:00:07 +03:00
or-else 5c4429858b adding explicit dependencies on tinode-sdk 2018-08-24 14:25:55 +03:00
or-else 996dad96c1 minified 2018-08-21 14:58:40 +03:00
or-else 55c08373d0 making credential verification work better 2018-08-21 14:58:09 +03:00
or-else aca9286d63 if a png image is too big even after scaling, convert it to jpeg 2018-08-21 11:53:03 +03:00
or-else c7325e3c25 change var to const where appropriate 2018-08-21 10:08:25 +03:00
or-else 61b3bcbb4f corrected start_url 2018-08-21 09:33:22 +03:00
or-else 758b5b54cf changes to message deletion and inband image size 2018-08-20 18:51:37 +03:00
14 changed files with 27513 additions and 745 deletions
+12 -5
View File
@@ -2,18 +2,25 @@
Single-page web chat application built with [Tinode](https://github.com/tinode/chat/). The app uses
[React](https://facebook.github.io/react/), Google's material design [fonts](https://www.google.com/fonts/)
and [icons](https://google.github.io/material-design-icons/#icon-font-for-the-web). The [Tinode javascript library](https://github.com/tinode/tinode-js/) has no external dependencies. Overall it's a lot like open source WhatsApp or Telegram web apps.
and [icons](https://google.github.io/material-design-icons/#icon-font-for-the-web). The [Tinode javascript SDK](https://github.com/tinode/tinode-js/) has no external dependencies.
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).
Try possibly newer or older version live at https://api.tinode.co/. Login as one of `alice`, `bob`, `carol`, `dave`, `frank`. Password is `<login>123`, e.g. password for `alice` is `alice123`. You can discover other users by email or phone by prefixing them with `email:` or `tel:` respectively. Emails are `<login>@example.com`, e.g. `alice@example.com`, phones are `17025550001` through `17025550009`. The demo is reset every night at 2:15am Pacific time.
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).
License: [Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0)
Sample avatar photos from https://www.pexels.com/ under [CC0 license](https://www.pexels.com/photo-license/).
Demo avatar photos are from https://www.pexels.com/ under [CC0 license](https://www.pexels.com/photo-license/).
Background pattern from http://subtlepatterns.com/, commercial and non-commercial use allowed with attribution.
## Getting support
* Read [client-side](http://tinode.github.io/js-api/) and [server-side](https://github.com/tinode/chat/blob/master/docs/API.md) API documentation.
* For support, general questions, discussions post to [https://groups.google.com/d/forum/tinode](https://groups.google.com/d/forum/tinode).
* For bugs and feature requests [open an issue](https://github.com/tinode/webchat/issues/new).
## Missing functionality
* Previews not generated for videos, audio, links or docs.
BIN
View File
Binary file not shown.
+8 -7
View File
@@ -1164,15 +1164,15 @@ i.search {
margin-right: 0.8rem;
}
.chat-box .bubble p {
.chat-box .bubble div.message-content {
color: #212121;
margin: 0;
max-width: 36rem;
overflow-wrap: break-word;
}
/* The timestamp is a floating element. Need to ensure p is expanded
/* The timestamp is a floating element. Need to ensure div.message-content is expanded
* to accomodate it. It's usually called clearfix. */
.chat-box .bubble p:after {
.chat-box .bubble div.message-content:after {
content: ".";
display: block;
height: 0;
@@ -1339,14 +1339,15 @@ ul.tabbar > li {
ul.tabbar > li > a {
position: relative;
padding-top: 0.75rem;
text-decoration: none;
text-transform: uppercase;
padding-left: 1rem;
padding-right: 1rem;
display: block;
min-width: 6rem;
text-align: center;
line-height: 2rem;
font-weight: 400;
font-size: 1.1rem;
font-size: 1.3rem;
font-variant: small-caps;
text-decoration: none;
color: rgba(33,150,243,0.6);
overflow: hidden;
box-shadow: inset 0 -2px 2.5px -1px rgba(0,0,0,0.25);
+1 -1
View File
File diff suppressed because one or more lines are too long
+23 -9
View File
@@ -9,8 +9,8 @@
<title>Tinode</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="application-name" content="Tinode">
<meta name="description" content="Instant messenger">
<meta name="application-name" content="TinodeWeb">
<meta name="description" content="Tinode instant messenger">
<meta name="application-url" content="https://api.tinode.co/">
<!-- Browser styling for Chrome, FF, Opera -->
<meta name="theme-color" content="#3949AB">
@@ -28,17 +28,31 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<!-- Styles for local elements -->
<link rel="stylesheet" href="css/base.css" />
<!-- ReactJs scripts -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<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>
<!-- core tinode library -->
<script src="tinode.js"></script>
<!-- the application -->
<script type="text/babel" src="index.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>
</head>
<body>
<div id="mountPoint"></div>
<script>
// Shim to imitate modules.
var module = {};
</script>
<!-- core tinode libraries -->
<script src="src/drafty.js"></script>
<script src="src/tinode.js"></script>
<!-- the application -->
<script type="text/babel" src="src/webapp.jsx"></script>
<script type="text/babel">
ReactDOM.render(
<TinodeWeb />,
document.getElementById('mountPoint')
);
</script>
</body>
</html>
+3 -9
View File
@@ -4,8 +4,8 @@
<title>Tinode</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="application-name" content="Tinode">
<meta name="description" content="Instant messaging">
<meta name="application-name" content="TinodeWeb">
<meta name="description" content="Tinode instant messaging">
<meta name="application-url" content="https://api.tinode.co/">
<!-- Browser styling for Chrome, FF, Opera -->
<meta name="theme-color" content="#3949AB">
@@ -23,15 +23,9 @@
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<!-- Styles for local elements -->
<link rel="stylesheet" href="css/base.min.css" />
<!-- ReactJs scripts -->
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<!-- core tinode library -->
<script src="tinode.js"></script>
</head>
<body>
<div id="mountPoint"></div>
<script src="index.min.js"></script>
<script src="umd/index.prod.js"></script>
</body>
</html>
-1
View File
File diff suppressed because one or more lines are too long
+4 -3
View File
@@ -1,6 +1,6 @@
{
"short_name": "Tinode chat",
"name": "Tinode chat",
"name": "Tinode Web chat",
"icons": [
{
"src":"img/logo96.png",
@@ -18,8 +18,9 @@
"sizes": "512x512"
}
],
"start_url": "/x/example-react-js/",
"start_url": "/",
"background_color": "silver",
"theme_color": "#3949AB",
"display": "standalone"
"display": "standalone",
"gcm_sender_id": "103953800507"
}
+22 -11
View File
@@ -1,26 +1,31 @@
{
"name": "tinode-webapp",
"description": "Tinode Web Client",
"version": "0.15.5-rc2",
"description": "Tinode messenger for the web",
"version": "0.15.6-rc4",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-minify": "^0.4.3",
"babel-preset-env": "^1.7.0",
"babel-preset-minify": "^0.4.3",
"babel-preset-react": "^6.24.1",
"cssnano": "^4.0.5"
"cssnano": "^4.0.5",
"uglify-es": "^3.3.9"
},
"repository": {
"type": "git",
"url": "https://github.com/tinode/example-react-js.git"
},
"scripts": {
"build": "npm run build:js && npm run build:css",
"build:js": "babel ./index.js --presets react,minify --out-file ./index.min.js",
"build": "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:css": "postcss css/base.css > css/base.min.css",
"babel-version": "babel --version"
"vers": "echo \"{\\\"version\\\": \\\"`node -p -e \"require('./package.json').version\"`\\\"}\" > version.json"
},
"files": [
"src/index.js",
"src/webapp.jsx",
"umd/index.prod.js",
"umd/index.dev.js",
"audio/msg.mp3",
"css/base.css",
"css/base.min.css",
@@ -49,11 +54,17 @@
"react",
"web"
],
"main": "index.js",
"main": "umd/index.prod.js",
"bugs": {
"url": "https://github.com/tinode/example-react-js/issues"
},
"homepage": "https://github.com/tinode/chat",
"email": "gene@tinode.co",
"license": "Apache-2.0"
"email": "info@tinode.co",
"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"
}
}
+23
View File
@@ -0,0 +1,23 @@
// Must be located at the root.
'use strict';
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.messaging().setBackgroundMessageHandler(function(payload) {
let title = payload.notification.title || "New message";
let options = {
body: payload.notification.body || "",
icon: '/img/logo96.png'
};
return self.registration.showNotification(title, options);
});
+11
View File
@@ -0,0 +1,11 @@
// Put all packages together.
// Used to generate umd/index.prod.js
var React = require('react');
var ReactDOM = require('react-dom');
var TinodeWeb = require('./webapp.js');
ReactDOM.render(
React.createElement(TinodeWeb, null),
document.getElementById('mountPoint')
);
File diff suppressed because it is too large Load Diff
+26422
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long