mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-08 09:32:07 +01:00
double click to launch website from vault
This commit is contained in:
parent
79deb5633a
commit
09f47c0e59
@ -127,12 +127,32 @@
|
||||
};
|
||||
|
||||
$scope.viewLogin = function (login) {
|
||||
storeState();
|
||||
$state.go('viewLogin', {
|
||||
loginId: login.id,
|
||||
animation: 'in-slide-up',
|
||||
from: 'vault'
|
||||
});
|
||||
if (login.clicked) {
|
||||
login.cancelClick = true;
|
||||
$scope.launchWebsite(login);
|
||||
return;
|
||||
}
|
||||
|
||||
login.clicked = true;
|
||||
|
||||
$timeout(function () {
|
||||
if (login.cancelClick) {
|
||||
login.cancelClick = false;
|
||||
login.clicked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
storeState();
|
||||
$state.go('viewLogin', {
|
||||
loginId: login.id,
|
||||
animation: 'in-slide-up',
|
||||
from: 'vault'
|
||||
});
|
||||
|
||||
// clean up
|
||||
login.cancelClick = false;
|
||||
login.clicked = false;
|
||||
}, 200);
|
||||
};
|
||||
|
||||
$scope.viewFolder = function (folder) {
|
||||
@ -154,10 +174,12 @@
|
||||
};
|
||||
|
||||
$scope.launchWebsite = function (login) {
|
||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
}
|
||||
$timeout(function () {
|
||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$scope.$on('syncCompleted', function (event, successfully) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
.module('bit.vault')
|
||||
|
||||
.controller('vaultViewFolderController', function ($scope, loginService, folderService, $q, $state, $stateParams, toastr,
|
||||
syncService, $analytics, i18nService, stateService, utilsService) {
|
||||
syncService, $analytics, i18nService, stateService, utilsService, $timeout) {
|
||||
var stateKey = 'viewFolder',
|
||||
state = stateService.getState(stateKey) || {};
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
$scope.searchLogins();
|
||||
}
|
||||
|
||||
setTimeout(setScrollY, 200);
|
||||
$timeout(setScrollY, 200);
|
||||
});
|
||||
}
|
||||
|
||||
@ -132,10 +132,12 @@
|
||||
};
|
||||
|
||||
$scope.launchWebsite = function (login) {
|
||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
}
|
||||
$timeout(function () {
|
||||
if (login.uri.startsWith('http://') || login.uri.startsWith('https://')) {
|
||||
$analytics.eventTrack('Launched Website From Listing');
|
||||
chrome.tabs.create({ url: login.uri });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function resetList(logins) {
|
||||
@ -169,12 +171,32 @@
|
||||
};
|
||||
|
||||
$scope.viewLogin = function (login) {
|
||||
storeState();
|
||||
$state.go('viewLogin', {
|
||||
loginId: login.id,
|
||||
animation: 'in-slide-up',
|
||||
from: 'folder'
|
||||
});
|
||||
if (login.clicked) {
|
||||
login.cancelClick = true;
|
||||
$scope.launchWebsite(login);
|
||||
return;
|
||||
}
|
||||
|
||||
login.clicked = true;
|
||||
|
||||
$timeout(function () {
|
||||
if (login.cancelClick) {
|
||||
login.cancelClick = false;
|
||||
login.clicked = false;
|
||||
return;
|
||||
}
|
||||
|
||||
storeState();
|
||||
$state.go('viewLogin', {
|
||||
loginId: login.id,
|
||||
animation: 'in-slide-up',
|
||||
from: 'folder'
|
||||
});
|
||||
|
||||
// clean up
|
||||
login.cancelClick = false;
|
||||
login.clicked = false;
|
||||
}, 200);
|
||||
};
|
||||
|
||||
$scope.clipboardError = function (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user