a bit of cleanup, better naming of the app cache
This commit is contained in:
+11
-10
@@ -1,7 +1,7 @@
|
||||
import { PACKAGE_VERSION } from './version.js';
|
||||
|
||||
// Name of this application, used in the User-Agent.
|
||||
export const APP_NAME = 'TinodeWeb/' + (PACKAGE_VERSION || '0.16');
|
||||
export const APP_NAME = 'TinodeWeb/' + (PACKAGE_VERSION || '0.17');
|
||||
|
||||
// API key. Use https://github.com/tinode/chat/tree/master/keygen to generate your own
|
||||
export const API_KEY = 'AQEAAAABAAD_rAp4DJh05a1HAwFT3A6K';
|
||||
@@ -22,11 +22,11 @@ export const RECEIVED_DELAY = 500;
|
||||
// Delay before sending a read notification, milliseconds.
|
||||
export const READ_DELAY = 1000;
|
||||
|
||||
// The shortest allowed tag length. Matches the value on the server.
|
||||
// The default shortest allowed tag length. Matches the value on the server.
|
||||
export const MIN_TAG_LENGTH = 2;
|
||||
// The greatest allowed tag length. Matches the value on the server.
|
||||
// The default greatest allowed tag length. Matches the value on the server.
|
||||
export const MAX_TAG_LENGTH = 96;
|
||||
// The maximum number of tags allowed. Matches the value on the server.
|
||||
// The default maximum number of tags allowed. Matches the value on the server.
|
||||
export const MAX_TAG_COUNT = 16;
|
||||
|
||||
// Access mode for P2P subscriptions initiated by the current user.
|
||||
@@ -56,17 +56,18 @@ export const BROKEN_IMAGE_SIZE = 32;
|
||||
export const MESSAGES_PAGE = 24;
|
||||
|
||||
// Default maximum in-band (included directly into the message) attachment size which fits into
|
||||
// a message of 256K in size. The actual binary size of the attachment should be smaller due to
|
||||
// base64 encoding expansion and some overhead, for instance 1024 bytes.
|
||||
// a message of 256K in size. Used when the server-provided value is unavailable. The actual
|
||||
// binary size of the attachment should be smaller due to base64 encoding expansion and some overhead,
|
||||
// for instance 1024 bytes.
|
||||
// Increase this limit to a greater value in production, if desired. Also increase
|
||||
// max_message_size in the server config.
|
||||
export const MAX_INBAND_ATTACHMENT_SIZE = 262144;
|
||||
|
||||
// Absolute maximum attachment size to be used with the server = 8MB. Increase to
|
||||
// something like 100MB in production.
|
||||
// Default absolute maximum attachment size to be used with the server = 8MB.
|
||||
// Used when the server-provided value is unavailable. Increase to something like 100MB in production.
|
||||
export const MAX_EXTERN_ATTACHMENT_SIZE = 1 << 23;
|
||||
|
||||
// Maximum allowed linear dimension of an inline image in pixels. Larer images will be shrunk
|
||||
// Maximum allowed linear dimension (pixels) of an image sent inline. Larger images will be shrunk
|
||||
// to make the larger dimension fit under this size. You may want to adjust it to 1600 or
|
||||
// 2400 for production.
|
||||
export const MAX_IMAGE_DIM = 1024;
|
||||
@@ -85,7 +86,7 @@ export const MAX_TITLE_LENGTH = 60;
|
||||
export const MESSAGE_PREVIEW_LENGTH = 80;
|
||||
|
||||
// Link for "Contact Us".
|
||||
export const LINK_CONTACT_US = 'email:info@tinode.co';
|
||||
export const LINK_CONTACT_US = 'email:support@tinode.co';
|
||||
|
||||
// Link to Privacy Policy.
|
||||
export const LINK_PRIVACY_POLICY = 'https://tinode.co/privacy.html';
|
||||
|
||||
+1
-1
@@ -1,3 +1,3 @@
|
||||
// This is a generated file. Don't edit.
|
||||
|
||||
export const PACKAGE_VERSION = "0.17.0";
|
||||
export const PACKAGE_VERSION = "0.17.1-alpha1";
|
||||
|
||||
@@ -36,16 +36,15 @@ export default class SettingsView extends React.PureComponent {
|
||||
|
||||
render() {
|
||||
const names = {def: "default", ws: "websocket", lp: "long polling"};
|
||||
var transportOptions = [];
|
||||
var instance = this;
|
||||
['def', 'ws', 'lp'].map(function(item) {
|
||||
var id = 'transport-' + item;
|
||||
var name = names[item];
|
||||
const transportOptions = [];
|
||||
['def', 'ws', 'lp'].map((item) => {
|
||||
const id = 'transport-' + item;
|
||||
const name = names[item];
|
||||
transportOptions.push(
|
||||
<li key={item}>
|
||||
<input type="radio" id={id} name="transport-select" value={item}
|
||||
checked={instance.state.transport === item}
|
||||
onChange={instance.handleTransportSelected} />
|
||||
checked={this.state.transport === item}
|
||||
onChange={this.handleTransportSelected} />
|
||||
<label htmlFor={id}>{name}</label>
|
||||
</li>
|
||||
);
|
||||
|
||||
@@ -324,8 +324,8 @@ class TinodeWeb extends React.Component {
|
||||
this.checkForAppUpdate(reg);
|
||||
this.fbPush.useServiceWorker(reg);
|
||||
reg.active.postMessage(JSON.stringify({locale: locale, version: PACKAGE_VERSION}));
|
||||
// Google could not be bothered to mention that
|
||||
// onTokenRefresh is never called.
|
||||
|
||||
// Google could not be bothered to mention that onTokenRefresh is never called.
|
||||
this.fbPush.onTokenRefresh(() => {
|
||||
this.requestPushToken();
|
||||
});
|
||||
|
||||
@@ -157,6 +157,10 @@ function draftyFormatter(style, data, values, key) {
|
||||
el = React.Fragment;
|
||||
break;
|
||||
case 'EX':
|
||||
if (data && data.mime == 'application/json') {
|
||||
// Ignore JSON attachments: they are form response payloads.
|
||||
return null;
|
||||
}
|
||||
el = React.Fragment;
|
||||
values = [<i key="ex" className="material-icons">attachment</i>, formatMessage(messages.drafty_attachment)];
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user