start adding push notifications
This commit is contained in:
@@ -5,7 +5,7 @@ Single-page web chat application built with [Tinode](https://github.com/tinode/c
|
||||
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 very small: all in all less than 150KB minified and gzipped. That includes React, ReactDOM, fonts, graphics, css etc.
|
||||
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).
|
||||
|
||||
|
||||
+7
-2
@@ -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">
|
||||
@@ -32,7 +32,11 @@
|
||||
<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>
|
||||
<!-- 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>
|
||||
@@ -42,6 +46,7 @@
|
||||
<!-- core tinode libraries -->
|
||||
<script src="src/drafty.js"></script>
|
||||
<script src="src/tinode.js"></script>
|
||||
<script src="src/firebase-push.js"></script>
|
||||
<!-- the application -->
|
||||
<script type="text/babel" src="src/webapp.jsx"></script>
|
||||
<script type="text/babel">
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"short_name": "Tinode chat",
|
||||
"name": "Tinode chat",
|
||||
"name": "Tinode Web chat",
|
||||
"icons": [
|
||||
{
|
||||
"src":"img/logo96.png",
|
||||
@@ -21,5 +21,6 @@
|
||||
"start_url": "/",
|
||||
"background_color": "silver",
|
||||
"theme_color": "#3949AB",
|
||||
"display": "standalone"
|
||||
"display": "standalone",
|
||||
"gcm_sender_id": "103953800507"
|
||||
}
|
||||
|
||||
+2
-3
@@ -4209,14 +4209,13 @@ class SendMessage extends React.PureComponent {
|
||||
/* This is just a static page to display when no conversation is selected. */
|
||||
class LogoView extends React.PureComponent {
|
||||
render() {
|
||||
var version = APP_NAME + " (" + Tinode.getLibrary() + "-" +
|
||||
(new Date(document.lastModified)).toISOString() + ")";
|
||||
var version = APP_NAME + " (" + Tinode.getLibrary() + ")";
|
||||
return (
|
||||
<div id="dummy-view" className={this.props.hideSelf ? 'nodisplay' : null}>
|
||||
<div>
|
||||
<a href="https://github.com/tinode/chat/">
|
||||
<img id="logo" alt="logo" src="img/logo.svg" />
|
||||
<h2>Tinode Demo Chat</h2>
|
||||
<h2>Tinode Web</h2>
|
||||
</a>
|
||||
<p>Client: {version}</p>
|
||||
<p>Server: {this.props.serverVersion} ({this.props.serverAddress})</p>
|
||||
|
||||
Reference in New Issue
Block a user