mirror of
https://github.com/bitwarden/browser.git
synced 2024-09-01 00:10:39 +02:00
close popup on launch site/autofill
This commit is contained in:
parent
f852cbbfe3
commit
31f73895b8
|
@ -79,7 +79,9 @@ angular
|
|||
if (totpCode && utilsService.isFirefox()) {
|
||||
utilsService.copyToClipboard(totpCode, document);
|
||||
}
|
||||
$window.close();
|
||||
if (!utilsService.inSidebar($window)) {
|
||||
$window.close();
|
||||
}
|
||||
}, function () {
|
||||
$analytics.eventTrack('Autofilled Error');
|
||||
toastr.error(i18nService.autofillError);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.module('bit.vault')
|
||||
|
||||
.controller('vaultController', function ($scope, $rootScope, loginService, folderService, $q, $state, $stateParams, toastr,
|
||||
syncService, utilsService, $analytics, i18nService, stateService, $timeout) {
|
||||
syncService, utilsService, $analytics, i18nService, stateService, $timeout, $window) {
|
||||
var stateKey = 'vault',
|
||||
state = stateService.getState(stateKey) || {};
|
||||
|
||||
|
@ -178,6 +178,9 @@
|
|||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
if (!utilsService.inSidebar($window)) {
|
||||
$window.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
.module('bit.vault')
|
||||
|
||||
.controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr,
|
||||
syncService, $analytics, i18nService, stateService, utilsService, $timeout) {
|
||||
syncService, $analytics, i18nService, stateService, utilsService, $timeout, $window) {
|
||||
var stateKey = 'viewFolder',
|
||||
state = stateService.getState(stateKey) || {};
|
||||
|
||||
|
@ -136,6 +136,9 @@
|
|||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
if (!utilsService.inSidebar($window)) {
|
||||
$window.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user