feat: pass web app version to snjs application (#623)
* feat: store web version in local storage * feat: pass web app version to snjs application when creating WebApplication * refactor: pass version in application constructor, remove unnecessary method * refactor: move global variables declarations to separate files to avoid declaring them in all places where they are used * refactor: better way to use global variables * chore: add comment * chore: make global constants pascal case * chore: version bump for snjs * chore: yarn.lock with correct snjs version * chore: bump snjs version
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
declare const __VERSION__: string;
|
||||
declare const __WEB__: boolean;
|
||||
|
||||
import { SNLog } from '@standardnotes/snjs';
|
||||
import angular from 'angular';
|
||||
import { configRoutes } from './routes';
|
||||
@@ -66,6 +63,7 @@ import { NotesOptionsPanelDirective } from './components/NotesOptionsPanel';
|
||||
import { IconDirective } from './components/Icon';
|
||||
import { NoteTagsContainerDirective } from './components/NoteTagsContainer';
|
||||
import { PreferencesDirective } from './preferences';
|
||||
import { AppVersion, IsWebPlatform } from '@/version';
|
||||
|
||||
function reloadHiddenFirefoxTab(): boolean {
|
||||
/**
|
||||
@@ -191,10 +189,10 @@ const startApplication: StartApplication = async function startApplication(
|
||||
});
|
||||
};
|
||||
|
||||
if (__WEB__) {
|
||||
if (IsWebPlatform) {
|
||||
startApplication(
|
||||
(window as any)._default_sync_server,
|
||||
new BrowserBridge(__VERSION__),
|
||||
new BrowserBridge(AppVersion),
|
||||
(window as any)._websocket_url,
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user