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