mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
use version browser api in help
This commit is contained in:
parent
8ad36e4740
commit
1e11a89fc2
@ -63,7 +63,7 @@ export default class BrowserApi {
|
||||
}
|
||||
}
|
||||
|
||||
static getApplicationVersion(): any {
|
||||
static getApplicationVersion(): string {
|
||||
if (BrowserApi.isChromeApi) {
|
||||
return chrome.runtime.getManifest().version;
|
||||
} else if (BrowserApi.isSafariApi) {
|
||||
|
@ -1,5 +1,7 @@
|
||||
import * as template from './about.component.html';
|
||||
|
||||
import BrowserApi from '../../../browser/browserApi';
|
||||
|
||||
export class AboutController {
|
||||
version: string;
|
||||
year: number;
|
||||
@ -8,7 +10,7 @@ export class AboutController {
|
||||
constructor(private i18nService: any) {
|
||||
this.i18n = i18nService;
|
||||
this.year = (new Date()).getFullYear();
|
||||
this.version = chrome.runtime.getManifest().version;
|
||||
this.version = BrowserApi.getApplicationVersion();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ export default class Analytics {
|
||||
private gaFunc: Function = null;
|
||||
private win: any;
|
||||
private isBackground: boolean = false;
|
||||
private appVersion: string = BrowserApi.getApplicationVersion();
|
||||
|
||||
constructor(win: Window) {
|
||||
const bgPage = BrowserApi.getBackgroundPage();
|
||||
@ -70,7 +71,7 @@ export default class Analytics {
|
||||
return;
|
||||
}
|
||||
|
||||
const version = encodeURIComponent(BrowserApi.getApplicationVersion());
|
||||
const version = encodeURIComponent(this.appVersion);
|
||||
let message = 'v=1&tid=' + this.gaTrackingId + '&cid=' + gaAnonAppId + '&cd1=' + version;
|
||||
|
||||
if (param1 === 'pageview' && param2) {
|
||||
|
Loading…
Reference in New Issue
Block a user