parent
6897b8562c
commit
6acfba4b40
2
jslib
2
jslib
|
@ -1 +1 @@
|
||||||
Subproject commit 0a0cdaa7fdfb7322c73258b270105c8fb6552b99
|
Subproject commit 92df63304029049891a46d575612222fb9b6c325
|
|
@ -1016,11 +1016,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/angular2-toaster/-/angular2-toaster-8.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/angular2-toaster/-/angular2-toaster-8.0.0.tgz",
|
||||||
"integrity": "sha512-MRDswCmhqFLBiot7C7SIq96NyU5aT9pwIVdYgmYJtXHp7N6fXk6QzuMSMhVvK12edUJntgmUft+SZfh45Oq0Wg=="
|
"integrity": "sha512-MRDswCmhqFLBiot7C7SIq96NyU5aT9pwIVdYgmYJtXHp7N6fXk6QzuMSMhVvK12edUJntgmUft+SZfh45Oq0Wg=="
|
||||||
},
|
},
|
||||||
"angulartics2": {
|
|
||||||
"version": "9.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/angulartics2/-/angulartics2-9.1.0.tgz",
|
|
||||||
"integrity": "sha512-RAfHJSHyeRe834e5qCYLtp7fdFuKnz/myFTSVEUZV6nLp4cUotvX8XQhewUEpFv6gkrzJwcuY32JZxstDlNiXQ=="
|
|
||||||
},
|
|
||||||
"ansi-align": {
|
"ansi-align": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz",
|
||||||
|
|
|
@ -305,7 +305,6 @@
|
||||||
"@microsoft/signalr-protocol-msgpack": "3.1.13",
|
"@microsoft/signalr-protocol-msgpack": "3.1.13",
|
||||||
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
|
"@nodert-win10-rs4/windows.security.credentials.ui": "^0.4.4",
|
||||||
"angular2-toaster": "8.0.0",
|
"angular2-toaster": "8.0.0",
|
||||||
"angulartics2": "9.1.0",
|
|
||||||
"big-integer": "1.6.48",
|
"big-integer": "1.6.48",
|
||||||
"browser-hrtime": "^1.1.8",
|
"browser-hrtime": "^1.1.8",
|
||||||
"core-js": "2.6.2",
|
"core-js": "2.6.2",
|
||||||
|
|
|
@ -3,8 +3,6 @@ import {
|
||||||
OnInit,
|
OnInit,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
|
||||||
import { Angulartics2 } from 'angulartics2';
|
|
||||||
import Swal from 'sweetalert2/src/sweetalert2.js';
|
import Swal from 'sweetalert2/src/sweetalert2.js';
|
||||||
|
|
||||||
import { DeviceType } from 'jslib/enums/deviceType';
|
import { DeviceType } from 'jslib/enums/deviceType';
|
||||||
|
@ -66,8 +64,7 @@ export class SettingsComponent implements OnInit {
|
||||||
startToTrayText: string;
|
startToTrayText: string;
|
||||||
startToTrayDescText: string;
|
startToTrayDescText: string;
|
||||||
|
|
||||||
constructor(private analytics: Angulartics2, private toasterService: ToasterService,
|
constructor(private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
||||||
private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
|
||||||
private storageService: StorageService, private vaultTimeoutService: VaultTimeoutService,
|
private storageService: StorageService, private vaultTimeoutService: VaultTimeoutService,
|
||||||
private stateService: StateService, private messagingService: MessagingService,
|
private stateService: StateService, private messagingService: MessagingService,
|
||||||
private userService: UserService, private cryptoService: CryptoService) {
|
private userService: UserService, private cryptoService: CryptoService) {
|
||||||
|
@ -267,12 +264,10 @@ export class SettingsComponent implements OnInit {
|
||||||
await this.storageService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
await this.storageService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
||||||
await this.stateService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
await this.stateService.save(ConstantsService.disableFaviconKey, this.disableFavicons);
|
||||||
this.messagingService.send('refreshCiphers');
|
this.messagingService.send('refreshCiphers');
|
||||||
this.callAnalytics('Favicons', !this.disableFavicons);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveMinToTray() {
|
async saveMinToTray() {
|
||||||
await this.storageService.save(ElectronConstants.enableMinimizeToTrayKey, this.enableMinToTray);
|
await this.storageService.save(ElectronConstants.enableMinimizeToTrayKey, this.enableMinToTray);
|
||||||
this.callAnalytics('MinimizeToTray', this.enableMinToTray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveCloseToTray() {
|
async saveCloseToTray() {
|
||||||
|
@ -282,7 +277,6 @@ export class SettingsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
||||||
this.callAnalytics('CloseToTray', this.enableCloseToTray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveTray() {
|
async saveTray() {
|
||||||
|
@ -304,7 +298,6 @@ export class SettingsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||||
this.callAnalytics('Tray', this.enableTray);
|
|
||||||
this.messagingService.send(this.enableTray ? 'showTray' : 'removeTray');
|
this.messagingService.send(this.enableTray ? 'showTray' : 'removeTray');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,30 +308,23 @@ export class SettingsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
|
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
|
||||||
this.callAnalytics('StartToTray', this.startToTray);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveLocale() {
|
async saveLocale() {
|
||||||
await this.storageService.save(ConstantsService.localeKey, this.locale);
|
await this.storageService.save(ConstantsService.localeKey, this.locale);
|
||||||
this.analytics.eventTrack.next({ action: 'Set Locale ' + this.locale });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveTheme() {
|
async saveTheme() {
|
||||||
await this.storageService.save(ConstantsService.themeKey, this.theme);
|
await this.storageService.save(ConstantsService.themeKey, this.theme);
|
||||||
this.analytics.eventTrack.next({ action: 'Set Theme ' + this.theme });
|
|
||||||
window.setTimeout(() => window.location.reload(), 200);
|
window.setTimeout(() => window.location.reload(), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveMinOnCopyToClipboard() {
|
async saveMinOnCopyToClipboard() {
|
||||||
await this.storageService.save(ElectronConstants.minimizeOnCopyToClipboardKey, this.minimizeOnCopyToClipboard);
|
await this.storageService.save(ElectronConstants.minimizeOnCopyToClipboardKey, this.minimizeOnCopyToClipboard);
|
||||||
this.callAnalytics('MinOnCopyToClipboard', this.minimizeOnCopyToClipboard);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveClearClipboard() {
|
async saveClearClipboard() {
|
||||||
await this.storageService.save(ConstantsService.clearClipboardKey, this.clearClipboard);
|
await this.storageService.save(ConstantsService.clearClipboardKey, this.clearClipboard);
|
||||||
this.analytics.eventTrack.next({
|
|
||||||
action: 'Set Clear Clipboard ' + (this.clearClipboard == null ? 'Disabled' : this.clearClipboard),
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async saveAlwaysShowDock() {
|
async saveAlwaysShowDock() {
|
||||||
|
@ -381,9 +367,4 @@ export class SettingsComponent implements OnInit {
|
||||||
async saveBrowserIntegrationFingerprint() {
|
async saveBrowserIntegrationFingerprint() {
|
||||||
await this.storageService.save(ElectronConstants.enableBrowserIntegrationFingerprint, this.enableBrowserIntegrationFingerprint);
|
await this.storageService.save(ElectronConstants.enableBrowserIntegrationFingerprint, this.enableBrowserIntegrationFingerprint);
|
||||||
}
|
}
|
||||||
|
|
||||||
private callAnalytics(name: string, enabled: boolean) {
|
|
||||||
const status = enabled ? 'Enabled' : 'Disabled';
|
|
||||||
this.analytics.eventTrack.next({ action: `${status} ${name}` });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ import {
|
||||||
ToasterConfig,
|
ToasterConfig,
|
||||||
ToasterService,
|
ToasterService,
|
||||||
} from 'angular2-toaster';
|
} from 'angular2-toaster';
|
||||||
import { Angulartics2 } from 'angulartics2';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Component,
|
Component,
|
||||||
|
@ -100,7 +99,7 @@ export class AppComponent implements OnInit {
|
||||||
private tokenService: TokenService, private folderService: FolderService,
|
private tokenService: TokenService, private folderService: FolderService,
|
||||||
private settingsService: SettingsService, private syncService: SyncService,
|
private settingsService: SettingsService, private syncService: SyncService,
|
||||||
private passwordGenerationService: PasswordGenerationService, private cipherService: CipherService,
|
private passwordGenerationService: PasswordGenerationService, private cipherService: CipherService,
|
||||||
private authService: AuthService, private router: Router, private analytics: Angulartics2,
|
private authService: AuthService, private router: Router,
|
||||||
private toasterService: ToasterService, private i18nService: I18nService,
|
private toasterService: ToasterService, private i18nService: I18nService,
|
||||||
private sanitizer: DomSanitizer, private ngZone: NgZone,
|
private sanitizer: DomSanitizer, private ngZone: NgZone,
|
||||||
private vaultTimeoutService: VaultTimeoutService, private storageService: StorageService,
|
private vaultTimeoutService: VaultTimeoutService, private storageService: StorageService,
|
||||||
|
@ -195,12 +194,6 @@ export class AppComponent implements OnInit {
|
||||||
case 'showToast':
|
case 'showToast':
|
||||||
this.showToast(message);
|
this.showToast(message);
|
||||||
break;
|
break;
|
||||||
case 'analyticsEventTrack':
|
|
||||||
this.analytics.eventTrack.next({
|
|
||||||
action: message.action,
|
|
||||||
properties: { label: message.label },
|
|
||||||
});
|
|
||||||
break;
|
|
||||||
case 'copiedToClipboard':
|
case 'copiedToClipboard':
|
||||||
if (!message.clearing) {
|
if (!message.clearing) {
|
||||||
this.systemService.clearClipboard(message.clipboardValue, message.clearMs);
|
this.systemService.clearClipboard(message.clipboardValue, message.clearMs);
|
||||||
|
@ -230,7 +223,6 @@ export class AppComponent implements OnInit {
|
||||||
try {
|
try {
|
||||||
await this.syncService.fullSync(true, true);
|
await this.syncService.fullSync(true, true);
|
||||||
this.toasterService.popAsync('success', null, this.i18nService.t('syncingComplete'));
|
this.toasterService.popAsync('success', null, this.i18nService.t('syncingComplete'));
|
||||||
this.analytics.eventTrack.next({ action: 'Synced Full' });
|
|
||||||
} catch {
|
} catch {
|
||||||
this.toasterService.popAsync('error', null, this.i18nService.t('syncingFailed'));
|
this.toasterService.popAsync('error', null, this.i18nService.t('syncingFailed'));
|
||||||
}
|
}
|
||||||
|
@ -367,7 +359,6 @@ export class AppComponent implements OnInit {
|
||||||
this.vaultTimeoutService.biometricLocked = true;
|
this.vaultTimeoutService.biometricLocked = true;
|
||||||
this.searchService.clearIndex();
|
this.searchService.clearIndex();
|
||||||
this.authService.logOut(async () => {
|
this.authService.logOut(async () => {
|
||||||
this.analytics.eventTrack.next({ action: 'Logged Out' });
|
|
||||||
if (expired) {
|
if (expired) {
|
||||||
this.toasterService.popAsync('warning', this.i18nService.t('loggedOut'),
|
this.toasterService.popAsync('warning', this.i18nService.t('loggedOut'),
|
||||||
this.i18nService.t('loginExpired'));
|
this.i18nService.t('loginExpired'));
|
||||||
|
|
|
@ -2,8 +2,6 @@ import 'core-js';
|
||||||
import 'zone.js/dist/zone';
|
import 'zone.js/dist/zone';
|
||||||
|
|
||||||
import { ToasterModule } from 'angular2-toaster';
|
import { ToasterModule } from 'angular2-toaster';
|
||||||
import { Angulartics2Module } from 'angulartics2';
|
|
||||||
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
|
|
||||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||||
|
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
|
@ -150,11 +148,6 @@ registerLocaleData(localeZhTw, 'zh-TW');
|
||||||
FormsModule,
|
FormsModule,
|
||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
ServicesModule,
|
ServicesModule,
|
||||||
Angulartics2Module.forRoot({
|
|
||||||
pageTracking: {
|
|
||||||
clearQueryParams: true,
|
|
||||||
},
|
|
||||||
}),
|
|
||||||
ToasterModule.forRoot(),
|
ToasterModule.forRoot(),
|
||||||
InfiniteScrollModule,
|
InfiniteScrollModule,
|
||||||
DragDropModule,
|
DragDropModule,
|
||||||
|
|
|
@ -22,8 +22,6 @@ import { AuthGuardService } from 'jslib/angular/services/auth-guard.service';
|
||||||
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||||||
import { ValidationService } from 'jslib/angular/services/validation.service';
|
import { ValidationService } from 'jslib/angular/services/validation.service';
|
||||||
|
|
||||||
import { Analytics } from 'jslib/misc/analytics';
|
|
||||||
|
|
||||||
import { ApiService } from 'jslib/services/api.service';
|
import { ApiService } from 'jslib/services/api.service';
|
||||||
import { AppIdService } from 'jslib/services/appId.service';
|
import { AppIdService } from 'jslib/services/appId.service';
|
||||||
import { AuditService } from 'jslib/services/audit.service';
|
import { AuditService } from 'jslib/services/audit.service';
|
||||||
|
@ -138,7 +136,6 @@ const systemService = new SystemService(storageService, vaultTimeoutService, mes
|
||||||
const nativeMessagingService = new NativeMessagingService(cryptoFunctionService, cryptoService, platformUtilsService,
|
const nativeMessagingService = new NativeMessagingService(cryptoFunctionService, cryptoService, platformUtilsService,
|
||||||
logService, i18nService, userService, messagingService, vaultTimeoutService, storageService);
|
logService, i18nService, userService, messagingService, vaultTimeoutService, storageService);
|
||||||
|
|
||||||
const analytics = new Analytics(window, () => isDev(), platformUtilsService, storageService, appIdService);
|
|
||||||
containerService.attachToGlobal(window);
|
containerService.attachToGlobal(window);
|
||||||
|
|
||||||
export function initFactory(): Function {
|
export function initFactory(): Function {
|
||||||
|
@ -177,10 +174,6 @@ export function initFactory(): Function {
|
||||||
|
|
||||||
if (installAction != null) {
|
if (installAction != null) {
|
||||||
await storageService.save(ConstantsService.installedVersionKey, currentVersion);
|
await storageService.save(ConstantsService.installedVersionKey, currentVersion);
|
||||||
analytics.ga('send', {
|
|
||||||
hitType: 'event',
|
|
||||||
eventAction: installAction,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,6 @@ import {
|
||||||
} from '@angular/router';
|
} from '@angular/router';
|
||||||
|
|
||||||
import { ToasterService } from 'angular2-toaster';
|
import { ToasterService } from 'angular2-toaster';
|
||||||
import { Angulartics2 } from 'angulartics2';
|
|
||||||
|
|
||||||
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';
|
||||||
|
|
||||||
|
@ -82,7 +81,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||||
constructor(private route: ActivatedRoute, private router: Router,
|
constructor(private route: ActivatedRoute, private router: Router,
|
||||||
private componentFactoryResolver: ComponentFactoryResolver, private i18nService: I18nService,
|
private componentFactoryResolver: ComponentFactoryResolver, private i18nService: I18nService,
|
||||||
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
|
private broadcasterService: BroadcasterService, private changeDetectorRef: ChangeDetectorRef,
|
||||||
private ngZone: NgZone, private syncService: SyncService, private analytics: Angulartics2,
|
private ngZone: NgZone, private syncService: SyncService,
|
||||||
private toasterService: ToasterService, private messagingService: MessagingService,
|
private toasterService: ToasterService, private messagingService: MessagingService,
|
||||||
private platformUtilsService: PlatformUtilsService, private eventService: EventService,
|
private platformUtilsService: PlatformUtilsService, private eventService: EventService,
|
||||||
private totpService: TotpService, private userService: UserService) { }
|
private totpService: TotpService, private userService: UserService) { }
|
||||||
|
|
|
@ -68,7 +68,6 @@ export class ViewComponent extends BaseViewComponent implements OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
viewHistory() {
|
viewHistory() {
|
||||||
this.platformUtilsService.eventTrack('View Password History');
|
|
||||||
this.onViewCipherPasswordHistory.emit(this.cipher);
|
this.onViewCipherPasswordHistory.emit(this.cipher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue