|
|
|
@ -12,10 +12,18 @@ export const App = {
@@ -12,10 +12,18 @@ export const App = {
|
|
|
|
|
baseDcId: 2 |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const Modes = { |
|
|
|
|
test: location.search.indexOf('test=1') > 0/* || true */, |
|
|
|
|
debug: location.search.indexOf('debug=1') > 0, |
|
|
|
|
http: false, //location.search.indexOf('http=1') > 0,
|
|
|
|
|
ssl: true, // location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,
|
|
|
|
|
multipleConnections: true |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export type DatabaseStoreName = 'session' | 'stickerSets'; |
|
|
|
|
export type DatabaseStore = Omit<IDBStore, 'name'> & {name: DatabaseStoreName}; |
|
|
|
|
export const Database = { |
|
|
|
|
name: 'tweb', |
|
|
|
|
name: 'tweb' + (Modes.test ? '_test' : ''), |
|
|
|
|
version: 5, |
|
|
|
|
stores: [{ |
|
|
|
|
name: 'session' |
|
|
|
@ -24,13 +32,5 @@ export const Database = {
@@ -24,13 +32,5 @@ export const Database = {
|
|
|
|
|
}] as DatabaseStore[], |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const Modes = { |
|
|
|
|
test: location.search.indexOf('test=1') > 0/* || true */, |
|
|
|
|
debug: location.search.indexOf('debug=1') > 0, |
|
|
|
|
http: false, //location.search.indexOf('http=1') > 0,
|
|
|
|
|
ssl: true, // location.search.indexOf('ssl=1') > 0 || location.protocol == 'https:' && location.search.indexOf('ssl=0') == -1,
|
|
|
|
|
multipleConnections: true |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export const DEBUG = process.env.NODE_ENV != 'production'; |
|
|
|
|
export const DEBUG = process.env.NODE_ENV !== 'production' || Modes.debug; |
|
|
|
|
export const MOUNT_CLASS_TO: any = DEBUG ? (typeof(window) !== 'undefined' ? window : self) : null; |
|
|
|
|